1 2013-03-10 Paul Thomas <pault@gcc.gnu.org>
4 * expr.c (gfc_default_initializer): Check that a class declared
5 type has any components.
6 * resolve.c (resolve_fl_derived0): On failing the test for C437
7 set the type to BT_UNKNOWN to prevent repeat error messages.
9 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
12 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer dereference.
14 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
17 * array.c (gfc_match_array_constructor): Set a checkpoint before
18 matching a typespec. Drop it on success, restore it otherwise.
20 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
23 * gfortran.h (struct gfc_undo_change_set): New field 'previous'.
24 (gfc_new_undo_checkpoint, gfc_drop_last_undo_checkpoint,
25 gfc_restore_last_undo_checkpoint): New prototypes.
26 * symbol.c (default_undo_chgset_var): Update initialization.
27 (single_undo_checkpoint_p, gfc_new_undo_checkpoint,
28 free_undo_change_set_data, pop_undo_change_set,
29 gfc_drop_last_undo_checkpoint, enforce_single_undo_checkpoint):
31 (save_symbol_data): Handle multiple change sets. Make sure old_symbol
32 field's previous value is not overwritten. Clear gfc_new field.
33 (restore_old_symbol): Restore previous old_symbol field.
34 (gfc_restore_last_undo_checkpoint): New function, using body renamed
35 from gfc_undo_symbols. Restore the previous change set as current one.
36 (gfc_undo_symbols): New body.
37 (gfc_commit_symbols, gfc_commit_symbol, gfc_enforce_clean_symbol_state):
38 Call enforce_single_undo_checkpoint.
39 (gfc_symbol_done_2): Ditto. Free change set data.
41 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
43 * symbol.c (restore_old_symbol): Fix thinko.
45 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
47 * symbol.c (gfc_undo_symbols): Move code...
48 (restore_old_symbol): ... here as a new function.
50 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
52 * Make-lang.in (F95_PARSER_OBJS): Add dependency to vec.h.
53 * gfortran.h: Include vec.h.
54 (gfc_undo_change_set): New struct.
55 * symbol.c (tentative_tbp): Remove struct.
56 (changed_syms, tentative_tbp_list): Remove variables.
57 (default_undo_chgset_var, latest_undo_chgset): New variables.
58 (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
59 gfc_commit_symbols, gfc_commit_symbol,
60 gfc_enforce_clean_symbol_state, gfc_get_typebound_proc):
61 Use latest_undo_chgset instead of changed_syms and tentative_tbp_list.
63 2013-03-01 Tobias Burnus <burnus@net-b.de>
66 * iresolve.c (resolve_bound): Use gfc_get_string instead of xstrdup.
67 * symbol.c (free_components): Free proc-pointer components.
69 2013-03-01 Tobias Burnus <burnus@net-b.de>
71 * trans-decl.c (gfc_trans_deferred_vars): Free expr after use.
72 * trans-io.c (build_dt): Ditto.
74 2013-02-24 Joseph Myers <joseph@codesourcery.com>
76 * resolve.c (generate_component_assignments): Don't use UTF-8
77 ligature in diagnostic.
79 2013-02-21 Janus Weil <janus@gcc.gnu.org>
82 * trans-array.c (structure_alloc_comps): Handle procedure-pointer
83 components with allocatable result.
85 2012-02-21 Tobias Burnus <burnus@net-b.de>
88 * gfortran.texi (Part II: Language Reference, Extensions,
89 Non-Fortran Main Program): Sort @menu to match actual section order.
90 * intrinsic.texi (Intrinsic Procedures): Ditto.
91 (C_F_POINTER, PRECISION): Move to the alphabetically correct place.
93 2013-02-15 Tobias Burnus <burnus@net-b.de>
94 Mikael Morin <mikael@gcc.gnu.org>
97 * simplify.c (gfc_simplify_matmul): Fix result shape
100 2013-02-15 Tobias Burnus <burnus@net-b.de>
103 * resolve.c (apply_default_init_local): Don't create an
104 initializer for a result variable.
106 2013-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
109 * gfortran.h (gfc_add_include_path): Add boolean argument
111 * scanner.c (gfc_add_include_path): Pass along warn argument
113 * options.c (gfc_post_options): Add true warn argument to
114 gfc_add_include_path.
115 (gfc_handle_module_path_options): Likewise.
116 (gfc_handle_option): Also gfc_add_include_path for intrinsic
117 modules, without warning.
119 2013-02-14 Paul Thomas <pault@gcc.gnu.org>
120 Tobias Burnus <burnus@net-b.de>
123 * trans-decl.c (gfc_get_symbol_decl): Fix deferred-length
124 results for functions without extra result variable.
127 2013-01-30 Tobias Burnus <burnus@net-b.de>
130 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
131 results for functions without extra result variable.
133 2013-02-12 Janus Weil <janus@gcc.gnu.org>
136 * resolve.c (resolve_call): Do not check deferred procedures for
139 2013-02-09 Paul Thomas <pault@gcc.gnu.org>
142 * check.c (array_check): It is an error if a procedure is
145 2013-02-08 Mikael Morin <mikael@gcc.gnu.org>
148 * trans-types.c (gfc_get_function_type): Change a NULL backend_decl
149 to error_mark_node on entry. Detect recursive types. Build a variadic
150 procedure type if the type is recursive. Restore the initial
153 2013-02-07 Tobias Burnus <burnus@net-b.de>
156 * gfortran.texi (Standards): Mention TS29113.
157 (Varying Length Character): Mention deferred-length
159 (Fortran 2003 Status): Add unlimited polymorphic.
160 (TS 29113 Status): Add TYPE(*) and DIMENSION(..).
161 (C Interop): Update the section about TS29113.
163 2013-02-06 Paul Thomas <pault@gcc.gnu.org>
166 * trans-array.c (trans_array_constructor): Remove condition
167 'dynamic' = true if the loop ubound is a VAR_DECL.
169 2013-02-04 Paul Thomas <pault@gcc.gnu.org>
173 * trans-array.c (gfc_alloc_allocatable_for_assignment): Save
174 the lhs descriptor before it is modified for reallocation. Use
175 it to deallocate allocatable components in the reallocation
176 block. Nullify allocatable components for newly (re)allocated
179 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
182 * resolve.c (resolve_typebound_procedures): Recurse through
185 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
189 * gfortran.h (struct gfc_symbol): New field 'resolved'.
190 * resolve.c (resolve_fl_var_and_proc): Don't skip result symbols.
191 (resolve_symbol): Skip duplicate calls. Don't check the current
194 2013-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
198 * decl.c (gfc_match_end): Remove half-ready namespace
199 from parent if the end of a block is missing.
200 * parse.c (parse_module): Do not put namespace into
203 2013-01-30 Tobias Burnus <burnus@net-b.de>
206 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
207 results for functions without extra result variable.
209 2013-01-29 Janus Weil <janus@gcc.gnu.org>
210 Mikael Morin <mikael@gcc.gnu.org>
213 * gfortran.h (gfc_component): Delete members 'formal' and 'formal_ns'.
214 (gfc_copy_formal_args,gfc_copy_formal_args_ppc,gfc_expr_replace_symbols,
215 gfc_expr_replace_comp): Delete.
216 (gfc_sym_get_dummy_args): New prototype.
217 * dependency.c (gfc_check_fncall_dependency): Use
218 'gfc_sym_get_dummy_args'.
219 * expr.c (gfc_is_constant_expr): Ditto.
220 (replace_symbol,gfc_expr_replace_symbols,replace_comp,
221 gfc_expr_replace_comp): Deleted.
222 * frontend-passes.c (doloop_code,do_function): Use
223 'gfc_sym_get_dummy_args'.
224 * interface.c (gfc_check_operator_interface,gfc_compare_interfaces,
225 gfc_procedure_use,gfc_ppc_use,gfc_arglist_matches_symbol,
226 gfc_check_typebound_override): Ditto.
227 * module.c (MOD_VERSION): Bump module version.
228 (mio_component): Do not read/write 'formal' and 'formal_ns'.
229 * resolve.c (resolve_procedure_interface,resolve_fl_derived0): Do not
230 copy formal args, but just keep a pointer to the interface.
231 (resolve_function,resolve_call,resolve_typebound_generic_call,
232 resolve_ppc_call,resolve_expr_ppc,generate_component_assignments,
233 resolve_fl_procedure,gfc_resolve_finalizers,check_generic_tbp_ambiguity,
234 resolve_typebound_procedure,check_uop_procedure): Use
235 'gfc_sym_get_dummy_args'.
236 * symbol.c (free_components): Do not free 'formal' and 'formal_ns'.
237 (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Deleted.
238 (gfc_sym_get_dummy_args): New function.
239 * trans-array.c (get_array_charlen,gfc_walk_elemental_function_args):
240 Use 'gfc_sym_get_dummy_args'.
241 * trans-decl.c (build_function_decl,create_function_arglist,
242 build_entry_thunks,init_intent_out_dt,gfc_trans_deferred_vars,
243 add_argument_checking): Ditto.
244 * trans-expr.c (gfc_map_fcn_formal_to_actual,gfc_conv_procedure_call,
245 gfc_conv_statement_function): Ditto.
246 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
247 * trans-types.c (create_fn_spec,gfc_get_function_type): Ditto.
249 2013-01-28 Tobias Burnus <burnus@net-b.de>
250 Mikael Morin <mikael@gcc.gnu.org>
253 * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
255 (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
256 * decl.c (gfc_match_data_decl): Ditto.
257 (variable_decl): Remove undeclared type error.
258 (gfc_match_import): Use renamed instead of original name.
260 2013-01-27 Paul Thomas <pault@gcc.gnu.org>
264 * gfortran.h : Add associate_var to symbol_attr.
265 * resolve.c (resolve_assoc_var): Set associate_var attribute.
266 If the target class_ok is set, set it for the associate
268 * check.c (allocatable_check): Associate variables should not
269 have the allocatable attribute even if their symbols do.
270 * class.c (gfc_build_class_symbol): Symbols with associate_var
271 set will always have a good class container.
273 2013-01-23 Janus Weil <janus@gcc.gnu.org>
276 * resolve.c (resolve_select): Add argument 'select_type', reject
277 non-scalar expressions.
278 (resolve_select_type,resolve_code): Pass new argument to
281 2013-01-23 Jakub Jelinek <jakub@redhat.com>
284 * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
285 and DECL_IGNORED_P on select_type_temporary and don't set
288 2013-01-21 Thomas Koenig <tkoenig@gcc.gnu.org>
291 * scanner.c (add_path_to_list): Copy path to temporary and strip
292 trailing directory separators before calling stat().
294 2013-01-17 Richard Biener <rguenther@suse.de>
296 * trans-stmt.c (gfc_trans_do): Conditionally compute countm1
297 dependent on sign of step, avoids repeated evaluation of
298 step sign test. Avoid undefined overflow issues by using unsigned
301 2013-01-16 Janus Weil <janus@gcc.gnu.org>
304 * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
307 2013-01-16 Jakub Jelinek <jakub@redhat.com>
308 Tobias Burnus <burnus@net-b.de>
311 * lang.opt (fintrinsic-modules-path): Don't accept Joined.
312 (fintrinsic-modules-path=): New.
313 * options.c (gfc_handle_option, gfc_get_option_string,
314 gfc_get_option_string): Handle the latter.
316 2013-01-16 Jakub Jelinek <jakub@redhat.com>
319 * trans-stmt.c (gfc_trans_do): Put countm1-- before conditional
320 and use value of countm1 before the decrement in the condition.
322 2013-01-15 Paul Thomas <pault@gcc.gnu.org>
325 * expr.c (gfc_check_pointer_assign): Check for presence of
326 's2' before using it.
328 2013-01-14 Thomas Koenig <tkoenig@gcc.gnu.org>
331 * frontend-passes.c (optimize_reduction): New function,
333 (callback_reduction): Likewise.
334 (gfc_run_passes): Also run optimize_reduction.
335 (copy_walk_reduction_arg): New function.
336 (dummy_code_callback): New function.
338 2013-01-13 Jakub Jelinek <jakub@redhat.com>
341 * trans-expr.c (gfc_conv_structure): Call
342 unshare_expr_without_location on the ctor elements.
344 2013-01-13 Paul Thomas <pault@gcc.gnu.org>
347 * expr.c (gfc_check_pointer_assign): Ensure that both lvalue
348 and rvalue interfaces are presented to gfc_compare_interfaces.
349 Simplify references to interface names by using the symbols
350 themselves. Call gfc_compare_interfaces with s1 and s2 inter-
351 changed to overcome the asymmetry of this function. Do not
352 repeat the check for the presence of s1 and s2.
354 2013-01-12 Janus Weil <janus@gcc.gnu.org>
357 * trans-array.c (gfc_conv_array_parameter): No packing was done for
358 full arrays of derived type.
360 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
363 * class.c (get_unique_type_string): Change $tar to STAR and
364 replace sprintf by strcpy where there is no formatting.
365 * decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
367 2013-01-09 Mikael Morin <mikael@gcc.gnu.org>
370 * module.c (check_for_ambiguous): Get the current program unit using
373 2013-01-09 Tobias Burnus <burnus@net-b.de>
376 * resolve.c (resolve_symbol): Reject non-C_Bool logicals
377 in BIND(C) procedures with -std=f*.
379 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
382 * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
383 character function arguments to elemental procedures in
386 2013-01-07 Tobias Burnus <burnus@net-b.de>
389 * gfortran.h (gfc_check_assign_symbol): Update prototype.
390 * decl.c (add_init_expr_to_sym, do_parm): Update call.
391 * expr.c (gfc_check_assign_symbol): Handle BT_CLASS and
392 improve error location; support components.
393 (gfc_check_pointer_assign): Handle component assignments.
394 * resolve.c (resolve_fl_derived0): Call gfc_check_assign_symbol.
395 (resolve_values): Update call.
396 (resolve_structure_cons): Avoid double diagnostic.
398 2013-01-07 Tobias Burnus <burnus@net-b.de>
399 Thomas Koenig <tkoenig@gcc.gnu.org>
402 * expr.c (gfc_build_intrinsic_call): Avoid clashes
403 with user's procedures.
404 * gfortran.h (gfc_build_intrinsic_call): Update prototype.
405 * simplify.c (gfc_simplify_size): Update call.
406 * class.c (finalization_scalarizer, finalization_get_offset,
407 finalizer_insert_packed_call, generate_finalization_wrapper):
408 Clean up by using gfc_build_intrinsic_call.
410 2013-01-07 Tobias Burnus <burnus@net-b.de>
413 * resolve.c (resolve_select_type): Reject intrinsic types for
414 a non-unlimited-polymorphic selector.
416 2013-01-06 Paul Thomas <pault@gcc.gnu.org>
421 * trans-array.c (build_array_ref): Check the TYPE_CANONICAL
422 to see if it is GFC_CLASS_TYPE_P.
423 * trans-expr.c (gfc_get_vptr_from_expr): The same.
424 (gfc_conv_class_to_class): If the types are not the same,
425 cast parmese->expr to the type of ctree.
426 * trans-types.c (gfc_get_derived_type): GFC_CLASS_TYPE_P of
427 CLASS components must be set.
429 2013-01-06 Mikael Morin <mikael@gcc.gnu.org>
434 * module.c (read_module): Don't reuse local symtree if the associated
435 symbol isn't exactly the one wanted. Don't reuse local symtree if it is
437 * resolve.c (resolve_call): Use symtree's name instead of symbol's to
440 2013-01-05 Steven G. Kargl <kargl@gcc.gnu.org>
441 Mikael Morin <mikael@gcc.gnu.org>
444 * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
446 * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
448 2013-01-05 Tobias Burnus <burnus@net-b.de>
450 * class.c (finalize_component): Used passed offset expr.
451 (finalization_get_offset): New static function.
452 (finalizer_insert_packed_call, generate_finalization_wrapper): Use it
453 to handle noncontiguous arrays.
455 2013-01-04 Tobias Burnus <burnus@net-b.de>
457 * trans.c (gfc_build_final_call): New function.
458 * trans.h (gfc_build_final_call, gfc_conv_scalar_to_descriptor):
459 New function prototypes.
460 * trans-expr.c (gfc_conv_scalar_to_descriptor): Renamed from
461 conv_scalar_to_descriptor, removed static attribute.
462 (gfc_conv_procedure_call): Honor renaming.
464 2013-01-04 Tobias Burnus <burnus@net-b.de>
466 * intrinsic.c (add_functions): New internal intrinsic
467 function GFC_PREFIX ("stride").
468 * gfortran.h (gfc_isym_id): Add GFC_ISYM_STRIDE.
469 * intrinsic.h (gfc_resolve_stride): New prototypes.
470 * iresolve.c (gfc_resolve_stride): New function.
471 * trans-intrinsic.c (conv_intrinsic_stride): New static
473 (gfc_conv_intrinsic_function): Use it.
475 2013-01-04 Tobias Burnus <burnus@net-b.de>
477 * class.c (gfc_find_intrinsic_vtab): Add _final
479 * decl.c (gfc_match_null): Remove superfluous
480 variadic argument to gfc_match.
482 2013-01-04 Paul Thomas <pault@gcc.gnu.org>
485 * match.c (copy_ts_from_selector_to_associate): Remove call to
486 gfc_resolve_expr and replace it with explicit setting of the
487 array reference type.
488 * resolve.c (resolve_select_type): It is an error if the
489 selector is coindexed.
491 2013-01-04 Tobias Burnus <burnus@net-b.de>
494 * decl.c (gfc_match_null): Parse and reject MOLD.
496 2013-01-04 Tobias Burnus <burnus@net-b.de>
500 * class.c (gfc_class_null_initializer): Fix finding the vtab.
501 (gfc_find_intrinsic_vtab): Use BT_VOID for some components.
503 2013-01-03 Janus Weil <janus@gcc.gnu.org>
506 * expr.c (gfc_check_assign): Use 'gfc_expr_attr' to evaluate attributes
507 of rvalue. Correct hyphenation in error message.
509 2013-01-03 Jakub Jelinek <jakub@redhat.com>
511 * gfortranspec.c (lang_specific_driver): Update copyright notice
514 Copyright (C) 2013 Free Software Foundation, Inc.
516 Copying and distribution of this file, with or without modification,
517 are permitted in any medium without royalty provided the copyright
518 notice and this notice are preserved.