1 2011-04-15 Tobias Burnus <burnus@net-b.de>
4 * trans-intrinsic.c (conv_intrinsic_cobound): Remove unused
5 code which is also causing an ICE.
7 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9 * f95-lang.c (poplevel): Use BLOCK_CHAIN and block_chainon.
11 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
13 * f95-lang.c (union lang_tree_node): Check for TS_COMMON before
16 2011-04-12 Paul Thomas <pault@gcc.gnu.org>
20 * trans-array.c (get_std_lbound): For derived type variables
21 return array valued component lbound.
23 2011-04-12 Martin Jambor <mjambor@suse.cz>
25 * trans-decl.c (gfc_generate_function_code): Call
26 cgraph_get_create_node instead of cgraph_node.
28 2011-04-11 Tobias Burnus <burnus@net-b.de>
31 * simplify.c (simplify_bound_dim): Exit for
32 ucobound's last dimension unless -fcoarray=single.
33 * trans-array (gfc_conv_descriptor_size_1): Renamed from
34 gfc_conv_descriptor_size, made static, has now from_dim and
36 (gfc_conv_descriptor_size): Call gfc_conv_descriptor_size.
37 (gfc_conv_descriptor_cosize): New function.
38 * trans-array.h (gfc_conv_descriptor_cosize): New prototype.
39 * trans-intrinsic.c (conv_intrinsic_cobound): Add input_location
40 and handle last codim of ucobound for when -fcoarray is not "single".
42 2011-04-08 Thomas Koenig <tkoenig@gcc.gnu.org>
45 * gfortran.h (gfc_option_t): Add warn_function_elimination and
46 flag_frontend_optimize.
47 * lang.opt (Wfunction-elimination): Add.
48 (ffrontend-optimize): Add.
49 * invoke.texi: Add documentation for -Wfunction-elimination
50 and -ffrontend-optimize. Add -faggressive-function-elimination
51 to list of code generation options.
52 * frontend-passes.c (gfc_run_passes): Run optimizations if
53 flag_frontend_optimize is set.
54 (warn_function_elimination): New function.
55 (cfe_expr_0): Call it if requested to do so.
56 * options.c (gfc_init_options): Initiate warn_function_elimination
57 and flag_frontend_optimize.
58 (gfc_post_options): Set flag_frontend_optimize if not specified
59 by user, depending on the optimization level.
60 (gfc_handle_option): Handle -Wfunction-elimination and
63 2011-04-06 Tobias Burnus <burnus@net-b.de>
66 * trans-intrinsic.c (gfc_conv_intrinsic_function): Fix
69 2011-04-05 Nathan Froyd <froydnj@codesourcery.com>
71 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Use
72 build_function_type_list instead of build_function_type. Correct
73 argument order for func_frexp and func_scalbn.
75 2011-04-05 Duncan Sands <baldrick@free.fr>
77 * f95-lang.c (build_builtin_fntypes): Swap frexp parameter types.
79 2010-04-04 Thomas Koenig <tkoenig@gcc.gnu.org>
81 * frontend-passes: (optimize_lexical_comparison): New function.
82 (optimize_expr): Call it.
83 (optimize_comparison): Also handle lexical comparison functions.
84 Return false instad of -2 for unequal comparison.
86 2011-04-04 Thomas Koenig <tkoenig@gcc.gnu.org>
89 * frontend-passes (cfe_expr_0): Reverse the order of going
92 2011-04-04 Tobias Burnus <burnus@net-b.de>
93 Mikael Morin <mikael.morin@sfr.fr>
96 * check.c (is_coarray): Update - because of DIMEN_THIS_IMAGE.
97 * expr.c (gfc_is_coindexed): Ditto.
98 * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_THIS_IMAGE.
99 * interface.c (compare_parameter): Use gfc_expr_attr and
101 * resolve.c (check_dimension, compare_spec_to_ref,
102 resolve_allocate_expr, check_data_variable): Update for
104 * simplify.c (gfc_simplify_lcobound, gfc_simplify_this_image,
105 gfc_simplify_ucobound): Allow non-constant bounds.
106 * trans-array.c (gfc_set_loop_bounds_from_array_spec,
107 gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
108 gfc_set_vector_loop_bounds, gfc_conv_array_index_offset,
109 gfc_start_scalarized_body, gfc_trans_scalarizing_loops,
110 gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
111 gfc_conv_ss_startstride, gfc_conv_loop_setup,
112 gfc_trans_array_bounds, gfc_conv_expr_descriptor,
113 gfc_walk_variable_expr): Handle codimen.
114 * trans-decl.c (gfc_build_qualified_array): Save cobounds.
115 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use arg2.
116 (conv_intrinsic_cobound): New function.
117 (gfc_conv_intrinsic_function): Call it.
118 (gfc_walk_intrinsic_function, gfc_add_intrinsic_ss_code): Handle
119 ucobound, lcobound, this_image.
120 * fortran/trans-types.c (gfc_build_array_type): Save cobounds.
121 (gfc_get_dtype): Honour corank.
122 (gfc_get_nodesc_array_type): Save corank and codimensions.
123 (gfc_get_array_type_bounds): Save cobound.
124 * fortran/trans.h (gfc_ss_info,gfc_loopinfo): Add codimen item.
125 (gfc_array_kind): Add corank item.
126 (GFC_TYPE_ARRAY_CORANK): New macro.
128 2011-04-03 Kai Tietz <ktietz@redhat.com>
131 * Make-lang.in (f95-lang.o): Add some missing dependencies.
133 2011-04-01 Thomas Koenig <tkoenig@gcc.gnu.org>
136 * frontend-passes (cfe_register_funcs): Don't
137 register functions if they appear as iterators in DO loops.
139 2011-03-30 Michael Matz <matz@suse.de>
142 * trans-expr.c (realloc_lhs_loop_for_fcn_call): Take loop as parameter,
143 don't use local variable.
144 (gfc_trans_arrayfunc_assign): Adjust caller.
146 2011-03-29 Janus Weil <janus@gcc.gnu.org>
149 * decl.c (match_procedure_decl,match_ppc_decl): Set flavor of interface.
150 * module.c (MOD_VERSION): Bump.
151 (mio_typespec): Read/write 'interface' field.
152 * primary.c (match_string_constant,match_logical_constant): Remove
154 (match_complex_constant): Make sure to clear the typespec.
156 2011-03-29 Thomas Koenig <tkoenig@gcc.gnu.org>
158 * frontend-passes.c (create_var): Warn about creating an
159 array temporary if requested.
161 2011-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
164 * frontend-passes.c (optimize_trim): Also follow references, except
165 when they are substring references or array references.
167 2011-03-27 Tobias Burnus <burnus@net-b.de>
170 * gfortran.h (gfc_isym_id): Rename GFC_ISYM_NUMIMAGES to
172 (gfc_fcoarray): Add GFC_FCOARRAY_LIB.
173 * intrinsic.c (add_functions): Update due to GFC_ISYM_NUM_IMAGES
175 * invoke.texi (-fcoarray=): Document "lib" argument.
176 * iresolve.c (gfc_resolve_this_image): Fix THIS IMAGE().
177 * libgfortran.h (libgfortran_stat_codes): Add comments.
178 * options.c (gfc_handle_coarray_option): Add -fcoarray=lib.
179 * simplify.c (gfc_simplify_num_images, gfc_simplify_this_image):
180 Handle GFC_FCOARRAY_LIB.
181 * trans.h (gfc_init_coarray_decl): New prototype.
182 (gfor_fndecl_caf_init, gfor_fndecl_caf_finalize,
183 gfor_fndecl_caf_critical, gfor_fndecl_caf_end_critical,
184 gfor_fndecl_caf_sync_all, gfor_fndecl_caf_sync_images,
185 gfor_fndecl_caf_error_stop, gfor_fndecl_caf_error_stop_str,
186 gfort_gvar_caf_num_images, gfort_gvar_caf_this_image):
187 New global variables.
188 * trans-decl.c: Declare several CAF functions (cf. above).
189 (gfc_build_builtin_function_decls): Initialize those.
190 (gfc_init_coarray_decl): New function.
191 (create_main_function): Call CAF init/finalize functions.
192 * trans-intrinsic.c (trans_this_image, trans_num_images): New.
193 (gfc_conv_intrinsic_function): Call those.
194 * trans-stmt.c (gfc_trans_stop, gfc_trans_sync, gfc_trans_critical):
195 Add code for GFC_FCOARRAY_LIB.
197 2011-03-26 Janus Weil <janus@gcc.gnu.org>
200 * class.c (get_unique_hashed_string): Adjust maximum allowable length
201 for unique type string.
203 2011-03-25 Kai Tietz <ktietz@redhat.com>
205 * scanner.c (preprocessor_line): Use filename_cmp
208 2011-03-25 Tobias Burnus <burnus@net-b.de>
212 * trans-types.c (gfc_get_function_type): Don't use varargs if the
213 procedure is known to have no arguments.
215 2010-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
218 * gfortran.h (gfc_option_t) : Add
219 flag_aggressive_function_elimination.
220 (gfc_dep_compare_functions): Add prototype.
221 * lang.opt: Add faggressive-function-elimination.
222 * invoke.texi: Document -faggressive-function-elimination.
223 * frontend_passes (expr_array): New static variable.
224 (expr_size): Likewise.
225 (expr_count): Likewise.
226 (current_code): Likewise.
227 (current_ns): Likewise.
228 (gfc_run_passes): Allocate and free space for expressions.
229 (cfe_register_funcs): New function.
230 (create_var): New function.
231 (cfc_expr_0): New function.
232 (cfe_code): New function.
233 (optimize_namespace): Invoke gfc_code_walker with cfe_code
235 * dependency.c (gfc_dep_compare_functions): New function.
236 (gfc_dep_compare_expr): Use it.
237 * options.c (gfc_init_options): Handle
238 flag_aggressive_function_elimination.
239 (gfc_handle_option): Likewise.
241 2011-03-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
243 * arith.c (arith_power): Plug memory leak.
245 2011-03-12 Janus Weil <janus@gcc.gnu.org>
248 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Replace base type
249 for polymorphic arguments.
251 2011-03-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
254 * intrinsic.texi: Clarify doc of logarithm functions.
256 2011-03-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
259 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Fix type of
260 the string length variable.
262 2011-03-11 Janus Weil <janus@gcc.gnu.org>
265 * module.c (ab_attribute,attr_bits): Add AB_PROC_POINTER_COMP.
266 (mio_symbol_attribute): Handle attribute 'proc_pointer_comp'.
268 2011-03-06 Paul Thomas <pault@gcc.gnu.org>
269 Jerry DeLisle <jvdelisle@gcc.gnu.org>
272 * expr.c (gfc_is_constant_expr): Only use gfc_constant_ac if
273 the expression has an iterator. Otherwise, iterate through the
274 array, checking for constant expressions for each element.
276 2011-03-04 Janne Blomqvist <jb@gcc.gnu.org>
279 * intrinsic.texi: Update CTIME and FDATE documentation.
281 2011-03-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
283 * invoke.texi (Option Summary, Fortran Dialect Options)
284 (Preprocessing Options, Runtime Options, Code Gen Options):
285 Fix vertical list spacing by using @itemx for additinoal
286 items, empty line before @table. Fix typos.
288 2011-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
291 * intrinsic.texi: Fix doc of the VERIFY intrinsic.
293 2011-02-26 Tobias Burnus <burnus@net-b.de>
296 * trans-stmt.c (gfc_trans_allocate): Fix allocation with
297 type-spec of deferred-length strings.
299 2011-02-26 Tobias Burnus <burnus@net-b.de>
302 * openmp.c (gfc_resolve_omp_directive): Resolve if()
303 condition of OpenMP's task.
305 2011-02-26 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
308 * intrinsic.texi: Fix doc of the VERIFY intrinsic.
310 2011-02-24 Tobias Burnus <burnus@net-b.de>
313 * intrinsic.texi (ALLOCATED, ATAN, BESSEL_JN, BESSEL_YN): Add
314 multitable for linebreak between different syntax variants.
316 2011-02-24 Richard Guenther <rguenther@suse.de>
319 * f95-lang.c (pushdecl): For externs in non-global scope push
320 a copy of the decl into the BLOCK.
322 2011-02-23 Mikael Morin <mikael@gcc.gnu.org>
325 * trans.c (gfc_prepend_expr_to_block): New function.
326 * trans.h (gfc_prepend_expr_to_block): Declare.
327 * trans-array.c (gfc_conv_array_parameter): Replace
328 gfc_add_expr_to_block with gfc_prepend_expr_to_block.
330 2011-02-22 Paul Thomas <pault@gcc.gnu.org>
333 * trans-decl.c (gfc_get_extern_function_decl): Don't use the
334 gsymbol backend_decl if the procedure has a formal argument
337 2011-02-22 Tobias Burnus <burnus@net-b.de>
340 * trans-stmt.c (gfc_trans_if_1): Use correct line for
341 expressions in the if condition.
343 2011-02-20 Tobias Burnus <burnus@net-b.de>
346 * trans-decl.c (gfc_trans_deferred_vars): Use gfc_set_backend_locus and
347 gfc_restore_backend_locus to have better debug locations.
348 * trans-array.c (gfc_trans_deferred_array): Ditto.
350 2011-02-20 Paul Thomas <pault@gcc.gnu.org>
354 * trans-types.c (gfc_get_derived_type): Remove code that looks
355 for decls in gsym and add call to gfc_get_module_backend_decl.
356 * trans.h : Add prototype for gfc_get_module_backend_decl.
357 * trans-decl.c (gfc_get_module_backend_decl): New function.
358 (gfc_get_symbol_decl): Call it.
360 2011-02-19 Paul Thomas <pault@gcc.gnu.org>
363 * trans-array.c (get_array_ctor_all_strlen): Move up in file.
364 (get_array_ctor_var_strlen): Add block dummy and add call to
365 get_array_ctor_all_strlen instead of giving up on substrings.
366 Call gcc_unreachable for default case.
367 (get_array_ctor_strlen): Add extra argument to in call to
368 get_array_ctor_var_strlen.
370 2011-02-18 Janus Weil <janus@gcc.gnu.org>
373 * primary.c (gfc_match_structure_constructor): Handle empty parent
376 2011-02-18 Tobias Burnus
379 * trans-expr.c (arrayfunc_assign_needs_temporary): Use
380 esym to check whether the specific procedure returns an
381 allocatable or pointer.
383 2011-02-18 Michael Matz <matz@suse.de>
386 * gfortran.h (struct gfc_component): Add norestrict_decl member.
387 * trans.h (struct lang_type): Add nonrestricted_type member.
388 * trans-expr.c (gfc_conv_component_ref): Search fields with correct
390 * trans-types.c (mirror_fields, gfc_nonrestricted_type): New.
391 (gfc_sym_type): Use it.
393 2011-02-18 Janus Weil <janus@gcc.gnu.org>
396 * resolve.c (resolve_transfer): Reject variables with procedure pointer
399 2011-02-18 Janus Weil <janus@gcc.gnu.org>
402 * gfortran.h (gfc_check_access): Removed prototype.
403 (gfc_check_symbol_access): Added prototype.
404 * module.c (gfc_check_access): Renamed to 'check_access', made static.
405 (gfc_check_symbol_access): New function, basically a shortcut for
407 (write_dt_extensions,write_symbol0,write_generic,write_symtree): Use
408 'gfc_check_symbol_access'.
409 (write_operator,write_module): Renamed 'gfc_check_access'.
410 * resolve.c (resolve_fl_procedure,resolve_fl_derived,
411 resolve_fl_namelist,resolve_symbol,resolve_fntype): Use
412 'gfc_check_symbol_access'.
414 2011-02-16 Janus Weil <janus@gcc.gnu.org>
417 * class.c (gfc_build_class_symbol): Set 'class_ok' attribute.
418 * decl.c (build_sym,attr_decl1): Move setting of 'class_ok' into
419 'gfc_build_class_symbol'.
420 (gfc_match_decl_type_spec): Reject unlimited polymorphism.
421 * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
422 * match.c (select_type_set_tmp): Move setting of 'class_ok' into
423 'gfc_build_class_symbol'.
424 * primary.c (gfc_variable_attr): Check for 'class_ok' attribute.
426 2011-02-15 Steven G. Kargl <kargl@gcc.gnu.org>
429 . simplify.c (gfc_simplify_compiler_version): Fix off-by-one issue.
431 2011-02-14 Janus Weil <janus@gcc.gnu.org>
434 * parse.c (gfc_build_block_ns): Commit 'block@' symbol.
436 2011-02-14 Janus Weil <janus@gcc.gnu.org>
439 * class.c (gfc_build_class_symbol): Give a fatal error on polymorphic
441 * primary.c (gfc_match_varspec): Avoid ICE for invalid class
444 2011-02-14 Janus Weil <janus@gcc.gnu.org>
447 * interface.c (get_expr_storage_size): Handle derived-type components.
449 2011-02-13 Tobias Burnus <burnus@net-b.de>
452 * interface.c (compare_parameter): Avoid ICE with
453 character components.
455 2011-02-12 Janus Weil <janus@gcc.gnu.org>
457 * class.c (gfc_build_class_symbol): Reject polymorphic arrays.
458 * decl.c (build_sym,build_struct,attr_decl1): Use return value of
459 'gfc_build_class_symbol'.
461 2011-02-12 Michael Matz <matz@suse.de>
462 Janus Weil <janus@gcc.gnu.org>
463 Tobias Burnus <burnus@net-b.de>
466 * trans-expr.c (conv_parent_component_references): Avoid unintendent
467 skipping of parent compounds.
469 2011-02-11 Tobias Burnus <burnus@net-b.de>
472 * resolve.c (resolve_formal_arglist): PURE with VALUE
473 and no INTENT: Add -std= diagnostics.
475 2011-02-09 Janus Weil <janus@gcc.gnu.org>
478 * resolve.c (resolve_procedure_interface): If interface has a result
479 variable, copy the typespec and set result pointer to self.
481 2011-02-09 Janus Weil <janus@gcc.gnu.org>
484 * resolve.c (resolve_typebound_subroutine): Remove erroneous line.
486 2011-02-09 Janus Weil <janus@gcc.gnu.org>
489 * trans-decl.c (init_intent_out_dt): Handle CLASS arguments.
491 2011-02-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
493 * io.c (match_io_element): Do not set dt if not inquire.
495 2011-02-08 Janus Weil <janus@gcc.gnu.org>
498 * expr.c (gfc_check_assign_symbol): Reject pointers as pointer
499 initialization target.
501 2011-02-07 Janne Blomqvist <jb@gcc.gnu.org>
502 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
504 * gfortran.texi (Thread-safety): texinfo styling fixes.
505 * intrinsic.texi: Likewise.
507 2011-02-06 Janne Blomqvist <jb@gcc.gnu.org>
509 * gfortran.texi (Compiler Characteristics): Add reference to
510 thread-safety section.
512 2011-02-06 Janne Blomqvist <jb@gcc.gnu.org>
514 * gfortran.texi (Thread-safety): New section.
515 * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety.
517 (GET_ENVIRONMENT_VARIABLE): Likewise.
520 2011-02-06 Paul Thomas <pault@gcc.gnu.org>
523 * trans-stmt.c (gfc_trans_allocate): For deferred character
524 length allocations with SOURCE, store to the values and string
525 length to avoid calculating twice. Replace gfc_start_block
526 with gfc_init_block to avoid unnecessary contexts and to keep
527 declarations of temporaries where they should be. Tidy up the
530 2011-02-05 Janne Blomqvist <jb@gcc.gnu.org>
533 * intrinsic.texi (SYSTEM_CLOCK): Update documentation.
535 2011-02-02 Janus Weil <janus@gcc.gnu.org>
536 Paul Thomas <pault@gcc.gnu.org>
539 * trans-expr.c (gfc_trans_class_init_assign): Add call to
540 gfc_get_derived_type.
541 * module.c (read_cleanup): Do not use unique_symtrees for vtabs
544 2011-02-02 Janus Weil <janus@gcc.gnu.org>
547 * resolve.c (resolve_fl_variable): Handle polymorphic allocatables.
549 2011-02-01 Janus Weil <janus@gcc.gnu.org>
552 * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
553 pointer components with allocatable result.
555 2011-01-31 Janus Weil <janus@gcc.gnu.org>
558 * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointers
559 with pointer or allocatable result.
561 2011-01-31 Paul Thomas <pault@gcc.gnu.org>
564 * trans-stmt.c (gfc_trans_allocate): Improve handling of
565 deferred character lengths with SOURCE.
566 * iresolve.c (gfc_resolve_repeat): Calculate character
567 length from source length and ncopies.
568 * dump-parse-tree.c (show_code_node): Show MOLD and SOURCE
569 expressions for ALLOCATE.
571 2011-01-31 Janus Weil <janus@gcc.gnu.org>
574 * resolve.c (resolve_typebound_subroutine): Bug fix for the case of
575 an argument of a typebound assignment being a component.
577 2011-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
579 * gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
580 LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
582 2011-01-31 Tobias Burnus <burnus@net-b.de>
585 * resolve.c (resolve_fl_procedure): Reject stmt functions
586 with pointer/allocatable attribute.
588 2011-01-31 Tobias Burnus <burnus@net-b.de>
591 * interface.c (gfc_procedure_use): Add explicit interface check for
592 pointer/allocatable functions.
594 2011-01-30 Paul Thomas <pault@gcc.gnu.org>
597 * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
598 expr and is assigned to a deferred character length scalar,
599 make sure that the function is called before reallocation,
600 so that the length is available. Include procedure pointer
601 and procedure pointer component rhs as well.
606 * gfortran.dg/allocatable_function_5.f90: New test not added by
607 mistake on 2011-01-28.
609 2011-01-29 Tobias Burnus <burnus@net-b.de>
612 * check.c (gfc_check_shape): Support kind argument in SHAPE.
613 * intrinsic.c (add_functions): Ditto.
614 * resolve.c (gfc_resolve_shape): Ditto.
615 * simplify.c (gfc_simplify_shape): Ditto.
616 * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
617 gfc_simplify_shape): Update prototypes.
618 * intrinisc.text (SHAPE): Document kind argument.
620 2011-01-28 Tobias Burnus <burnus@net-b.de>
623 * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
624 attribute also without INTENT.
626 2011-01-28 Tobias Burnus <burnus@net-b.de>
628 * gfortran.texi (Fortran 2003 status): Mention support for
629 nonconstant namelist variables.
631 2011-01-28 Paul Thomas <pault@gcc.gnu.org>
632 Tobias Burnus <burnus@gcc.gnu.org>
637 * interface.c (compare_actual_formal): An allocatable or pointer
638 deferred length actual is only allowed if the formal argument
639 is also deferred length. Clean up whitespace.
640 * trans-expr.c (gfc_conv_procedure_call): Pass string length for
641 deferred character length formal arguments by reference. Do the
642 same for function results.
643 (gfc_trans_pointer_assignment): Do not do runtime check of lhs
644 and rhs character lengths, if deferred length lhs. In this case
645 set the lhs character length to that of the rhs.
646 (gfc_conv_string_parameter): Remove assert that string length is
648 (is_scalar_reallocatable_lhs): New function.
649 (alloc_scalar_allocatable_for_assignment): New function.
650 (gfc_trans_assignment_1): Call above new function. If the rhs is
651 a deferred character length itself, makes ure that the function
652 is called before reallocation, so that the length is available.
653 (gfc_trans_asssignment): Remove error about assignment to
654 deferred length character variables.
655 * gfortran.texi : Update entry about (re)allocation on
657 * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
658 length character variables.
659 * module.c (mio_typespec): Transfer deferred characteristic.
660 * trans-types.c (gfc_get_function_type): New code to generate
661 hidden typelist, so that those character lengths that are
662 passed by reference get the right type.
663 * resolve.c (resolve_contained_fntype): Supress error for
664 deferred character length functions.
665 (resolve_function, resolve_fl_procedure) The same.
666 (check_symbols): Remove the error that support for
667 entity with deferred type parameter is not yet implemented.
668 (resolve_fl_derived): The same.
669 match.c (alloc_opt_list): Allow MOLD for deferred length object.
670 * trans-decl.c (gfc_get_symbol_decl): For deferred character
671 length dummies, generate a local variable for string length.
672 (create_function_arglist): Hidden length can be a pointer.
673 (gfc_trans_deferred_vars): For deferred character length
674 results and dummies, assign the string length to the local
675 variable from the hidden argument on entry and the other way
676 round on exit, as appropriate.
678 2011-01-27 Tobias Burnus <burnus@net-b.de>
681 * trans-decl.c (gfc_generate_function_code): Fix init
682 of allocatable result variable with allocatable components.
684 2011-01-27 Tobias Burnus <burnus@net-b.de>
687 * options.c (gfc_handle_module_path_options): Save
688 module path without trailing slash as include path.
690 2011-01-25 Tobias Burnus <burnus@net-b.de>
693 * interface.c (gfc_check_operator_interface): Fix
694 defined-assignment check.
696 2011-01-23 Tobias Burnus <burnus@net-b.de>
699 * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
700 scalar allocatable dummy arguments.
702 2011-01-22 Thomas Koenig <tkoenig@gcc.gnu.org>
705 * resolve.c (gfc_iso_c_func_interface): For C_LOC,
706 check for array sections followed by component references
707 which are illegal. Also check for coindexed arguments.
709 2011-01-22 Tobias Burnus <burnus@net-b.de>
712 * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
715 2011-01-21 Tobias Burnus <burnus@net-b.de>
718 * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
719 Use defined instead of magic number exit status codes.
720 * scanner.c (include_line, gfc_new_file): Ditto.
722 2011-01-21 Tobias Burnus <burnus@net-b.de>
725 * expr.c (gfc_check_pointer_assign): Reject expr data-targets
726 without pointer attribute.
728 2011-01-18 Janus Weil <janus@gcc.gnu.org>
731 * resolve.c (expression_rank): Fix rank of procedure poiner components.
732 * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
733 pointer components as actual arguments.
735 2011-01-17 Jakub Jelinek <jakub@redhat.com>
738 * gfortran.h (struct gfc_omp_saved_state): New type.
739 (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
740 * resolve.c (resolve_global_procedure): Call it around gfc_resolve
742 * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
745 2011-01-17 Tobias Burnus <burnus@net-b.de>
748 * invoke.texi (Options to request or suppress errors
749 and warnings): Fix cross link.
751 2011-01-15 Tobias Burnus <burnus@net-b.de>
753 * gfortran.texi: Update Fortran 2003 Status section.
756 * invoke.texi: Add missing "-E" to the -dM example.
758 2011-01-13 Tobias Burnus <burnus@net-b.de>
761 * intrinsic.texi (get_command_argument, get_environment_variable):
762 Mark arguments as optional in the Arguments section.
764 2011-01-13 Kai Tietz <kai.tietz@onevision.com>
765 Tobias Burnus <burnus@net-b.de>
768 * trans-decl.c (gfc_get_extern_function_decl,
769 build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
770 calling decl_attributes.
772 2011-01-13 Tobias Burnus <burnus@net-b.de>
773 Mikael Morin <mikael@gcc.gnu.org>
777 * gfortran.h (gfc_code): Move union ext's case_list into
779 * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
781 * frontend-passes.c (gfc_code_walker): Ditto.
782 * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
783 gfc_match_type_is, gfc_match_class_is): Ditto.
784 * resolve.c (resolve_select, resolve_select_type): Ditto.
785 * st.c (gfc_free_statement): Ditto.
786 * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
787 gfc_trans_character_select): Ditto.
788 * parse.c (resolve_all_program_units): For error recovery, avoid
789 segfault is proc_name is NULL.
791 2011-01-11 Paul Thomas <pault@gcc.gnu.org>
794 * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
795 to be standard compliant by testing for shape rather than size
796 before skipping reallocation. Improve comments.
798 2011-01-09 Janus Weil <janus@gcc.gnu.org>
801 * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
804 2011-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
807 * resolve.c (is_scalar_expr_ptr): For a substring reference,
808 use gfc_dep_compare_expr to compare start and end expession.
809 Add FIXME for using gfc_deb_compare_expr elsewhere.
811 2011-01-09 Janus Weil <janus@gcc.gnu.org>
814 * class.c (get_unique_type_string): Make type name start with upper
817 2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
820 * invoke.texi: Mention -ffree-line-length-none and
821 -ffixed-line-length-none for preprocessing.
823 2011-01-08 Paul Thomas <pault@gcc.gnu.org>
826 * trans-expr.c (gfc_conv_procedure_call): With a non-copying
827 procedure argument (eg TRANSPOSE) use a temporary if there is
828 any chance of aliasing due to host or use association.
829 (arrayfunc_assign_needs_temporary): Correct logic for function
830 results and do not use a temporary for implicitly PURE
831 variables. Use a temporary for Cray pointees.
832 * symbol.c (gfc_add_save): Explicit SAVE not compatible with
833 implicit pureness of containing procedure.
834 * decl.c (match_old_style_init, gfc_match_data): Where decl
835 would fail in PURE procedure, set implicit_pure to zero.
836 * gfortran.h : Add implicit_pure to structure symbol_attr and
837 add prototype for function gfc_implicit_pure.
838 * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
839 Where decl would fail in PURE procedure, reset implicit_pure.
840 * io.c (match_vtag, gfc_match_open, gfc_match_close,
841 gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
842 * match.c (gfc_match_critical, gfc_match_stopcode,
843 sync_statement, gfc_match_allocate, gfc_match_deallocate): The
845 * parse.c (decode_omp_directive): The same.
846 (parse_contained): If not PURE, set implicit pure attribute.
847 * resolve.c (resolve_formal_arglist, resolve_structure_cons,
848 resolve_function, resolve_ordinary_assign) : The same.
849 (gfc_implicit_pure): New function.
850 * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
851 to ab_attribute enum and use it in this function.
853 2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
856 * symbol.c (gfc_symbols_could_alias): Strip gfc_ prefix,
857 make static and move in front of its only caller, to ...
858 * trans-array.c (symbols_could_alias): ... here.
859 Pass information about pointer and target status as
860 arguments. Allocatable arrays don't alias anything
861 unless they have the POINTER attribute.
862 (gfc_could_be_alias): Keep track of pointer and target
863 status when following references. Also check if typespecs
864 of components match those of other components or symbols.
866 2011-01-07 Tobias Burnus <burnus@net-b.de>
869 * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
870 * intrinsic.c (add_functions): Use simplify functions for
871 EXTENDS_TYPE_OF and SAME_TYPE_AS.
872 * intrinsic.h (gfc_simplify_extends_type_of,
873 gfc_simplify_same_type_as): New prototypes.
874 * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
875 gfc_simplify_same_type_as): New functions.
877 2011-01-07 Janus Weil <janus@gcc.gnu.org>
881 * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
882 * class.c (gfc_class_null_initializer): Initialize _vptr to declared
884 * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
885 * resolve.c (resolve_deallocate_expr): _data component will be added
886 at translation stage.
887 * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
888 * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
890 2011-01-06 Daniel Franke <franke.daniel@gmail.com>
894 * parse.c (parse_interface): Remove check for procedure types.
895 * interface.c (check_interface0): Verify that procedures are
896 either all SUBROUTINEs or all FUNCTIONs.
898 2011-01-05 Janus Weil <janus@gcc.gnu.org>
901 * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
902 'vtab' is initialized).
904 2011-01-05 Janus Weil <janus@gcc.gnu.org>
907 * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
908 assignment, set the _vptr component to the declared type.
910 2011-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
913 * resolve.c (resolve_allocate_deallocate): Follow references to
914 check for duplicate occurence of allocation/deallocation objects.
916 2011-01-05 Janus Weil <janus@gcc.gnu.org>
919 * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
920 of polymorphic allocatables according to their declared type.
922 2011-01-04 Janus Weil <janus@gcc.gnu.org>
925 * class.c (gfc_find_derived_vtab): Set the module field for the copying
926 routine to make sure it receives module name mangling.
928 2011-01-03 Jakub Jelinek <jakub@redhat.com>
930 * gfortranspec.c (lang_specific_driver): Update copyright notice
933 2011-01-03 Janus Weil <janus@gcc.gnu.org>
935 * intrinsic.texi (LEADZ): Fix example.
937 2011-01-02 Janus Weil <janus@gcc.gnu.org>
940 * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
944 Copyright (C) 2011 Free Software Foundation, Inc.
946 Copying and distribution of this file, with or without modification,
947 are permitted in any medium without royalty provided the copyright
948 notice and this notice are preserved.