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