1 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
4 * gfortran.h (struct gfc_undo_change_set): New field 'previous'.
5 (gfc_new_undo_checkpoint, gfc_drop_last_undo_checkpoint,
6 gfc_restore_last_undo_checkpoint): New prototypes.
7 * symbol.c (default_undo_chgset_var): Update initialization.
8 (single_undo_checkpoint_p, gfc_new_undo_checkpoint,
9 free_undo_change_set_data, pop_undo_change_set,
10 gfc_drop_last_undo_checkpoint, enforce_single_undo_checkpoint):
12 (save_symbol_data): Handle multiple change sets. Make sure old_symbol
13 field's previous value is not overwritten. Clear gfc_new field.
14 (restore_old_symbol): Restore previous old_symbol field.
15 (gfc_restore_last_undo_checkpoint): New function, using body renamed
16 from gfc_undo_symbols. Restore the previous change set as current one.
17 (gfc_undo_symbols): New body.
18 (gfc_commit_symbols, gfc_commit_symbol, gfc_enforce_clean_symbol_state):
19 Call enforce_single_undo_checkpoint.
20 (gfc_symbol_done_2): Ditto. Free change set data.
22 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
24 * symbol.c (restore_old_symbol): Fix thinko.
26 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
28 * symbol.c (gfc_undo_symbols): Move code...
29 (restore_old_symbol): ... here as a new function.
31 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
33 * Make-lang.in (F95_PARSER_OBJS): Add dependency to vec.h.
34 * gfortran.h: Include vec.h.
35 (gfc_undo_change_set): New struct.
36 * symbol.c (tentative_tbp): Remove struct.
37 (changed_syms, tentative_tbp_list): Remove variables.
38 (default_undo_chgset_var, latest_undo_chgset): New variables.
39 (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
40 gfc_commit_symbols, gfc_commit_symbol,
41 gfc_enforce_clean_symbol_state, gfc_get_typebound_proc):
42 Use latest_undo_chgset instead of changed_syms and tentative_tbp_list.
44 2013-03-01 Tobias Burnus <burnus@net-b.de>
47 * iresolve.c (resolve_bound): Use gfc_get_string instead of xstrdup.
48 * symbol.c (free_components): Free proc-pointer components.
50 2013-03-01 Tobias Burnus <burnus@net-b.de>
52 * trans-decl.c (gfc_trans_deferred_vars): Free expr after use.
53 * trans-io.c (build_dt): Ditto.
55 2013-02-24 Joseph Myers <joseph@codesourcery.com>
57 * resolve.c (generate_component_assignments): Don't use UTF-8
58 ligature in diagnostic.
60 2013-02-21 Janus Weil <janus@gcc.gnu.org>
63 * trans-array.c (structure_alloc_comps): Handle procedure-pointer
64 components with allocatable result.
66 2012-02-21 Tobias Burnus <burnus@net-b.de>
69 * gfortran.texi (Part II: Language Reference, Extensions,
70 Non-Fortran Main Program): Sort @menu to match actual section order.
71 * intrinsic.texi (Intrinsic Procedures): Ditto.
72 (C_F_POINTER, PRECISION): Move to the alphabetically correct place.
74 2013-02-15 Tobias Burnus <burnus@net-b.de>
75 Mikael Morin <mikael@gcc.gnu.org>
78 * simplify.c (gfc_simplify_matmul): Fix result shape
81 2013-02-15 Tobias Burnus <burnus@net-b.de>
84 * resolve.c (apply_default_init_local): Don't create an
85 initializer for a result variable.
87 2013-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
90 * gfortran.h (gfc_add_include_path): Add boolean argument
92 * scanner.c (gfc_add_include_path): Pass along warn argument
94 * options.c (gfc_post_options): Add true warn argument to
96 (gfc_handle_module_path_options): Likewise.
97 (gfc_handle_option): Also gfc_add_include_path for intrinsic
98 modules, without warning.
100 2013-02-14 Paul Thomas <pault@gcc.gnu.org>
101 Tobias Burnus <burnus@net-b.de>
104 * trans-decl.c (gfc_get_symbol_decl): Fix deferred-length
105 results for functions without extra result variable.
108 2013-01-30 Tobias Burnus <burnus@net-b.de>
111 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
112 results for functions without extra result variable.
114 2013-02-12 Janus Weil <janus@gcc.gnu.org>
117 * resolve.c (resolve_call): Do not check deferred procedures for
120 2013-02-09 Paul Thomas <pault@gcc.gnu.org>
123 * check.c (array_check): It is an error if a procedure is
126 2013-02-08 Mikael Morin <mikael@gcc.gnu.org>
129 * trans-types.c (gfc_get_function_type): Change a NULL backend_decl
130 to error_mark_node on entry. Detect recursive types. Build a variadic
131 procedure type if the type is recursive. Restore the initial
134 2013-02-07 Tobias Burnus <burnus@net-b.de>
137 * gfortran.texi (Standards): Mention TS29113.
138 (Varying Length Character): Mention deferred-length
140 (Fortran 2003 Status): Add unlimited polymorphic.
141 (TS 29113 Status): Add TYPE(*) and DIMENSION(..).
142 (C Interop): Update the section about TS29113.
144 2013-02-06 Paul Thomas <pault@gcc.gnu.org>
147 * trans-array.c (trans_array_constructor): Remove condition
148 'dynamic' = true if the loop ubound is a VAR_DECL.
150 2013-02-04 Paul Thomas <pault@gcc.gnu.org>
154 * trans-array.c (gfc_alloc_allocatable_for_assignment): Save
155 the lhs descriptor before it is modified for reallocation. Use
156 it to deallocate allocatable components in the reallocation
157 block. Nullify allocatable components for newly (re)allocated
160 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
163 * resolve.c (resolve_typebound_procedures): Recurse through
166 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
170 * gfortran.h (struct gfc_symbol): New field 'resolved'.
171 * resolve.c (resolve_fl_var_and_proc): Don't skip result symbols.
172 (resolve_symbol): Skip duplicate calls. Don't check the current
175 2013-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
179 * decl.c (gfc_match_end): Remove half-ready namespace
180 from parent if the end of a block is missing.
181 * parse.c (parse_module): Do not put namespace into
184 2013-01-30 Tobias Burnus <burnus@net-b.de>
187 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
188 results for functions without extra result variable.
190 2013-01-29 Janus Weil <janus@gcc.gnu.org>
191 Mikael Morin <mikael@gcc.gnu.org>
194 * gfortran.h (gfc_component): Delete members 'formal' and 'formal_ns'.
195 (gfc_copy_formal_args,gfc_copy_formal_args_ppc,gfc_expr_replace_symbols,
196 gfc_expr_replace_comp): Delete.
197 (gfc_sym_get_dummy_args): New prototype.
198 * dependency.c (gfc_check_fncall_dependency): Use
199 'gfc_sym_get_dummy_args'.
200 * expr.c (gfc_is_constant_expr): Ditto.
201 (replace_symbol,gfc_expr_replace_symbols,replace_comp,
202 gfc_expr_replace_comp): Deleted.
203 * frontend-passes.c (doloop_code,do_function): Use
204 'gfc_sym_get_dummy_args'.
205 * interface.c (gfc_check_operator_interface,gfc_compare_interfaces,
206 gfc_procedure_use,gfc_ppc_use,gfc_arglist_matches_symbol,
207 gfc_check_typebound_override): Ditto.
208 * module.c (MOD_VERSION): Bump module version.
209 (mio_component): Do not read/write 'formal' and 'formal_ns'.
210 * resolve.c (resolve_procedure_interface,resolve_fl_derived0): Do not
211 copy formal args, but just keep a pointer to the interface.
212 (resolve_function,resolve_call,resolve_typebound_generic_call,
213 resolve_ppc_call,resolve_expr_ppc,generate_component_assignments,
214 resolve_fl_procedure,gfc_resolve_finalizers,check_generic_tbp_ambiguity,
215 resolve_typebound_procedure,check_uop_procedure): Use
216 'gfc_sym_get_dummy_args'.
217 * symbol.c (free_components): Do not free 'formal' and 'formal_ns'.
218 (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Deleted.
219 (gfc_sym_get_dummy_args): New function.
220 * trans-array.c (get_array_charlen,gfc_walk_elemental_function_args):
221 Use 'gfc_sym_get_dummy_args'.
222 * trans-decl.c (build_function_decl,create_function_arglist,
223 build_entry_thunks,init_intent_out_dt,gfc_trans_deferred_vars,
224 add_argument_checking): Ditto.
225 * trans-expr.c (gfc_map_fcn_formal_to_actual,gfc_conv_procedure_call,
226 gfc_conv_statement_function): Ditto.
227 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
228 * trans-types.c (create_fn_spec,gfc_get_function_type): Ditto.
230 2013-01-28 Tobias Burnus <burnus@net-b.de>
231 Mikael Morin <mikael@gcc.gnu.org>
234 * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
236 (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
237 * decl.c (gfc_match_data_decl): Ditto.
238 (variable_decl): Remove undeclared type error.
239 (gfc_match_import): Use renamed instead of original name.
241 2013-01-27 Paul Thomas <pault@gcc.gnu.org>
245 * gfortran.h : Add associate_var to symbol_attr.
246 * resolve.c (resolve_assoc_var): Set associate_var attribute.
247 If the target class_ok is set, set it for the associate
249 * check.c (allocatable_check): Associate variables should not
250 have the allocatable attribute even if their symbols do.
251 * class.c (gfc_build_class_symbol): Symbols with associate_var
252 set will always have a good class container.
254 2013-01-23 Janus Weil <janus@gcc.gnu.org>
257 * resolve.c (resolve_select): Add argument 'select_type', reject
258 non-scalar expressions.
259 (resolve_select_type,resolve_code): Pass new argument to
262 2013-01-23 Jakub Jelinek <jakub@redhat.com>
265 * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
266 and DECL_IGNORED_P on select_type_temporary and don't set
269 2013-01-21 Thomas Koenig <tkoenig@gcc.gnu.org>
272 * scanner.c (add_path_to_list): Copy path to temporary and strip
273 trailing directory separators before calling stat().
275 2013-01-17 Richard Biener <rguenther@suse.de>
277 * trans-stmt.c (gfc_trans_do): Conditionally compute countm1
278 dependent on sign of step, avoids repeated evaluation of
279 step sign test. Avoid undefined overflow issues by using unsigned
282 2013-01-16 Janus Weil <janus@gcc.gnu.org>
285 * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
288 2013-01-16 Jakub Jelinek <jakub@redhat.com>
289 Tobias Burnus <burnus@net-b.de>
292 * lang.opt (fintrinsic-modules-path): Don't accept Joined.
293 (fintrinsic-modules-path=): New.
294 * options.c (gfc_handle_option, gfc_get_option_string,
295 gfc_get_option_string): Handle the latter.
297 2013-01-16 Jakub Jelinek <jakub@redhat.com>
300 * trans-stmt.c (gfc_trans_do): Put countm1-- before conditional
301 and use value of countm1 before the decrement in the condition.
303 2013-01-15 Paul Thomas <pault@gcc.gnu.org>
306 * expr.c (gfc_check_pointer_assign): Check for presence of
307 's2' before using it.
309 2013-01-14 Thomas Koenig <tkoenig@gcc.gnu.org>
312 * frontend-passes.c (optimize_reduction): New function,
314 (callback_reduction): Likewise.
315 (gfc_run_passes): Also run optimize_reduction.
316 (copy_walk_reduction_arg): New function.
317 (dummy_code_callback): New function.
319 2013-01-13 Jakub Jelinek <jakub@redhat.com>
322 * trans-expr.c (gfc_conv_structure): Call
323 unshare_expr_without_location on the ctor elements.
325 2013-01-13 Paul Thomas <pault@gcc.gnu.org>
328 * expr.c (gfc_check_pointer_assign): Ensure that both lvalue
329 and rvalue interfaces are presented to gfc_compare_interfaces.
330 Simplify references to interface names by using the symbols
331 themselves. Call gfc_compare_interfaces with s1 and s2 inter-
332 changed to overcome the asymmetry of this function. Do not
333 repeat the check for the presence of s1 and s2.
335 2013-01-12 Janus Weil <janus@gcc.gnu.org>
338 * trans-array.c (gfc_conv_array_parameter): No packing was done for
339 full arrays of derived type.
341 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
344 * class.c (get_unique_type_string): Change $tar to STAR and
345 replace sprintf by strcpy where there is no formatting.
346 * decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
348 2013-01-09 Mikael Morin <mikael@gcc.gnu.org>
351 * module.c (check_for_ambiguous): Get the current program unit using
354 2013-01-09 Tobias Burnus <burnus@net-b.de>
357 * resolve.c (resolve_symbol): Reject non-C_Bool logicals
358 in BIND(C) procedures with -std=f*.
360 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
363 * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
364 character function arguments to elemental procedures in
367 2013-01-07 Tobias Burnus <burnus@net-b.de>
370 * gfortran.h (gfc_check_assign_symbol): Update prototype.
371 * decl.c (add_init_expr_to_sym, do_parm): Update call.
372 * expr.c (gfc_check_assign_symbol): Handle BT_CLASS and
373 improve error location; support components.
374 (gfc_check_pointer_assign): Handle component assignments.
375 * resolve.c (resolve_fl_derived0): Call gfc_check_assign_symbol.
376 (resolve_values): Update call.
377 (resolve_structure_cons): Avoid double diagnostic.
379 2013-01-07 Tobias Burnus <burnus@net-b.de>
380 Thomas Koenig <tkoenig@gcc.gnu.org>
383 * expr.c (gfc_build_intrinsic_call): Avoid clashes
384 with user's procedures.
385 * gfortran.h (gfc_build_intrinsic_call): Update prototype.
386 * simplify.c (gfc_simplify_size): Update call.
387 * class.c (finalization_scalarizer, finalization_get_offset,
388 finalizer_insert_packed_call, generate_finalization_wrapper):
389 Clean up by using gfc_build_intrinsic_call.
391 2013-01-07 Tobias Burnus <burnus@net-b.de>
394 * resolve.c (resolve_select_type): Reject intrinsic types for
395 a non-unlimited-polymorphic selector.
397 2013-01-06 Paul Thomas <pault@gcc.gnu.org>
402 * trans-array.c (build_array_ref): Check the TYPE_CANONICAL
403 to see if it is GFC_CLASS_TYPE_P.
404 * trans-expr.c (gfc_get_vptr_from_expr): The same.
405 (gfc_conv_class_to_class): If the types are not the same,
406 cast parmese->expr to the type of ctree.
407 * trans-types.c (gfc_get_derived_type): GFC_CLASS_TYPE_P of
408 CLASS components must be set.
410 2013-01-06 Mikael Morin <mikael@gcc.gnu.org>
415 * module.c (read_module): Don't reuse local symtree if the associated
416 symbol isn't exactly the one wanted. Don't reuse local symtree if it is
418 * resolve.c (resolve_call): Use symtree's name instead of symbol's to
421 2013-01-05 Steven G. Kargl <kargl@gcc.gnu.org>
422 Mikael Morin <mikael@gcc.gnu.org>
425 * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
427 * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
429 2013-01-05 Tobias Burnus <burnus@net-b.de>
431 * class.c (finalize_component): Used passed offset expr.
432 (finalization_get_offset): New static function.
433 (finalizer_insert_packed_call, generate_finalization_wrapper): Use it
434 to handle noncontiguous arrays.
436 2013-01-04 Tobias Burnus <burnus@net-b.de>
438 * trans.c (gfc_build_final_call): New function.
439 * trans.h (gfc_build_final_call, gfc_conv_scalar_to_descriptor):
440 New function prototypes.
441 * trans-expr.c (gfc_conv_scalar_to_descriptor): Renamed from
442 conv_scalar_to_descriptor, removed static attribute.
443 (gfc_conv_procedure_call): Honor renaming.
445 2013-01-04 Tobias Burnus <burnus@net-b.de>
447 * intrinsic.c (add_functions): New internal intrinsic
448 function GFC_PREFIX ("stride").
449 * gfortran.h (gfc_isym_id): Add GFC_ISYM_STRIDE.
450 * intrinsic.h (gfc_resolve_stride): New prototypes.
451 * iresolve.c (gfc_resolve_stride): New function.
452 * trans-intrinsic.c (conv_intrinsic_stride): New static
454 (gfc_conv_intrinsic_function): Use it.
456 2013-01-04 Tobias Burnus <burnus@net-b.de>
458 * class.c (gfc_find_intrinsic_vtab): Add _final
460 * decl.c (gfc_match_null): Remove superfluous
461 variadic argument to gfc_match.
463 2013-01-04 Paul Thomas <pault@gcc.gnu.org>
466 * match.c (copy_ts_from_selector_to_associate): Remove call to
467 gfc_resolve_expr and replace it with explicit setting of the
468 array reference type.
469 * resolve.c (resolve_select_type): It is an error if the
470 selector is coindexed.
472 2013-01-04 Tobias Burnus <burnus@net-b.de>
475 * decl.c (gfc_match_null): Parse and reject MOLD.
477 2013-01-04 Tobias Burnus <burnus@net-b.de>
481 * class.c (gfc_class_null_initializer): Fix finding the vtab.
482 (gfc_find_intrinsic_vtab): Use BT_VOID for some components.
484 2013-01-03 Janus Weil <janus@gcc.gnu.org>
487 * expr.c (gfc_check_assign): Use 'gfc_expr_attr' to evaluate attributes
488 of rvalue. Correct hyphenation in error message.
490 2013-01-03 Jakub Jelinek <jakub@redhat.com>
492 * gfortranspec.c (lang_specific_driver): Update copyright notice
495 Copyright (C) 2013 Free Software Foundation, Inc.
497 Copying and distribution of this file, with or without modification,
498 are permitted in any medium without royalty provided the copyright
499 notice and this notice are preserved.