1 2013-03-18 Tobias Burnus <burnus@net-b.de>
3 * gfortran.h (gfc_option_t): Remove flag_whole_file.
4 * invoke.texi (-fno-whole-file): Remove.
5 * lang.opt (fwhole-file): Change to Ignore.
6 * options.c (gfc_init_options, gfc_post_options,
7 gfc_handle_option): Remove !flag_whole_file handling
8 * parse.c (resolve_all_program_units, translate_all_program_units,
9 gfc_parse_file): Ditto.
10 * resolve.c (resolve_global_procedure): Ditto.
11 * trans-decl.c (gfc_get_symbol_decl, gfc_get_extern_function_decl,
12 gfc_create_module_variable): Ditto.
13 * trans-types.c (gfc_get_derived_type): Ditto.
15 2013-03-15 Tobias Burnus <burnus@net-b.de>
18 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Pack arrays
19 if they are not simply contiguous.
21 2013-03-11 Tobias Burnus <burnus@net-b.de>
23 * gfortran.texi (STRUCTURE and RECORD): State more clearly how
24 to convert them into derived types.
26 2013-03-10 Paul Thomas <pault@gcc.gnu.org>
29 * expr.c (gfc_default_initializer): Check that a class declared
30 type has any components.
31 * resolve.c (resolve_fl_derived0): On failing the test for C437
32 set the type to BT_UNKNOWN to prevent repeat error messages.
34 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
37 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer dereference.
39 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
42 * array.c (gfc_match_array_constructor): Set a checkpoint before
43 matching a typespec. Drop it on success, restore it otherwise.
45 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
48 * gfortran.h (struct gfc_undo_change_set): New field 'previous'.
49 (gfc_new_undo_checkpoint, gfc_drop_last_undo_checkpoint,
50 gfc_restore_last_undo_checkpoint): New prototypes.
51 * symbol.c (default_undo_chgset_var): Update initialization.
52 (single_undo_checkpoint_p, gfc_new_undo_checkpoint,
53 free_undo_change_set_data, pop_undo_change_set,
54 gfc_drop_last_undo_checkpoint, enforce_single_undo_checkpoint):
56 (save_symbol_data): Handle multiple change sets. Make sure old_symbol
57 field's previous value is not overwritten. Clear gfc_new field.
58 (restore_old_symbol): Restore previous old_symbol field.
59 (gfc_restore_last_undo_checkpoint): New function, using body renamed
60 from gfc_undo_symbols. Restore the previous change set as current one.
61 (gfc_undo_symbols): New body.
62 (gfc_commit_symbols, gfc_commit_symbol, gfc_enforce_clean_symbol_state):
63 Call enforce_single_undo_checkpoint.
64 (gfc_symbol_done_2): Ditto. Free change set data.
66 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
68 * symbol.c (restore_old_symbol): Fix thinko.
70 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
72 * symbol.c (gfc_undo_symbols): Move code...
73 (restore_old_symbol): ... here as a new function.
75 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
77 * Make-lang.in (F95_PARSER_OBJS): Add dependency to vec.h.
78 * gfortran.h: Include vec.h.
79 (gfc_undo_change_set): New struct.
80 * symbol.c (tentative_tbp): Remove struct.
81 (changed_syms, tentative_tbp_list): Remove variables.
82 (default_undo_chgset_var, latest_undo_chgset): New variables.
83 (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
84 gfc_commit_symbols, gfc_commit_symbol,
85 gfc_enforce_clean_symbol_state, gfc_get_typebound_proc):
86 Use latest_undo_chgset instead of changed_syms and tentative_tbp_list.
88 2013-03-01 Tobias Burnus <burnus@net-b.de>
91 * iresolve.c (resolve_bound): Use gfc_get_string instead of xstrdup.
92 * symbol.c (free_components): Free proc-pointer components.
94 2013-03-01 Tobias Burnus <burnus@net-b.de>
96 * trans-decl.c (gfc_trans_deferred_vars): Free expr after use.
97 * trans-io.c (build_dt): Ditto.
99 2013-02-24 Joseph Myers <joseph@codesourcery.com>
101 * resolve.c (generate_component_assignments): Don't use UTF-8
102 ligature in diagnostic.
104 2013-02-21 Janus Weil <janus@gcc.gnu.org>
107 * trans-array.c (structure_alloc_comps): Handle procedure-pointer
108 components with allocatable result.
110 2012-02-21 Tobias Burnus <burnus@net-b.de>
113 * gfortran.texi (Part II: Language Reference, Extensions,
114 Non-Fortran Main Program): Sort @menu to match actual section order.
115 * intrinsic.texi (Intrinsic Procedures): Ditto.
116 (C_F_POINTER, PRECISION): Move to the alphabetically correct place.
118 2013-02-15 Tobias Burnus <burnus@net-b.de>
119 Mikael Morin <mikael@gcc.gnu.org>
122 * simplify.c (gfc_simplify_matmul): Fix result shape
125 2013-02-15 Tobias Burnus <burnus@net-b.de>
128 * resolve.c (apply_default_init_local): Don't create an
129 initializer for a result variable.
131 2013-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
134 * gfortran.h (gfc_add_include_path): Add boolean argument
136 * scanner.c (gfc_add_include_path): Pass along warn argument
138 * options.c (gfc_post_options): Add true warn argument to
139 gfc_add_include_path.
140 (gfc_handle_module_path_options): Likewise.
141 (gfc_handle_option): Also gfc_add_include_path for intrinsic
142 modules, without warning.
144 2013-02-14 Paul Thomas <pault@gcc.gnu.org>
145 Tobias Burnus <burnus@net-b.de>
148 * trans-decl.c (gfc_get_symbol_decl): Fix deferred-length
149 results for functions without extra result variable.
152 2013-01-30 Tobias Burnus <burnus@net-b.de>
155 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
156 results for functions without extra result variable.
158 2013-02-12 Janus Weil <janus@gcc.gnu.org>
161 * resolve.c (resolve_call): Do not check deferred procedures for
164 2013-02-09 Paul Thomas <pault@gcc.gnu.org>
167 * check.c (array_check): It is an error if a procedure is
170 2013-02-08 Mikael Morin <mikael@gcc.gnu.org>
173 * trans-types.c (gfc_get_function_type): Change a NULL backend_decl
174 to error_mark_node on entry. Detect recursive types. Build a variadic
175 procedure type if the type is recursive. Restore the initial
178 2013-02-07 Tobias Burnus <burnus@net-b.de>
181 * gfortran.texi (Standards): Mention TS29113.
182 (Varying Length Character): Mention deferred-length
184 (Fortran 2003 Status): Add unlimited polymorphic.
185 (TS 29113 Status): Add TYPE(*) and DIMENSION(..).
186 (C Interop): Update the section about TS29113.
188 2013-02-06 Paul Thomas <pault@gcc.gnu.org>
191 * trans-array.c (trans_array_constructor): Remove condition
192 'dynamic' = true if the loop ubound is a VAR_DECL.
194 2013-02-04 Paul Thomas <pault@gcc.gnu.org>
198 * trans-array.c (gfc_alloc_allocatable_for_assignment): Save
199 the lhs descriptor before it is modified for reallocation. Use
200 it to deallocate allocatable components in the reallocation
201 block. Nullify allocatable components for newly (re)allocated
204 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
207 * resolve.c (resolve_typebound_procedures): Recurse through
210 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
214 * gfortran.h (struct gfc_symbol): New field 'resolved'.
215 * resolve.c (resolve_fl_var_and_proc): Don't skip result symbols.
216 (resolve_symbol): Skip duplicate calls. Don't check the current
219 2013-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
223 * decl.c (gfc_match_end): Remove half-ready namespace
224 from parent if the end of a block is missing.
225 * parse.c (parse_module): Do not put namespace into
228 2013-01-30 Tobias Burnus <burnus@net-b.de>
231 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
232 results for functions without extra result variable.
234 2013-01-29 Janus Weil <janus@gcc.gnu.org>
235 Mikael Morin <mikael@gcc.gnu.org>
238 * gfortran.h (gfc_component): Delete members 'formal' and 'formal_ns'.
239 (gfc_copy_formal_args,gfc_copy_formal_args_ppc,gfc_expr_replace_symbols,
240 gfc_expr_replace_comp): Delete.
241 (gfc_sym_get_dummy_args): New prototype.
242 * dependency.c (gfc_check_fncall_dependency): Use
243 'gfc_sym_get_dummy_args'.
244 * expr.c (gfc_is_constant_expr): Ditto.
245 (replace_symbol,gfc_expr_replace_symbols,replace_comp,
246 gfc_expr_replace_comp): Deleted.
247 * frontend-passes.c (doloop_code,do_function): Use
248 'gfc_sym_get_dummy_args'.
249 * interface.c (gfc_check_operator_interface,gfc_compare_interfaces,
250 gfc_procedure_use,gfc_ppc_use,gfc_arglist_matches_symbol,
251 gfc_check_typebound_override): Ditto.
252 * module.c (MOD_VERSION): Bump module version.
253 (mio_component): Do not read/write 'formal' and 'formal_ns'.
254 * resolve.c (resolve_procedure_interface,resolve_fl_derived0): Do not
255 copy formal args, but just keep a pointer to the interface.
256 (resolve_function,resolve_call,resolve_typebound_generic_call,
257 resolve_ppc_call,resolve_expr_ppc,generate_component_assignments,
258 resolve_fl_procedure,gfc_resolve_finalizers,check_generic_tbp_ambiguity,
259 resolve_typebound_procedure,check_uop_procedure): Use
260 'gfc_sym_get_dummy_args'.
261 * symbol.c (free_components): Do not free 'formal' and 'formal_ns'.
262 (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Deleted.
263 (gfc_sym_get_dummy_args): New function.
264 * trans-array.c (get_array_charlen,gfc_walk_elemental_function_args):
265 Use 'gfc_sym_get_dummy_args'.
266 * trans-decl.c (build_function_decl,create_function_arglist,
267 build_entry_thunks,init_intent_out_dt,gfc_trans_deferred_vars,
268 add_argument_checking): Ditto.
269 * trans-expr.c (gfc_map_fcn_formal_to_actual,gfc_conv_procedure_call,
270 gfc_conv_statement_function): Ditto.
271 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
272 * trans-types.c (create_fn_spec,gfc_get_function_type): Ditto.
274 2013-01-28 Tobias Burnus <burnus@net-b.de>
275 Mikael Morin <mikael@gcc.gnu.org>
278 * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
280 (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
281 * decl.c (gfc_match_data_decl): Ditto.
282 (variable_decl): Remove undeclared type error.
283 (gfc_match_import): Use renamed instead of original name.
285 2013-01-27 Paul Thomas <pault@gcc.gnu.org>
289 * gfortran.h : Add associate_var to symbol_attr.
290 * resolve.c (resolve_assoc_var): Set associate_var attribute.
291 If the target class_ok is set, set it for the associate
293 * check.c (allocatable_check): Associate variables should not
294 have the allocatable attribute even if their symbols do.
295 * class.c (gfc_build_class_symbol): Symbols with associate_var
296 set will always have a good class container.
298 2013-01-23 Janus Weil <janus@gcc.gnu.org>
301 * resolve.c (resolve_select): Add argument 'select_type', reject
302 non-scalar expressions.
303 (resolve_select_type,resolve_code): Pass new argument to
306 2013-01-23 Jakub Jelinek <jakub@redhat.com>
309 * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
310 and DECL_IGNORED_P on select_type_temporary and don't set
313 2013-01-21 Thomas Koenig <tkoenig@gcc.gnu.org>
316 * scanner.c (add_path_to_list): Copy path to temporary and strip
317 trailing directory separators before calling stat().
319 2013-01-17 Richard Biener <rguenther@suse.de>
321 * trans-stmt.c (gfc_trans_do): Conditionally compute countm1
322 dependent on sign of step, avoids repeated evaluation of
323 step sign test. Avoid undefined overflow issues by using unsigned
326 2013-01-16 Janus Weil <janus@gcc.gnu.org>
329 * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
332 2013-01-16 Jakub Jelinek <jakub@redhat.com>
333 Tobias Burnus <burnus@net-b.de>
336 * lang.opt (fintrinsic-modules-path): Don't accept Joined.
337 (fintrinsic-modules-path=): New.
338 * options.c (gfc_handle_option, gfc_get_option_string,
339 gfc_get_option_string): Handle the latter.
341 2013-01-16 Jakub Jelinek <jakub@redhat.com>
344 * trans-stmt.c (gfc_trans_do): Put countm1-- before conditional
345 and use value of countm1 before the decrement in the condition.
347 2013-01-15 Paul Thomas <pault@gcc.gnu.org>
350 * expr.c (gfc_check_pointer_assign): Check for presence of
351 's2' before using it.
353 2013-01-14 Thomas Koenig <tkoenig@gcc.gnu.org>
356 * frontend-passes.c (optimize_reduction): New function,
358 (callback_reduction): Likewise.
359 (gfc_run_passes): Also run optimize_reduction.
360 (copy_walk_reduction_arg): New function.
361 (dummy_code_callback): New function.
363 2013-01-13 Jakub Jelinek <jakub@redhat.com>
366 * trans-expr.c (gfc_conv_structure): Call
367 unshare_expr_without_location on the ctor elements.
369 2013-01-13 Paul Thomas <pault@gcc.gnu.org>
372 * expr.c (gfc_check_pointer_assign): Ensure that both lvalue
373 and rvalue interfaces are presented to gfc_compare_interfaces.
374 Simplify references to interface names by using the symbols
375 themselves. Call gfc_compare_interfaces with s1 and s2 inter-
376 changed to overcome the asymmetry of this function. Do not
377 repeat the check for the presence of s1 and s2.
379 2013-01-12 Janus Weil <janus@gcc.gnu.org>
382 * trans-array.c (gfc_conv_array_parameter): No packing was done for
383 full arrays of derived type.
385 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
388 * class.c (get_unique_type_string): Change $tar to STAR and
389 replace sprintf by strcpy where there is no formatting.
390 * decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
392 2013-01-09 Mikael Morin <mikael@gcc.gnu.org>
395 * module.c (check_for_ambiguous): Get the current program unit using
398 2013-01-09 Tobias Burnus <burnus@net-b.de>
401 * resolve.c (resolve_symbol): Reject non-C_Bool logicals
402 in BIND(C) procedures with -std=f*.
404 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
407 * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
408 character function arguments to elemental procedures in
411 2013-01-07 Tobias Burnus <burnus@net-b.de>
414 * gfortran.h (gfc_check_assign_symbol): Update prototype.
415 * decl.c (add_init_expr_to_sym, do_parm): Update call.
416 * expr.c (gfc_check_assign_symbol): Handle BT_CLASS and
417 improve error location; support components.
418 (gfc_check_pointer_assign): Handle component assignments.
419 * resolve.c (resolve_fl_derived0): Call gfc_check_assign_symbol.
420 (resolve_values): Update call.
421 (resolve_structure_cons): Avoid double diagnostic.
423 2013-01-07 Tobias Burnus <burnus@net-b.de>
424 Thomas Koenig <tkoenig@gcc.gnu.org>
427 * expr.c (gfc_build_intrinsic_call): Avoid clashes
428 with user's procedures.
429 * gfortran.h (gfc_build_intrinsic_call): Update prototype.
430 * simplify.c (gfc_simplify_size): Update call.
431 * class.c (finalization_scalarizer, finalization_get_offset,
432 finalizer_insert_packed_call, generate_finalization_wrapper):
433 Clean up by using gfc_build_intrinsic_call.
435 2013-01-07 Tobias Burnus <burnus@net-b.de>
438 * resolve.c (resolve_select_type): Reject intrinsic types for
439 a non-unlimited-polymorphic selector.
441 2013-01-06 Paul Thomas <pault@gcc.gnu.org>
446 * trans-array.c (build_array_ref): Check the TYPE_CANONICAL
447 to see if it is GFC_CLASS_TYPE_P.
448 * trans-expr.c (gfc_get_vptr_from_expr): The same.
449 (gfc_conv_class_to_class): If the types are not the same,
450 cast parmese->expr to the type of ctree.
451 * trans-types.c (gfc_get_derived_type): GFC_CLASS_TYPE_P of
452 CLASS components must be set.
454 2013-01-06 Mikael Morin <mikael@gcc.gnu.org>
459 * module.c (read_module): Don't reuse local symtree if the associated
460 symbol isn't exactly the one wanted. Don't reuse local symtree if it is
462 * resolve.c (resolve_call): Use symtree's name instead of symbol's to
465 2013-01-05 Steven G. Kargl <kargl@gcc.gnu.org>
466 Mikael Morin <mikael@gcc.gnu.org>
469 * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
471 * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
473 2013-01-05 Tobias Burnus <burnus@net-b.de>
475 * class.c (finalize_component): Used passed offset expr.
476 (finalization_get_offset): New static function.
477 (finalizer_insert_packed_call, generate_finalization_wrapper): Use it
478 to handle noncontiguous arrays.
480 2013-01-04 Tobias Burnus <burnus@net-b.de>
482 * trans.c (gfc_build_final_call): New function.
483 * trans.h (gfc_build_final_call, gfc_conv_scalar_to_descriptor):
484 New function prototypes.
485 * trans-expr.c (gfc_conv_scalar_to_descriptor): Renamed from
486 conv_scalar_to_descriptor, removed static attribute.
487 (gfc_conv_procedure_call): Honor renaming.
489 2013-01-04 Tobias Burnus <burnus@net-b.de>
491 * intrinsic.c (add_functions): New internal intrinsic
492 function GFC_PREFIX ("stride").
493 * gfortran.h (gfc_isym_id): Add GFC_ISYM_STRIDE.
494 * intrinsic.h (gfc_resolve_stride): New prototypes.
495 * iresolve.c (gfc_resolve_stride): New function.
496 * trans-intrinsic.c (conv_intrinsic_stride): New static
498 (gfc_conv_intrinsic_function): Use it.
500 2013-01-04 Tobias Burnus <burnus@net-b.de>
502 * class.c (gfc_find_intrinsic_vtab): Add _final
504 * decl.c (gfc_match_null): Remove superfluous
505 variadic argument to gfc_match.
507 2013-01-04 Paul Thomas <pault@gcc.gnu.org>
510 * match.c (copy_ts_from_selector_to_associate): Remove call to
511 gfc_resolve_expr and replace it with explicit setting of the
512 array reference type.
513 * resolve.c (resolve_select_type): It is an error if the
514 selector is coindexed.
516 2013-01-04 Tobias Burnus <burnus@net-b.de>
519 * decl.c (gfc_match_null): Parse and reject MOLD.
521 2013-01-04 Tobias Burnus <burnus@net-b.de>
525 * class.c (gfc_class_null_initializer): Fix finding the vtab.
526 (gfc_find_intrinsic_vtab): Use BT_VOID for some components.
528 2013-01-03 Janus Weil <janus@gcc.gnu.org>
531 * expr.c (gfc_check_assign): Use 'gfc_expr_attr' to evaluate attributes
532 of rvalue. Correct hyphenation in error message.
534 2013-01-03 Jakub Jelinek <jakub@redhat.com>
536 * gfortranspec.c (lang_specific_driver): Update copyright notice
539 Copyright (C) 2013 Free Software Foundation, Inc.
541 Copying and distribution of this file, with or without modification,
542 are permitted in any medium without royalty provided the copyright
543 notice and this notice are preserved.