1 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
4 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer dereference.
6 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
9 * array.c (gfc_match_array_constructor): Set a checkpoint before
10 matching a typespec. Drop it on success, restore it otherwise.
12 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
15 * gfortran.h (struct gfc_undo_change_set): New field 'previous'.
16 (gfc_new_undo_checkpoint, gfc_drop_last_undo_checkpoint,
17 gfc_restore_last_undo_checkpoint): New prototypes.
18 * symbol.c (default_undo_chgset_var): Update initialization.
19 (single_undo_checkpoint_p, gfc_new_undo_checkpoint,
20 free_undo_change_set_data, pop_undo_change_set,
21 gfc_drop_last_undo_checkpoint, enforce_single_undo_checkpoint):
23 (save_symbol_data): Handle multiple change sets. Make sure old_symbol
24 field's previous value is not overwritten. Clear gfc_new field.
25 (restore_old_symbol): Restore previous old_symbol field.
26 (gfc_restore_last_undo_checkpoint): New function, using body renamed
27 from gfc_undo_symbols. Restore the previous change set as current one.
28 (gfc_undo_symbols): New body.
29 (gfc_commit_symbols, gfc_commit_symbol, gfc_enforce_clean_symbol_state):
30 Call enforce_single_undo_checkpoint.
31 (gfc_symbol_done_2): Ditto. Free change set data.
33 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
35 * symbol.c (restore_old_symbol): Fix thinko.
37 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
39 * symbol.c (gfc_undo_symbols): Move code...
40 (restore_old_symbol): ... here as a new function.
42 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
44 * Make-lang.in (F95_PARSER_OBJS): Add dependency to vec.h.
45 * gfortran.h: Include vec.h.
46 (gfc_undo_change_set): New struct.
47 * symbol.c (tentative_tbp): Remove struct.
48 (changed_syms, tentative_tbp_list): Remove variables.
49 (default_undo_chgset_var, latest_undo_chgset): New variables.
50 (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
51 gfc_commit_symbols, gfc_commit_symbol,
52 gfc_enforce_clean_symbol_state, gfc_get_typebound_proc):
53 Use latest_undo_chgset instead of changed_syms and tentative_tbp_list.
55 2013-03-01 Tobias Burnus <burnus@net-b.de>
58 * iresolve.c (resolve_bound): Use gfc_get_string instead of xstrdup.
59 * symbol.c (free_components): Free proc-pointer components.
61 2013-03-01 Tobias Burnus <burnus@net-b.de>
63 * trans-decl.c (gfc_trans_deferred_vars): Free expr after use.
64 * trans-io.c (build_dt): Ditto.
66 2013-02-24 Joseph Myers <joseph@codesourcery.com>
68 * resolve.c (generate_component_assignments): Don't use UTF-8
69 ligature in diagnostic.
71 2013-02-21 Janus Weil <janus@gcc.gnu.org>
74 * trans-array.c (structure_alloc_comps): Handle procedure-pointer
75 components with allocatable result.
77 2012-02-21 Tobias Burnus <burnus@net-b.de>
80 * gfortran.texi (Part II: Language Reference, Extensions,
81 Non-Fortran Main Program): Sort @menu to match actual section order.
82 * intrinsic.texi (Intrinsic Procedures): Ditto.
83 (C_F_POINTER, PRECISION): Move to the alphabetically correct place.
85 2013-02-15 Tobias Burnus <burnus@net-b.de>
86 Mikael Morin <mikael@gcc.gnu.org>
89 * simplify.c (gfc_simplify_matmul): Fix result shape
92 2013-02-15 Tobias Burnus <burnus@net-b.de>
95 * resolve.c (apply_default_init_local): Don't create an
96 initializer for a result variable.
98 2013-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
101 * gfortran.h (gfc_add_include_path): Add boolean argument
103 * scanner.c (gfc_add_include_path): Pass along warn argument
105 * options.c (gfc_post_options): Add true warn argument to
106 gfc_add_include_path.
107 (gfc_handle_module_path_options): Likewise.
108 (gfc_handle_option): Also gfc_add_include_path for intrinsic
109 modules, without warning.
111 2013-02-14 Paul Thomas <pault@gcc.gnu.org>
112 Tobias Burnus <burnus@net-b.de>
115 * trans-decl.c (gfc_get_symbol_decl): Fix deferred-length
116 results for functions without extra result variable.
119 2013-01-30 Tobias Burnus <burnus@net-b.de>
122 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
123 results for functions without extra result variable.
125 2013-02-12 Janus Weil <janus@gcc.gnu.org>
128 * resolve.c (resolve_call): Do not check deferred procedures for
131 2013-02-09 Paul Thomas <pault@gcc.gnu.org>
134 * check.c (array_check): It is an error if a procedure is
137 2013-02-08 Mikael Morin <mikael@gcc.gnu.org>
140 * trans-types.c (gfc_get_function_type): Change a NULL backend_decl
141 to error_mark_node on entry. Detect recursive types. Build a variadic
142 procedure type if the type is recursive. Restore the initial
145 2013-02-07 Tobias Burnus <burnus@net-b.de>
148 * gfortran.texi (Standards): Mention TS29113.
149 (Varying Length Character): Mention deferred-length
151 (Fortran 2003 Status): Add unlimited polymorphic.
152 (TS 29113 Status): Add TYPE(*) and DIMENSION(..).
153 (C Interop): Update the section about TS29113.
155 2013-02-06 Paul Thomas <pault@gcc.gnu.org>
158 * trans-array.c (trans_array_constructor): Remove condition
159 'dynamic' = true if the loop ubound is a VAR_DECL.
161 2013-02-04 Paul Thomas <pault@gcc.gnu.org>
165 * trans-array.c (gfc_alloc_allocatable_for_assignment): Save
166 the lhs descriptor before it is modified for reallocation. Use
167 it to deallocate allocatable components in the reallocation
168 block. Nullify allocatable components for newly (re)allocated
171 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
174 * resolve.c (resolve_typebound_procedures): Recurse through
177 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
181 * gfortran.h (struct gfc_symbol): New field 'resolved'.
182 * resolve.c (resolve_fl_var_and_proc): Don't skip result symbols.
183 (resolve_symbol): Skip duplicate calls. Don't check the current
186 2013-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
190 * decl.c (gfc_match_end): Remove half-ready namespace
191 from parent if the end of a block is missing.
192 * parse.c (parse_module): Do not put namespace into
195 2013-01-30 Tobias Burnus <burnus@net-b.de>
198 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
199 results for functions without extra result variable.
201 2013-01-29 Janus Weil <janus@gcc.gnu.org>
202 Mikael Morin <mikael@gcc.gnu.org>
205 * gfortran.h (gfc_component): Delete members 'formal' and 'formal_ns'.
206 (gfc_copy_formal_args,gfc_copy_formal_args_ppc,gfc_expr_replace_symbols,
207 gfc_expr_replace_comp): Delete.
208 (gfc_sym_get_dummy_args): New prototype.
209 * dependency.c (gfc_check_fncall_dependency): Use
210 'gfc_sym_get_dummy_args'.
211 * expr.c (gfc_is_constant_expr): Ditto.
212 (replace_symbol,gfc_expr_replace_symbols,replace_comp,
213 gfc_expr_replace_comp): Deleted.
214 * frontend-passes.c (doloop_code,do_function): Use
215 'gfc_sym_get_dummy_args'.
216 * interface.c (gfc_check_operator_interface,gfc_compare_interfaces,
217 gfc_procedure_use,gfc_ppc_use,gfc_arglist_matches_symbol,
218 gfc_check_typebound_override): Ditto.
219 * module.c (MOD_VERSION): Bump module version.
220 (mio_component): Do not read/write 'formal' and 'formal_ns'.
221 * resolve.c (resolve_procedure_interface,resolve_fl_derived0): Do not
222 copy formal args, but just keep a pointer to the interface.
223 (resolve_function,resolve_call,resolve_typebound_generic_call,
224 resolve_ppc_call,resolve_expr_ppc,generate_component_assignments,
225 resolve_fl_procedure,gfc_resolve_finalizers,check_generic_tbp_ambiguity,
226 resolve_typebound_procedure,check_uop_procedure): Use
227 'gfc_sym_get_dummy_args'.
228 * symbol.c (free_components): Do not free 'formal' and 'formal_ns'.
229 (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Deleted.
230 (gfc_sym_get_dummy_args): New function.
231 * trans-array.c (get_array_charlen,gfc_walk_elemental_function_args):
232 Use 'gfc_sym_get_dummy_args'.
233 * trans-decl.c (build_function_decl,create_function_arglist,
234 build_entry_thunks,init_intent_out_dt,gfc_trans_deferred_vars,
235 add_argument_checking): Ditto.
236 * trans-expr.c (gfc_map_fcn_formal_to_actual,gfc_conv_procedure_call,
237 gfc_conv_statement_function): Ditto.
238 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
239 * trans-types.c (create_fn_spec,gfc_get_function_type): Ditto.
241 2013-01-28 Tobias Burnus <burnus@net-b.de>
242 Mikael Morin <mikael@gcc.gnu.org>
245 * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
247 (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
248 * decl.c (gfc_match_data_decl): Ditto.
249 (variable_decl): Remove undeclared type error.
250 (gfc_match_import): Use renamed instead of original name.
252 2013-01-27 Paul Thomas <pault@gcc.gnu.org>
256 * gfortran.h : Add associate_var to symbol_attr.
257 * resolve.c (resolve_assoc_var): Set associate_var attribute.
258 If the target class_ok is set, set it for the associate
260 * check.c (allocatable_check): Associate variables should not
261 have the allocatable attribute even if their symbols do.
262 * class.c (gfc_build_class_symbol): Symbols with associate_var
263 set will always have a good class container.
265 2013-01-23 Janus Weil <janus@gcc.gnu.org>
268 * resolve.c (resolve_select): Add argument 'select_type', reject
269 non-scalar expressions.
270 (resolve_select_type,resolve_code): Pass new argument to
273 2013-01-23 Jakub Jelinek <jakub@redhat.com>
276 * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
277 and DECL_IGNORED_P on select_type_temporary and don't set
280 2013-01-21 Thomas Koenig <tkoenig@gcc.gnu.org>
283 * scanner.c (add_path_to_list): Copy path to temporary and strip
284 trailing directory separators before calling stat().
286 2013-01-17 Richard Biener <rguenther@suse.de>
288 * trans-stmt.c (gfc_trans_do): Conditionally compute countm1
289 dependent on sign of step, avoids repeated evaluation of
290 step sign test. Avoid undefined overflow issues by using unsigned
293 2013-01-16 Janus Weil <janus@gcc.gnu.org>
296 * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
299 2013-01-16 Jakub Jelinek <jakub@redhat.com>
300 Tobias Burnus <burnus@net-b.de>
303 * lang.opt (fintrinsic-modules-path): Don't accept Joined.
304 (fintrinsic-modules-path=): New.
305 * options.c (gfc_handle_option, gfc_get_option_string,
306 gfc_get_option_string): Handle the latter.
308 2013-01-16 Jakub Jelinek <jakub@redhat.com>
311 * trans-stmt.c (gfc_trans_do): Put countm1-- before conditional
312 and use value of countm1 before the decrement in the condition.
314 2013-01-15 Paul Thomas <pault@gcc.gnu.org>
317 * expr.c (gfc_check_pointer_assign): Check for presence of
318 's2' before using it.
320 2013-01-14 Thomas Koenig <tkoenig@gcc.gnu.org>
323 * frontend-passes.c (optimize_reduction): New function,
325 (callback_reduction): Likewise.
326 (gfc_run_passes): Also run optimize_reduction.
327 (copy_walk_reduction_arg): New function.
328 (dummy_code_callback): New function.
330 2013-01-13 Jakub Jelinek <jakub@redhat.com>
333 * trans-expr.c (gfc_conv_structure): Call
334 unshare_expr_without_location on the ctor elements.
336 2013-01-13 Paul Thomas <pault@gcc.gnu.org>
339 * expr.c (gfc_check_pointer_assign): Ensure that both lvalue
340 and rvalue interfaces are presented to gfc_compare_interfaces.
341 Simplify references to interface names by using the symbols
342 themselves. Call gfc_compare_interfaces with s1 and s2 inter-
343 changed to overcome the asymmetry of this function. Do not
344 repeat the check for the presence of s1 and s2.
346 2013-01-12 Janus Weil <janus@gcc.gnu.org>
349 * trans-array.c (gfc_conv_array_parameter): No packing was done for
350 full arrays of derived type.
352 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
355 * class.c (get_unique_type_string): Change $tar to STAR and
356 replace sprintf by strcpy where there is no formatting.
357 * decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
359 2013-01-09 Mikael Morin <mikael@gcc.gnu.org>
362 * module.c (check_for_ambiguous): Get the current program unit using
365 2013-01-09 Tobias Burnus <burnus@net-b.de>
368 * resolve.c (resolve_symbol): Reject non-C_Bool logicals
369 in BIND(C) procedures with -std=f*.
371 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
374 * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
375 character function arguments to elemental procedures in
378 2013-01-07 Tobias Burnus <burnus@net-b.de>
381 * gfortran.h (gfc_check_assign_symbol): Update prototype.
382 * decl.c (add_init_expr_to_sym, do_parm): Update call.
383 * expr.c (gfc_check_assign_symbol): Handle BT_CLASS and
384 improve error location; support components.
385 (gfc_check_pointer_assign): Handle component assignments.
386 * resolve.c (resolve_fl_derived0): Call gfc_check_assign_symbol.
387 (resolve_values): Update call.
388 (resolve_structure_cons): Avoid double diagnostic.
390 2013-01-07 Tobias Burnus <burnus@net-b.de>
391 Thomas Koenig <tkoenig@gcc.gnu.org>
394 * expr.c (gfc_build_intrinsic_call): Avoid clashes
395 with user's procedures.
396 * gfortran.h (gfc_build_intrinsic_call): Update prototype.
397 * simplify.c (gfc_simplify_size): Update call.
398 * class.c (finalization_scalarizer, finalization_get_offset,
399 finalizer_insert_packed_call, generate_finalization_wrapper):
400 Clean up by using gfc_build_intrinsic_call.
402 2013-01-07 Tobias Burnus <burnus@net-b.de>
405 * resolve.c (resolve_select_type): Reject intrinsic types for
406 a non-unlimited-polymorphic selector.
408 2013-01-06 Paul Thomas <pault@gcc.gnu.org>
413 * trans-array.c (build_array_ref): Check the TYPE_CANONICAL
414 to see if it is GFC_CLASS_TYPE_P.
415 * trans-expr.c (gfc_get_vptr_from_expr): The same.
416 (gfc_conv_class_to_class): If the types are not the same,
417 cast parmese->expr to the type of ctree.
418 * trans-types.c (gfc_get_derived_type): GFC_CLASS_TYPE_P of
419 CLASS components must be set.
421 2013-01-06 Mikael Morin <mikael@gcc.gnu.org>
426 * module.c (read_module): Don't reuse local symtree if the associated
427 symbol isn't exactly the one wanted. Don't reuse local symtree if it is
429 * resolve.c (resolve_call): Use symtree's name instead of symbol's to
432 2013-01-05 Steven G. Kargl <kargl@gcc.gnu.org>
433 Mikael Morin <mikael@gcc.gnu.org>
436 * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
438 * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
440 2013-01-05 Tobias Burnus <burnus@net-b.de>
442 * class.c (finalize_component): Used passed offset expr.
443 (finalization_get_offset): New static function.
444 (finalizer_insert_packed_call, generate_finalization_wrapper): Use it
445 to handle noncontiguous arrays.
447 2013-01-04 Tobias Burnus <burnus@net-b.de>
449 * trans.c (gfc_build_final_call): New function.
450 * trans.h (gfc_build_final_call, gfc_conv_scalar_to_descriptor):
451 New function prototypes.
452 * trans-expr.c (gfc_conv_scalar_to_descriptor): Renamed from
453 conv_scalar_to_descriptor, removed static attribute.
454 (gfc_conv_procedure_call): Honor renaming.
456 2013-01-04 Tobias Burnus <burnus@net-b.de>
458 * intrinsic.c (add_functions): New internal intrinsic
459 function GFC_PREFIX ("stride").
460 * gfortran.h (gfc_isym_id): Add GFC_ISYM_STRIDE.
461 * intrinsic.h (gfc_resolve_stride): New prototypes.
462 * iresolve.c (gfc_resolve_stride): New function.
463 * trans-intrinsic.c (conv_intrinsic_stride): New static
465 (gfc_conv_intrinsic_function): Use it.
467 2013-01-04 Tobias Burnus <burnus@net-b.de>
469 * class.c (gfc_find_intrinsic_vtab): Add _final
471 * decl.c (gfc_match_null): Remove superfluous
472 variadic argument to gfc_match.
474 2013-01-04 Paul Thomas <pault@gcc.gnu.org>
477 * match.c (copy_ts_from_selector_to_associate): Remove call to
478 gfc_resolve_expr and replace it with explicit setting of the
479 array reference type.
480 * resolve.c (resolve_select_type): It is an error if the
481 selector is coindexed.
483 2013-01-04 Tobias Burnus <burnus@net-b.de>
486 * decl.c (gfc_match_null): Parse and reject MOLD.
488 2013-01-04 Tobias Burnus <burnus@net-b.de>
492 * class.c (gfc_class_null_initializer): Fix finding the vtab.
493 (gfc_find_intrinsic_vtab): Use BT_VOID for some components.
495 2013-01-03 Janus Weil <janus@gcc.gnu.org>
498 * expr.c (gfc_check_assign): Use 'gfc_expr_attr' to evaluate attributes
499 of rvalue. Correct hyphenation in error message.
501 2013-01-03 Jakub Jelinek <jakub@redhat.com>
503 * gfortranspec.c (lang_specific_driver): Update copyright notice
506 Copyright (C) 2013 Free Software Foundation, Inc.
508 Copying and distribution of this file, with or without modification,
509 are permitted in any medium without royalty provided the copyright
510 notice and this notice are preserved.