1 2013-11-23 Janus Weil <janus@gcc.gnu.org>
4 * interface.c (compare_parameter): Check for array spec.
6 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
8 * trans.c: Add required include files from gimple.h.
9 * trans-expr.c: Likewise
10 * trans-openmp.c: Likewise
12 2013-11-22 David Malcolm <dmalcolm@redhat.com>
14 * trans.c (trans_runtime_error_vararg): Remove use of input_line
17 2013-11-17 Andrew MacLeod <amacleod@redhat.com>
19 * fortran/trans-intrinsic.c: Include tree-nested.h.
21 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
23 * trans-expr.c: Include only gimplify.h and gimple.h as needed.
24 * trans-openmp.c: Likewise.
26 2013-11-14 Diego Novillo <dnovillo@google.com>
28 * decl.c: Include stringpool.h.
29 * iresolve.c: Include stringpool.h.
30 * match.c: Include stringpool.h.
31 * module.c: Include stringpool.h.
32 * target-memory.c: Include stor-layout.h.
33 * trans-common.c: Include stringpool.h.
34 Include stor-layout.h.
36 * trans-const.c: Include stor-layout.h.
37 * trans-decl.c: Include stringpool.h.
38 Include stor-layout.h.
41 * trans-expr.c: Include stringpool.h.
42 * trans-intrinsic.c: Include stringpool.h.
43 Include tree-nested.h.
44 Include stor-layout.h.
45 * trans-io.c: Include stringpool.h.
46 Include stor-layout.h.
47 * trans-openmp.c: Include stringpool.h.
48 * trans-stmt.c: Include stringpool.h.
49 * trans-types.c: Include stor-layout.h.
51 * trans.c: Include stringpool.h.
53 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
55 * f95-lang.c: Don't include gimple.h.
56 * trans-array.c: Include gimple-expr.h instead of gimple.h.
58 * trans-decl.c: Likewise.
59 * trans-expr.c: Include gimplify.h.
60 * trans-openmp.c: Likewise.
62 2013-11-07 Janus Weil <janus@gcc.gnu.org>
65 * primary.c (gfc_expr_attr): Check for result symbol.
67 2013-11-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
69 * gfortran.texi: Fix typo.
71 2013-11-05 Tobias Burnus <burnus@net-b.de>
73 * lang.opt (-Wdate-time): New option
74 * cpp.c (gfc_cpp_option_data): Add warn_date_time.
75 (gfc_cpp_init_options, gfc_cpp_handle_option,
76 gfc_cpp_post_options): Handle it and pass on to libcpp.
78 2013-11-05 Steven G. Kargl <kargl@gcc.gnu.org>
81 * check.c (gfc_check_reshape): ensure that shape is a constant
84 2013-11-05 Tobias Burnus <burnus@net-b.de>
86 * lang.opt (fopenmp-simd): New option.
87 * gfortran.h (gfc_option_t): Add gfc_flag_openmp_simd.
88 * options.c (gfc_handle_option): Handle it.
90 2013-11-04 Ian Lance Taylor <iant@google.com>
92 * f95-lang.c (ATTR_LEAF_LIST): Define.
94 2013-11-04 Paul Thomas <pault@gcc.gnu.org>
97 * trans-io.c (transfer_expr): If the backend_decl for a derived
98 type is missing, build it with gfc_typenode_for_spec.
100 2013-11-04 Paul Thomas <pault@gcc.gnu.org>
103 * trans-expr.c (gfc_conv_class_to_class): Remove spurious
106 2013-10-29 Tobias Burnus <burnus@net-b.de>
109 * parse.c (parse_spec): Add C1116 constraint
110 check for BLOCK DATA.
112 2013-10-29 Paul Thomas <pault@gcc.gnu.org>
115 * trans-types.c (gfc_typenode_for_spec): Add typenode for
116 BT_HOLLERITH. Note that the length is incorrect but unusable.
119 * target-memory.c (gfc_element_size): Add element sizes for
120 BT_VOID and BT_ASSUMED, using gfc_typenode_for_spec.
122 2013-10-24 Tobias Burnus <burnus@net-b.de>
125 * trans-stmt.c (struct forall_info): Add do_concurrent field.
126 (gfc_trans_forall_1): Set it for do concurrent.
127 (gfc_trans_forall_loop): Mark those as annot_expr_ivdep_kind.
129 2013-10-23 Tobias Burnus <burnus@net-b.de>
132 * interface.c (compare_parameter): Reject passing TYPE(*)
135 2013-10-22 Paul Thomas <pault@gcc.gnu.org>
138 * class.c : Include target-memory.h.
139 (gfc_find_intrinsic_vtab) Build a minimal expression so that
140 gfc_element_size can be used to obtain the storage size, rather
143 2013-10-21 Tobias Burnus <burnus@net-b.de>
146 * decl.c (match_ppc_decl): Prevent later
149 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
151 * trans-openmp.c: Include omp-low.h.
153 2013-10-16 Tobias Burnus <burnus@net-b.de>
156 * interface.c (compare_parameter): Accept passing CLASS(*)
159 2013-10-16 Tobias Burnus <burnus@net-b.de>
161 * intrinsic.texi (OpenMP Modules): Update to OpenMPv4.
162 Document omp_proc_bind_kind.
164 2013-10-15 Tobias Burnus <burnus@net-b.de>
167 * trans-intrinsic.c (conv_intrinsic_move_alloc): Fix handling
168 of CLASS(*) variables.
170 2013-10-14 Tobias Burnus <burnus@net-b.de>
173 * expr.c (gfc_check_vardef_context): Fix pointer diagnostic
176 2013-10-11 Jakub Jelinek <jakub@redhat.com>
178 * trans-openmp.c (gfc_omp_clause_default_ctor,
179 gfc_omp_clause_dtor): Return NULL for OMP_CLAUSE_REDUCTION.
180 * f95-lang.c (ATTR_NULL, DEF_FUNCTION_TYPE_8): Define.
181 * types.def (DEF_FUNCTION_TYPE_8): Document.
182 (BT_FN_VOID_OMPFN_PTR_UINT,
183 BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
184 BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG,
185 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): Remove.
186 (BT_FN_VOID_OMPFN_PTR_UINT_UINT_UINT,
187 BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_UINT,
188 BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG_UINT,
189 BT_FN_BOOL_INT, BT_FN_BOOL_INT_BOOL, BT_FN_VOID_UINT_UINT,
190 BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR,
191 BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR,
192 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): New.
194 2013-10-10 Tobias Burnus <burnus@net-b.de>
197 * options.c (gfc_get_option_string): Handle zero arg case.
199 2013-10-02 Tobias Burnus <burnus@net-b.de>
202 * trans-expr.c (gfc_conv_string_tmp): Fix obtaining
203 the byte size of a single character.
205 2013-10-01 Tobias Burnus <burnus@net-b.de>
208 * trans-expr.c (gfc_conv_string_tmp): Correctly obtain
209 the byte size of a single character.
211 2013-09-27 Janne Blomqvist <jb@gcc.gnu.org>
213 * intrinsic.texi (DATE_AND_TIME): Fix example.
215 2013-09-25 Tobias Burnus <burnus@net-b.de>
218 * class.c (generate_finalization_wrapper): Handle CLASS(*).
220 2013-09-25 Tobias Burnus <burnus@net-b.de>
224 * resolve.c (generate_component_assignments): Avoid double free
225 at runtime and freeing a still-being used expr.
227 2013-09-25 Tom Tromey <tromey@redhat.com>
229 * Make-lang.in (fortran_OBJS): Use fortran/gfortranspec.o.
230 (gfortranspec.o): Remove.
231 (CFLAGS-fortran/gfortranspec.o): New variable.
232 (GFORTRAN_D_OBJS): Update.
233 ($(F95_PARSER_OBJS), fortran/openmp.o, GFORTRAN_TRANS_DEPS)
234 (fortran/f95-lang.o, fortran/scanner.o, fortran/convert.o)
235 (fortran/frontend-passes.o, fortran/trans.o, fortran/trans-decl.o)
236 (fortran/trans-types, fortran/trans-const.o, fortran/trans-expr.o)
237 (fortran/trans-stmt.o, fortran/trans-openmp.o, fortran/trans-io.o)
238 (fortran/trans-array.o, fortran/trans-intrinsic.o)
239 (fortran/dependency.o, fortran/trans-common.o, fortran/resolve.o)
240 (fortran/data.o, fortran/options.o, fortran/cpp.o)
241 (fortran/scanner.o, fortran/module.o): Remove.
243 2013-09-25 Tom Tromey <tromey@redhat.com>
245 * Make-lang.in (gfortranspec.o): Don't use subshell.
247 2013-09-23 Janus Weil <janus@gcc.gnu.org>
250 * decl.c (check_extended_derived_type): Prevent segfault, modify error
253 2013-09-20 Janus Weil <janus@gcc.gnu.org>
256 * expr.c (gfc_check_pointer_assign): Remove second call to
257 'gfc_compare_interfaces' with swapped arguments.
258 * interface.c (gfc_compare_interfaces): Symmetrize the call to
259 'check_result_characteristics' by calling it with swapped arguments.
261 2013-09-18 Tobias Burnus <burnus@net-b.de>
263 * expr.c (gfc_check_assign_symbol): Free lvalue.ref.
265 2013-09-18 Tobias Burnus <burnus@net-b.de>
268 * primary.c (gfc_variable_attr): Also handle codimension.
269 * resolve.c (resolve_ordinary_assign): Add invalid-diagnostic for
270 polymorphic assignment.
272 2013-09-16 Tobias Burnus <burnus@net-b.de>
275 * class.c (generate_finalization_wrapper): Init proc_tree if
278 2013-09-16 Tobias Burnus <burnus@net-b.de>
281 * resolve.c (generate_component_assignments): Correctly handle the
282 case that the LHS is not allocated.
284 2013-09-15 Tobias Burnus <burnus@net-b.de>
287 * resolve.c (generate_component_assignments): Handle unallocated
288 LHS with defined assignment of components.
290 2013-09-12 Brooks Moses <bmoses@google.com>
293 * Make-lang.in: Do not install driver binaries in $(target)/bin.
295 2013-09-09 Tobias Burnus <burnus@net-b.de>
297 * invoke.texi (Error and Warning Options): Add hyphen.
299 2013-09-02 Thomas Koenig <tkoenig@gcc.gnu.org>
302 * gfortran.h: Declare gfc_do_concurrent_flag as extern.
303 * resolve.c: Rename do_concurrent_flag to gfc_do_concurrent_flag
305 (resolve_function): Use gfc_do_concurrent_flag instead of
307 (pure_subroutine): Likewise.
308 (resolve_code): Likewise.
309 (resolve_types): Likewise.
310 * intrinsic.c (gfc_intrinsic_sub_interface): Raise error for
311 non-pure intrinsic subroutines within DO CONCURRENT.
313 2013-08-29 Thomas Koenig <tkoenig@gcc.gnu.org>
316 * trans-expr.c (is_runtime_conformable): New function.
317 * gfc_trans_assignment_1: Use it.
319 2013-08-26 Thomas Koenig <tkoenig@gcc.gnu.org>
322 * array.c (gfc_ref_dimen_size): If possible, use
323 gfc_dep_difference to calculate array refrence
324 sizes. Fall back to integer code otherwise.
325 * dependency.c (discard_nops). Move up.
326 Also discarde widening integer conversions.
327 (gfc_dep_compare_expr): Use discard_nops.
329 2013-08-23 Mikael Morin <mikael@gcc.gnu.org>
332 * trans-array.c (gfc_conv_ss_startstride, set_loop_bounds,
333 gfc_set_delta): Generate preliminary code before the outermost loop.
335 2013-08-23 Janus Weil <janus@gcc.gnu.org>
338 * interface.c (gfc_extend_assign): Look for type-bound assignment
339 procedures before non-typebound.
341 2013-08-23 Mikael Morin <mikael@gcc.gnu.org>
343 * trans-array.c (gfc_conv_section_startstride): Move &loop->pre access
345 (gfc_conv_ss_startstride, gfc_conv_expr_descriptor): Update callers.
347 2013-08-22 Janus Weil <janus@gcc.gnu.org>
350 * match.c (copy_ts_from_selector_to_associate): Only build class
351 container for polymorphic selector. Some cleanup.
353 2013-08-20 Janus Weil <janus@gcc.gnu.org>
356 * trans-decl.c (generate_local_decl): Check if type has any components.
358 2013-08-19 Janus Weil <janus@gcc.gnu.org>
361 * openmp.c (resolve_omp_clauses): Bugfix for procedure pointers.
363 2013-08-12 Thomas Koenig <tkoenig@gcc.gnu.org>
366 * gfortran.h (gfc_option_t): Add warn_zerotrip.
367 * invoke.texi (-Wzerotrip): Document option.
368 * lang.opt (Wzerotrip): Add.
369 * options.c (gfc_init_options): Initialize warn_zerotrip.
370 (set_Wall): Add handling of warn_zerotrip.
371 (gfc_handle_option): Handle OPT_Wzerotrip.
372 * resolve.c (gfc_resolve_iterator): Honor
373 gfc_option.warn_zerotrip; update error message to show
374 how to suppress the warning.
376 2013-08-09 Janus Weil <janus@gcc.gnu.org>
378 * gfortran.h (gfc_get_code): Modified prototype.
379 * class.c (finalize_component, finalization_scalarizer,
380 finalization_get_offset, finalizer_insert_packed_call,
381 generate_finalization_wrapper, gfc_find_derived_vtab,
382 gfc_find_intrinsic_vtab): Use 'gfc_get_code'.
383 * io.c (match_io_iterator, match_io_element, terminate_io, get_io_list,
384 gfc_match_inquire): Call 'gfc_get_code' with argument.
385 * match.c (match_simple_forall, gfc_match_forall, gfc_match_goto,
386 gfc_match_nullify, gfc_match_call, match_simple_where, gfc_match_where):
388 * parse.c (new_level): Ditto.
389 (add_statement): Use XCNEW.
390 * resolve.c (resolve_entries, resolve_allocate_expr,
391 resolve_select_type, build_assignment, build_init_assign): Call
392 'gfc_get_code' with argument.
393 * st.c (gfc_get_code): Add argument 'op'.
394 * trans-expr.c (gfc_trans_class_array_init_assign): Call 'gfc_get_code'
396 * trans-stmt.c (gfc_trans_allocate): Ditto.
398 2013-08-09 Janus Weil <janus@gcc.gnu.org>
401 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Free the temporary
402 string, if necessary.
404 2013-08-06 Martin Jambor <mjambor@suse.cz>
407 * trans-decl.c (gfc_generate_function_code): Never call
408 cgraph_finalize_function on nested functions.
410 2013-08-06 Janus Weil <janus@gcc.gnu.org>
413 * class.c (gfc_class_null_initializer): Rename to
414 'gfc_class_initializer'. Treat non-NULL init-exprs.
415 * gfortran.h (gfc_class_null_initializer): Update prototype.
416 * trans-decl.c (gfc_get_symbol_decl): Treat class variables.
417 * trans-expr.c (gfc_conv_initializer): Ditto.
418 (gfc_trans_subcomponent_assign): Renamed gfc_class_null_initializer.
420 2013-07-30 Tobias Burnus <burnus@net-b.de>
423 * symbol.c (gfc_type_compatible): A type is type compatible with
424 a class if both have the same declared type.
425 * interface.c (compare_type): Reject CLASS/TYPE even if they
428 2013-07-30 Tobias Burnus <burnus@net-b.de>
431 * trans-expr.c (gfc_trans_class_assign): Handle CLASS array
433 (gfc_trans_pointer_assign): Ditto and support pointer assignment of
434 a polymorphic var to a nonpolymorphic var.
436 2013-07-22 Po Chang <pchang9@cs.wisc.edu>
438 * match.c (gfc_match_call): Exit loop after setting i.
440 * resolve.c (resolve_variable): Exit loop after setting seen.
442 * expr.c (gfc_check_pointer_assign): Exit loop after setting warn.
444 * trans-array.c (set_loop_bounds): Exit loop after setting
447 * trans-io.c (gfc_trans_transfer): Exit loop after setting seen_vector.
449 2013-07-28 Thomas Koenig <tkoenig@gcc.gnu.org>
452 * expr.c (gfc_check_vardef_context): Check for same values in
453 vector expression subscripts.
455 2013-07-27 Tobias Burnus <burnus@net-b.de>
458 * interface.c (check_some_aliasing): Also warn for intent OUT/OUT.
460 2013-07-27 Janus Weil <janus@gcc.gnu.org>
463 * check.c (dim_rank_check): Re-enable this check for CLASS arrays.
465 2013-07-25 Janus Weil <janus@gcc.gnu.org>
468 * resolve.c (resolve_typebound_function): Make sure the declared type,
469 including its type-bound procedures, is resolved before resolving the
470 actual type-bound call.
472 2013-07-25 Janus Weil <janus@gcc.gnu.org>
475 * interface.c (compare_parameter): Check for class_ok.
476 * simplify.c (gfc_simplify_same_type_as): Ditto.
478 2013-07-23 OndÅ™ej BÃlka <neleai@seznam.cz>
480 * decl.c: Fix comment typos.
481 * interface.c: Likewise.
482 * trans-array.c: Likewise.
485 2013-07-22 Tobias Burnus <burnus@net-b.de>
489 * class.c (gfc_build_class_symbol): Set coarray_comp.
490 * trans-array.c (structure_alloc_comps): For coarrays,
491 directly use the data pointer address.
493 2013-07-22 Chang <pchang9@cs.wisc.edu>
495 * trans-decl.c (gfc_build_dummy_array_decl): Exit loop after
496 setting PACKED_PARTIAL.
498 2013-07-22 Tobias Burnus <burnus@net-b.de>
500 * trans-array.c (gfc_array_allocate): Correct memory-leak patch.
502 2013-07-22 Tobias Burnus <burnus@net-b.de>
504 * trans-array.c (gfc_array_allocate,
505 gfc_trans_deferred_array): Plug memory leak.
507 2013-07-21 OndÅ™ej BÃlka <neleai@seznam.cz>
509 * trans-decl.c: Fix comment typos.
510 * trans-expr.c: Ditto.
512 2013-07-21 Thomas Koenig <tkoenig@gcc.gnu.org>
515 * dependency.c (gfc_dep_resolver): Treat identical
516 array subscripts as identical; don't unconditionally
517 return a dependency if an array subscript is found.
519 2013-07-21 Tobias Burnus <burnus@net-b.de>
522 * libgfortran.h (GFC_FPE_DOWNWARD, GFC_FPE_TONEAREST,
523 GFC_FPE_TOWARDZERO, GFC_FPE_UPWARD): New defines.
525 2013-07-21 Tobias Burnus <burnus@net-b.de>
528 * check.c (min_max_args): Add keyword= check.
530 2013-07-17 Mikael Morin <mikael@gcc.gnu.org>
531 Tobias Burnus <burnus@net-b.de>
534 * match.c (gfc_match_name): Ensure that the error
535 message regarding -fdollar-ok gets printed.
536 (gfc_match_common): Avoid multiple freeing.
538 2013-07-16 Tobias Burnus <burnus@net-b.de>
541 * trans-expr.c (gfc_trans_scalar_assign): Correct if
542 condition for caf realloc.
544 2013-07-15 Tobias Burnus <burnus@net-b.de>
546 * trans-array.h (gfc_deallocate_alloc_comp_no_caf,
547 gfc_reassign_alloc_comp_caf): New prototype.
548 * trans-array.c (enum): Add DEALLOCATE_ALLOC_COMP_NO_CAF
549 and COPY_ALLOC_COMP_CAF.
550 (structure_alloc_comps): Handle it.
551 (gfc_reassign_alloc_comp_caf,
552 gfc_deallocate_alloc_comp_no_caf): New function.
553 (gfc_alloc_allocatable_for_assignment): Call it.
554 * trans-expr.c (gfc_trans_scalar_assign,
555 gfc_trans_arrayfunc_assign, gfc_trans_assignment_1): Ditto.
556 * parse.c (parse_derived): Correctly set coarray_comp.
557 * resolve.c (resolve_symbol): Improve error wording.
559 2013-07-15 Tobias Burnus <burnus@net-b.de>
562 * trans.c (gfc_add_comp_finalizer_call): New function.
563 * trans.h (gfc_add_comp_finalizer_call): New prototype.
564 * trans-array.c (structure_alloc_comps): Call it.
566 2013-07-14 Thomas Koenig <tkoenig@gcc.gnu.org>
567 Tobias Burnus <burnus@gcc.gnu.org>
570 * trans-decl.c (gfc_finish_var_decl): Move setting of
571 PRIVATE for a module variable if the module has a private
572 default or -fmodule-private is given to...
573 (gfc_create_module_variable): here. Optionally
574 warn about private module variable which is not used.
576 2013-07-08 Tobias Burnus <burnus@net-b.de>
579 * check.c (is_c_interoperable): Add special case for c_f_pointer.
580 (explicit-size, gfc_check_c_f_pointer, gfc_check_c_loc): Update
583 2013-07-08 Tobias Burnus <burnus@net-b.de>
586 * io.c (match_inquire_element): Add missing do-var check.
588 2013-07-08 Tobias Burnus <burnus@net-b.de>
591 * simplify.c (compute_dot_product): Complex conjugate for
593 (gfc_simplify_dot_product, gfc_simplify_matmul): Update call.
595 2013-07-08 Tobias Burnus <burnus@net-b.de>
598 * trans-decl.c (generate_local_decl): Don't warn that
599 a dummy is unused, when it is in a namelist.
601 2013-07-01 Dominique d'Humieres <dominiq@lps.ens.fr>
604 * array.c (spec_size): handle the case as==NULL.
606 2013-06-26 Tobias Burnus <burnus@net-b.de>
609 * trans-array.c (gfc_conv_array_ref): Improve out-of-bounds
611 * trans-array.c (gfc_conv_array_ref): Update prototype.
612 * trans-expr.c (gfc_conv_variable): Update call.
614 2013-06-24 Steven G. Kargl <sgk@troutmask.apl.washington.edu>
615 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
616 Dominique d'Humieres <dominiq@lps.ens.fr>
619 * simplify.c (gfc_simplify_fraction): Fix the sign of negative values.
621 2013-06-21 Tobias Burnus <burnus@net-b.de>
624 * trans-array.c (gfc_trans_deferred_array): Call the
625 finalizer for nonallocatable local variables.
626 * trans-decl.c (gfc_get_symbol_decl): Add local
627 finalizable vars to the deferred list.
628 (gfc_trans_deferred_vars): Call gfc_trans_deferred_array
631 2013-06-21 Tobias Burnus <burnus@net-b.de>
633 * trans-array.c (gfc_alloc_allocatable_for_assignment): Allocate
635 * trans-expr.c (alloc_scalar_allocatable_for_assignment): Ditto.
637 2013-06-20 Tobias Burnus <burnus@net-b.de>
639 * resolve.c (get_temp_from_expr): Don't set FL_VARIABLE twice.
641 2013-06-17 Tobias Burnus <burnus@net-b.de>
643 * gfortran.h (gfc_option_t): Add fpe_summary.
644 * gfortran.texi (_gfortran_set_options): Update.
645 * invoke.texi (-ffpe-summary): Add doc.
646 * lang.opt (ffpe-summary): Add flag.
647 * options.c (gfc_init_options, gfc_handle_option): Handle it.
648 (gfc_handle_fpe_option): Renamed from gfc_handle_fpe_trap_option,
649 also handle fpe_summary.
650 * trans-decl.c (create_main_function): Update
651 _gfortran_set_options call.
653 2013-06-15 Mikael Morin <mikael@gcc.gnu.org>
657 * dependency.c (gfc_check_argument_var_dependency): Return 0 in the
658 array constructor case.
660 2013-06-14 Tobias Burnus <burnus@net-b.de>
663 * resolve.c (get_temp_from_expr): Don't copy function
664 result attributes to temporary.
666 2013-06-14 Tobias Burnus <burnus@net-b.de>
669 * trans-decl.c (gfc_trans_deferred_vars): Honor OPTIONAL
670 for nullify and deferred-strings' length variable.
672 2013-06-13 Mikael Morin <mikael@gcc.gnu.org>
675 * trans-expr.c (gfc_conv_variable): Don't walk the reference chain.
676 Handle NULL array references.
677 (gfc_conv_procedure_call): Remove code handling NULL array references.
679 2013-06-11 Tobias Burnus <burnus@net-b.de>
682 * trans-array.c (build_class_array_ref): Fix ICE for
683 function result variables.
685 2013-06-08 Tobias Burnus <burnus@net-b.de>
688 * trans-decl.c (init_intent_out_dt): Call finalizer
691 2013-06-08 Tobias Burnus <burnus@net-b.de>
694 * simplify.c (gfc_simplify_storage_size): Handle literal
696 * trans-intrinsic.c (gfc_conv_intrinsic_storage_size):
697 Add missing fold_convert.
699 2013-06-07 Tobias Burnus <burnus@net-b.de>
702 * array.c (gfc_match_array_constructor): Call
703 gfc_match_type_spec instead of gfc_match_decl_type_spec.
704 * match.c (gfc_match_type_spec): Renamed from match_type_spec.
705 (gfc_match_type_is, gfc_match_allocate): Update call.
706 * match.h (gfc_match_type_spec): Add prototype.
708 2013-06-07 Tobias Burnus <burnus@net-b.de>
711 * trans.c (gfc_build_final_call): Init block before use.
713 2013-06-06 Tobias Burnus <burnus@net-b.de>
716 * trans.c (gfc_build_final_call): Add se.pre to the block
717 and modify the assert.
719 2013-06-04 Tobias Burnus <burnus@net-b.de>
722 * trans.h (gfc_build_final_call): Remove prototype.
723 (gfc_add_finalizer_call): Add prototype.
724 * trans-array.c (gfc_trans_dealloc_allocated): Support finalization.
725 (structure_alloc_comps): Update caller.
726 (gfc_trans_deferred_array): Call finalizer.
727 * trans-array.h (gfc_trans_dealloc_allocated): Update prototype.
728 * trans-decl.c (gfc_trans_deferred_vars): Don't deallocate/finalize
729 variables of the main program.
730 * trans-expr.c (gfc_conv_procedure_call): Support finalization.
731 * trans-openmp.c (gfc_omp_clause_dtor,
732 gfc_trans_omp_array_reduction): Update calls.
733 * trans-stmt.c (gfc_trans_deallocate): Avoid double deallocation
735 * trans.c (gfc_add_finalizer_call): New function.
736 (gfc_deallocate_with_status,
737 gfc_deallocate_scalar_with_status): Call it
738 (gfc_build_final_call): Fix handling of scalar coarrays,
739 move up in the file and make static.
741 2013-06-01 Janus Weil <janus@gcc.gnu.org>
742 Mikael Morin <mikael@gcc.gnu.org>
744 * error.c (get_terminal_width): Only limit the width if we're
745 outputting to a terminal. Try to determine width via ioctl.
747 2013-06-01 Tobias Burnus <burnus@net-b.de>
749 * decl.c (add_global_entry): Take locus.
750 (gfc_match_entry): Update call.
751 (gfc_match_end): Better error location.
752 * parse.c (parse_block_data, parse_module, add_global_procedure,
753 add_global_program): Use better locus data.
755 2013-05-31 Tobias Burnus <burnus@net-b.de>
758 * trans-array.c (gfc_array_init_size): Use passed type spec,
760 (gfc_array_allocate): Pass typespec on.
761 * trans-array.h (gfc_array_allocate): Update prototype.
762 * trans-stmt.c (gfc_trans_allocate): Pass typespec on.
764 2013-05-31 Janus Weil <janus@gcc.gnu.org>
768 * gfortran.h (gfc_terminal_width): Remove prototype.
769 * error.c (get_terminal_width): Moved here from misc.c. Renamed.
770 Try to determine terminal width from environment variable.
771 * interface.c (compare_type, compare_rank): New functions. Fix assumed
773 (compare_type_rank, check_dummy_characteristics,
774 check_result_characteristics, gfc_compare_interfaces): Use them.
775 (symbol_rank): Slightly modified and moved.
776 * misc.c (gfc_terminal_width): Moved to error.c.
778 2013-05-30 Janus Weil <janus@gcc.gnu.org>
781 * resolve.c (check_assumed_size_reference): Check for e->ref.
783 2013-05-30 Tobias Burnus <burnus@net-b.de>
786 * interface.c (compare_parameter): Update C1239/C1240 constraint
787 check for assumed-rank/TS29113.
789 2013-05-29 Tobias Burnus <burnus@net-b.de>
792 * class.c (finalize_component): Fix coarray array refs.
793 (generate_finalization_wrapper): Only gfc_convert_type_warn
794 when the kind value is different.
795 (gfc_find_intrinsic_vtab): _copy's dst is now intent(inout).
796 (gfc_find_derived_vtab): Ditto. Enable finalization-wrapper
798 * module.c (MOD_VERSION): Bump.
799 (gfc_dump_module, gfc_use_module): Remove empty line in .mod.
800 * trans-array.c (gfc_conv_descriptor_token): Accept nonrestricted
802 (gfc_array_allocate, structure_alloc_comps): Don't nullify for
803 BT_CLASS allocations.
804 * trans-stmt.c (gfc_trans_allocate): Ditto.
806 2013-05-29 Tobias Burnus <burnus@net-b.de>
809 * resolve.c (gfc_resolve_finalizers): Remove not implemented error.
811 2013-05-28 Tobias Burnus <burnus@net-b.de>
813 * trans-expr.c (gfc_conv_procedure_call): Deallocate
814 polymorphic arrays for allocatable intent(out) dummies.
815 (gfc_reset_vptr): New function, moved from trans-stmt.c
817 * trans-stmt.c (reset_vptr): Remove.
818 (gfc_trans_deallocate): Update calls.
819 * trans.h (gfc_reset_vptr): New prototype.
821 2013-05-28 Dominique d'Humieres <dominiq@lps.ens.fr>
824 * module.c (check_for_ambiguous): Avoid null pointer deref.
826 2013-05-28 Janus Weil <janus@gcc.gnu.org>
827 Tobias Burnus <burnus@net-b.de>
830 * interface.c (check_dummy_characteristics): Symmetrize type check.
832 2013-05-27 Bud Davis <jmdavis@link.com>
835 * resolve.c (resolve_formal_arglist): Detect error when an argument
836 has the same name as the function.
838 2013-05-27 Tobias Burnus <burnus@net-b.de>
840 * expr.c (gfc_build_intrinsic_call): Make symbol as attr.artificial.
841 * intrinsic.c (gfc_is_intrinsic): Disable std check for those.
843 2013-05-22 Tobias Burnus <burnus@net-b.de>
845 * resolve.c (get_temp_from_expr): Change mangling to
846 start always with a _.
848 2013-05-22 Tobias Burnus <burnus@net-b.de>
850 * resolve.c (get_temp_from_expr): Fix temp var mangling.
852 2013-05-22 Tobias Burnus <burnus@net-b.de>
855 * resolve.c (get_temp_from_expr): Commit created sym.
857 2013-05-22 Tobias Burnus <burnus@net-b.de>
860 * intrinsic.c (do_check): Move some checks to ...
861 (do_ts29113_check): ... this new function.
862 (check_specific, gfc_intrinsic_sub_interface): Call it.
864 2013-05-22 Janne Blomqvist <jb@gcc.gnu.org>
866 * intrinsic.texi (RANDOM_SEED): Improve example.
868 2013-05-21 Tobias Burnus <burnus@net-b.de>
871 * intrinsic.c (do_check): Add constraint check for
872 NO_ARG_CHECK, assumed rank and assumed type.
873 * gfortran.texi (NO_ARG_CHECK): Minor wording change,
874 allow PRESENT intrinsic.
876 2013-05-20 Tobias Burnus <burnus@net-b.de>
880 * decl.c (add_global_entry): Add sym_name.
881 * parse.c (add_global_procedure): Ditto.
882 * resolve.c (resolve_bind_c_derived_types): Handle multiple decl for
884 (resolve_global_procedure): Handle gsym->ns pointing to a module.
885 * trans-decl.c (gfc_get_extern_function_decl): Ditto.
887 2013-05-20 Tobias Burnus <burnus@net-b.de>
890 * decl.c (add_global_entry): Use nonbinding name
891 only for F2003 or if no binding label exists.
892 (gfc_match_entry): Update calls.
893 * parse.c (gfc_global_used): Improve error message.
894 (add_global_procedure): Use nonbinding name
895 only for F2003 or if no binding label exists.
896 (gfc_parse_file): Update call.
897 * resolve.c (resolve_global_procedure): Use binding
899 * trans-decl.c (gfc_get_extern_function_decl): Ditto.
901 2013-05-20 Tobias Burnus <burnus@net-b.de>
904 * decl.c (gfc_match_bind_c_stmt): Add gfc_notify_std.
905 * match.c (gfc_match_common): Don't add commons to gsym.
906 * resolve.c (resolve_common_blocks): Add to gsym and
908 (resolve_bind_c_comms): Remove.
909 (resolve_types): Remove call to the latter.
910 * trans-common.c (gfc_common_ns): Remove static var.
911 (gfc_map_of_all_commons): Add static var.
912 (build_common_decl): Correctly handle binding label.
914 2013-05-16 Jason Merrill <jason@redhat.com>
916 * Make-lang.in (f951$(exeext)): Use link mutex.
918 2013-05-05 Tobias Burnus <burnus@net-b.de>
920 * resolve.c (conformable_arrays): Avoid segfault
921 when ar.start[i] == NULL.
923 2013-05-05 Tobias Burnus <burnus@net-b.de>
926 * decl.c (gfc_match_null): Permit use-associated
929 2013-05-04 Tobias Burnus <burnus@net-b.de>
931 * decl.c (gfc_verify_c_interop_param): Permit allocatable
932 and pointer with -std=f2008ts.
934 2013-05-02 Tobias Burnus <burnus@net-b.de>
937 * simplify.c (gfc_simplify_size): Renamed from
938 simplify_size; fix kind=8 handling.
939 (gfc_simplify_size): New function.
940 (gfc_simplify_shape): Add range check.
941 * resolve.c (resolve_function): Fix handling
944 2013-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
946 * frontend-passes.c (optimize_power): Fix typo
949 2013-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
952 * frontend-passes.c (optimize_power): Simplify
955 2013-04-28 Tobias Burnus <burnus@net-b.de>
958 * intrinsic.texi (RANK): Correct syntax description and
961 2013-04-28 Tobias Burnus <burnus@net-b.de>
964 * trans-types.c (gfc_get_element_type): Fix handling
965 of scalar coarrays of type character.
966 * intrinsic.texi (PACK): Add missing ")".
968 2013-04-28 Thomas Koenig <tkoenig@gcc.gnu.org>
971 * frontend-passes (optimize_power): New function.
972 (optimize_op): Use it.
974 2013-04-25 Janne Blomqvist <jb@gcc.gnu.org>
977 * Make-lang.in (f951): Link in ZLIB.
978 (CFLAGS-fortran/module.o): Add zlib include directory.
980 2013-04-22 Janus Weil <janus@gcc.gnu.org>
984 * check.c (gfc_calculate_transfer_sizes): Fix for array-valued SOURCE
986 * simplify.c (gfc_simplify_sizeof,gfc_simplify_storage_size): Get rid
987 of special treatment for EXPR_ARRAY.
988 * target-memory.h (gfc_element_size): New prototype.
989 * target-memory.c (size_array): Remove.
990 (gfc_element_size): New function.
991 (gfc_target_expr_size): Modified to always return the full size of the
994 2013-04-20 Tobias Burnus <burnus@net-b.de>
997 * trans-intrinsic.c (conv_isocbinding_function): Don't pack array
1000 2013-04-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1001 Mikael Morin <mikael@gcc.gnu.org>
1004 * frontend-passes.c (copy_walk_reduction_arg): Change argument type
1005 to gfc_constructor. If it has an iterator, wrap the copy of its
1006 expression in an array constructor with that iterator. Don't special
1007 case function expressions.
1008 (callback_reduction): Update caller. Don't return early if there is
1011 2013-04-18 Tobias Burnus <burnus@net-b.de>
1013 * expr.c (find_array_element): Don't copy expr.
1014 * data.c (create_character_initializer): Free expr.
1015 * frontend-passes.c (combine_array_constructor): Ditto.
1016 * match.c (match_typebound_call, gfc_match_select_type): Ditto.
1017 * resolve.c (resolve_typebound_function): Free gfc_ref.
1019 2013-04-18 Tobias Burnus <burnus@net-b.de>
1022 * invoke.texi (NEAREST): S argument is not optional.
1024 2013-04-17 Janus Weil <janus@gcc.gnu.org>
1027 * interface.c (check_result_characteristics): Get result from interface
1030 2013-04-17 Janne Blomqvist <jb@gcc.gnu.org>
1033 * scanner.h: New file.
1034 * Make-lang.in: Dependencies on scanner.h.
1035 * scanner.c (gfc_directorylist): Move to scanner.h.
1036 * module.c: Don't include md5.h, include scanner.h and zlib.h.
1037 (MOD_VERSION): Add comment about backwards compatibility.
1038 (module_fp): Change type to gzFile.
1040 (gzopen_included_file_1): New function.
1041 (gzopen_included_file): New function.
1042 (gzopen_intrinsic_module): New function.
1043 (write_char): Use gzputc.
1044 (read_crc32_from_module_file): New function.
1045 (read_md5_from_module_file): Remove.
1046 (gfc_dump_module): Use gz* functions instead of stdio, check gzip
1047 crc32 instead of md5.
1048 (read_module_to_tmpbuf): Use gz* functions instead of stdio.
1049 (gfc_use_module): Use gz* functions.
1051 2013-04-16 Tobias Burnus <burnus@net-b.de>
1054 * decl.c (ext_attr_list): Add EXT_ATTR_NO_ARG_CHECK.
1055 * gfortran.h (ext_attr_id_t): Ditto.
1056 * gfortran.texi (GNU Fortran Compiler Directives):
1058 * interface.c (compare_type_rank): Ignore rank for NO_ARG_CHECK.
1059 (compare_parameter): Ditto - and regard as unlimited polymorphic.
1060 * resolve.c (resolve_symbol, resolve_variable): Add same constraint
1061 checks as for TYPE(*); turn dummy to TYPE(*),dimension(*).
1062 (gfc_explicit_interface_required): Require explicit interface
1065 2013-04-16 Janus Weil <janus@gcc.gnu.org>
1068 * expr.c (gfc_check_pointer_assign): Handle generic functions returning
1071 2013-04-16 Tobias Burnus <burnus@net-b.de>
1074 * intrinsic.c (gfc_intrinsic_func_interface): Don't set
1075 module name to "(intrinsic)" for intrinsics from intrinsic
1078 2013-04-15 Tobias Burnus <burnus@net-b.de>
1080 * intrinsic.texi (SYSTEM_CLOCK): Recommend kind=8.
1082 2013-04-15 Janne Blomqvist <jb@gcc.gnu.org>
1085 * intrinsics.texi (SYSTEM_CLOCK): Update documentation.
1087 2013-04-15 Tobias Burnus <burnus@net-b.de>
1089 * class.c (gfc_find_intrinsic_vtab): Removed unused var.
1090 * dependency.c (check_data_pointer_types): Fix check.
1091 * frontend-passes.c (check_data_pointer_types): Remove
1092 superfluous statement.
1093 * parse.c (decode_omp_directive): Add missing break.
1094 * resolve.c (resolve_typebound_subroutine: Free variable.
1095 * trans-decl.c (create_function_arglist): Correct condition.
1097 2013-04-14 Mikael Morin <mikael@gcc.gnu.org>
1100 * match.c (gfc_match_select_type): Add syntax error. Move namespace
1101 allocation and cleanup...
1102 * parse.c (decode_statement): ... here.
1104 2013-04-13 Janus Weil <janus@gcc.gnu.org>
1107 * expr.c (gfc_simplify_expr): Branch is not unreachable.
1109 2013-04-12 Janus Weil <janus@gcc.gnu.org>
1112 * primary.c (gfc_match_varspec): Turn gcc_assert into MATCH_ERROR.
1114 2013-04-12 Tobias Burnus <burnus@net-b.de>
1117 * trans-array.c (duplicate_allocatable): Fix handling
1120 2013-04-12 Janus Weil <janus@gcc.gnu.org>
1123 * gfortran.h (gfc_explicit_interface_required): New prototype.
1124 * expr.c (gfc_check_pointer_assign): Check if an explicit interface is
1125 required in a proc-ptr assignment.
1126 * interface.c (check_result_characteristics): Extra check.
1127 * resolve.c (gfc_explicit_interface_required): New function.
1128 (resolve_global_procedure): Use new function
1129 'gfc_explicit_interface_required'. Do a full interface check.
1131 2013-04-12 Tobias Burnus <burnus@net-b.de>
1134 * trans-decl.c (gfc_trans_deferred_vars): Restrict
1135 static CLASS init to SAVE and -fno-automatic.
1137 2013-04-12 Tobias Burnus <burnus@net-b.de>
1140 * trans-decl.c (gfc_trans_deferred_vars): Set _vptr for
1141 allocatable static BT_CLASS.
1142 * trans-expr.c (gfc_class_set_static_fields): New function.
1143 * trans.h (gfc_class_set_static_fields): New prototype.
1145 2013-04-11 Janne Blomqvist <jb@gcc.gnu.org>
1147 * gfortran.h: Remove enum gfc_try, replace gfc_try with bool type.
1148 * arith.c: Replace gfc_try with bool type.
1149 * array.c: Likewise.
1150 * check.c: Likewise.
1151 * class.c: Likewise.
1157 * error.c: Likewise.
1159 * f95-lang.c: Likewise.
1160 * interface.c: Likewise.
1161 * intrinsic.c: Likewise.
1162 * intrinsic.h: Likewise.
1164 * match.c: Likewise.
1165 * match.h: Likewise.
1166 * module.c: Likewise.
1167 * openmp.c: Likewise.
1168 * parse.c: Likewise.
1169 * parse.h: Likewise.
1170 * primary.c: Likewise.
1171 * resolve.c: Likewise.
1172 * scanner.c: Likewise.
1173 * simplify.c: Likewise.
1174 * symbol.c: Likewise.
1175 * trans-intrinsic.c: Likewise.
1176 * trans-openmp.c: Likewise.
1177 * trans-stmt.c: Likewise.
1178 * trans-types.c: Likewise.
1180 2013-04-09 Tobias Burnus <burnus@net-b.de>
1182 * gfortran.texi (KIND Type Parameters,
1183 Internal representation of LOGICAL variables): Add crossrefs.
1184 (Intrinsic Types): Mention issues with _Bool interop.
1185 (Naming and argument-passing conventions): New section.
1187 2013-04-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1190 * frontend-passes.c (callback_reduction): Don't do
1191 any simplification if there is only a single element
1192 which has an iterator.
1194 2013-04-07 Tobias Burnus <burnus@net-b.de>
1197 * iresolve.c (gfc_resolve_reshape): Set shape also
1200 2013-04-04 Janus Weil <janus@gcc.gnu.org>
1203 * match.c (gfc_match_return): Remove standard notification.
1204 * primary.c (gfc_match_actual_arglist): Add standard notification.
1206 2013-04-04 Tobias Burnus <burnus@net-b.de>
1209 * gcc/fortran/check.c (is_c_interoperable,
1210 gfc_check_c_loc): Correct c_loc array checking
1211 for Fortran 2003 and Fortran 2008.
1213 2013-04-03 Janus Weil <janus@gcc.gnu.org>
1217 * decl.c (gfc_match_formal_arglist): Warn about alternate-return
1219 * interface.c (check_dummy_characteristics): Return if symbols are NULL.
1221 2013-04-01 Janus Weil <janus@gcc.gnu.org>
1224 * symbol.c (gfc_set_default_type): Build class container for
1227 2013-03-31 Tobias Burnus <burnus@net-b.de>
1229 * class.c (finalization_scalarizer, finalizer_insert_packed_call,
1230 generate_finalization_wrapper): Avoid segfault with absent SIZE=
1231 argument to TRANSFER and use correct result kind for SIZE.
1232 * intrinsic.c (gfc_isym_id_by_intmod): Also handle ids of
1234 * trans.c (gfc_build_final_call): Handle coarrays.
1236 2013-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1238 * trans-expr.c (build_memcmp_call): New function.
1239 (gfc_build_compare_string): If the strings
1240 compared have constant and equal lengths and
1241 the strings are kind=1, or, for kind=4 strings,
1242 the test is for (in)equality, use memcmp().
1244 2013-03-29 Tobias Burnus <burnus@net-b.de>
1247 * trans-decl.c (create_function_arglist): Pass hidden argument
1248 for passed-by-value optional+value dummies.
1249 * trans-expr.c (gfc_conv_expr_present,
1250 gfc_conv_procedure_call): Handle those.
1252 2013-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
1255 * gfortran.h (gfc_dep_difference): Add prototype.
1256 * dependency.c (discard_nops): New function.
1257 (gfc_dep_difference): New function.
1258 (check_section_vs_section): Use gfc_dep_difference
1259 to calculate the difference of starting indices.
1260 * trans-expr.c (gfc_conv_substring): Use
1261 gfc_dep_difference to calculate the length of
1262 substrings where possible.
1264 2013-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
1267 * frontend-passes.c (optimize_code): Keep track of
1268 current code to make code insertion possible.
1269 (combine_array_constructor): New function.
1270 (optimize_op): Call it.
1272 2013-03-27 Tobias Burnus <burnus@net-b.de>
1276 * check.c (gfc_check_sizeof, gfc_check_c_sizeof,
1277 gfc_check_storage_size): Update checks.
1278 * intrinsic.texi (SIZEOF): Correct class.
1279 * intrinsic.h (gfc_simplify_sizeof,
1280 gfc_simplify_storage_size): New prototypes.
1281 * intrinsic.c (add_functions): Use them.
1282 * simplify.c (gfc_simplify_sizeof,
1283 gfc_simplify_storage_size): New functions.
1285 2013-03-27 Janne Blomqvist <jb@gcc.gnu.org>
1288 * module.c (module_locus): Use long for position.
1289 (module_content): New variable.
1290 (module_pos): Likewise.
1291 (prev_character): Remove.
1292 (bad_module): Free data instead of closing mod file.
1293 (set_module_locus): Use module_pos.
1294 (get_module_locus): Likewise.
1295 (module_char): use buffer rather than stdio file.
1296 (module_unget_char): Likewise.
1297 (read_module_to_tmpbuf): New function.
1298 (gfc_use_module): Call read_module_to_tmpbuf.
1300 2013-03-26 Tobias Burnus <burnus@net-b.de>
1303 * simplify.c (gfc_simplify_merge): Simplify more.
1305 2013-03-25 Tobias Burnus <burnus@net-b.de>
1325 * check.c (gfc_var_strlen): Properly handle 0-sized string.
1326 (gfc_check_c_sizeof): Use is_c_interoperable, add checks.
1327 (is_c_interoperable, gfc_check_c_associated, gfc_check_c_f_pointer,
1328 gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc): New
1330 * expr.c (check_inquiry): Add c_sizeof, compiler_version and
1332 (gfc_check_pointer_assign): Refine function result check.
1333 gfortran.h (gfc_isym_id): Add GFC_ISYM_C_ASSOCIATED,
1334 GFC_ISYM_C_F_POINTER, GFC_ISYM_C_F_PROCPOINTER, GFC_ISYM_C_FUNLOC,
1336 (iso_fortran_env_symbol, iso_c_binding_symbol): Handle
1338 (generate_isocbinding_symbol): Update prototype.
1339 (get_iso_c_sym): Remove.
1340 (gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New prototypes.
1341 * intrinsic.c (gfc_intrinsic_subroutine_by_id): New function.
1342 (gfc_intrinsic_sub_interface): Use it.
1343 (add_functions, add_subroutines): Add missing C-binding intrinsics.
1344 (gfc_intrinsic_func_interface): Add special case for c_loc.
1345 gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New functions.
1346 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Use them.
1347 * intrinsic.h (gfc_check_c_associated, gfc_check_c_f_pointer,
1348 gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc,
1349 gfc_resolve_c_loc, gfc_resolve_c_funloc): New prototypes.
1350 * iresolve.c (gfc_resolve_c_loc, gfc_resolve_c_funloc): New
1352 * iso-c-binding.def: Split PROCEDURE into NAMED_SUBROUTINE and
1354 * iso-fortran-env.def: Add NAMED_SUBROUTINE for completeness.
1355 * module.c (create_intrinsic_function): Support subroutines and
1356 derived-type results.
1357 (use_iso_fortran_env_module): Update calls.
1358 (import_iso_c_binding_module): Ditto; update calls to
1359 generate_isocbinding_symbol.
1360 * resolve.c (find_arglists): Skip for intrinsic symbols.
1361 (gfc_resolve_intrinsic): Find intrinsic subs via id.
1362 (is_scalar_expr_ptr, gfc_iso_c_func_interface,
1363 set_name_and_label, gfc_iso_c_sub_interface): Remove.
1364 (resolve_function, resolve_specific_s0): Remove calls to those.
1365 (resolve_structure_cons): Fix handling.
1366 * symbol.c (gen_special_c_interop_ptr): Update c_ptr/c_funptr
1368 (gen_cptr_param, gen_fptr_param, gen_shape_param,
1369 build_formal_args, get_iso_c_sym): Remove.
1370 (std_for_isocbinding_symbol): Handle NAMED_SUBROUTINE.
1371 (generate_isocbinding_symbol): Support hidden symbols and
1372 using c_ptr/c_funptr symtrees for nullptr defs.
1373 * target-memory.c (gfc_target_encode_expr): Fix handling
1375 * trans-expr.c (conv_isocbinding_procedure): Remove.
1376 (gfc_conv_procedure_call): Remove call to it.
1377 (gfc_trans_subcomponent_assign, gfc_conv_expr): Update handling
1379 * trans-intrinsic.c (conv_isocbinding_function,
1380 conv_isocbinding_subroutine): New.
1381 (gfc_conv_intrinsic_function, gfc_conv_intrinsic_subroutine):
1383 * trans-io.c (transfer_expr): Fix handling of c_ptr/c_funptr.
1384 * trans-types.c (gfc_typenode_for_spec,
1385 gfc_get_derived_type): Ditto.
1386 (gfc_init_c_interop_kinds): Handle NAMED_SUBROUTINE.
1388 2013-03-18 Tobias Burnus <burnus@net-b.de>
1390 * gfortran.h (gfc_option_t): Remove flag_whole_file.
1391 * invoke.texi (-fno-whole-file): Remove.
1392 * lang.opt (fwhole-file): Change to Ignore.
1393 * options.c (gfc_init_options, gfc_post_options,
1394 gfc_handle_option): Remove !flag_whole_file handling
1395 * parse.c (resolve_all_program_units, translate_all_program_units,
1396 gfc_parse_file): Ditto.
1397 * resolve.c (resolve_global_procedure): Ditto.
1398 * trans-decl.c (gfc_get_symbol_decl, gfc_get_extern_function_decl,
1399 gfc_create_module_variable): Ditto.
1400 * trans-types.c (gfc_get_derived_type): Ditto.
1402 2013-03-15 Tobias Burnus <burnus@net-b.de>
1405 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Pack arrays
1406 if they are not simply contiguous.
1408 2013-03-11 Tobias Burnus <burnus@net-b.de>
1410 * gfortran.texi (STRUCTURE and RECORD): State more clearly how
1411 to convert them into derived types.
1413 2013-03-10 Paul Thomas <pault@gcc.gnu.org>
1416 * expr.c (gfc_default_initializer): Check that a class declared
1417 type has any components.
1418 * resolve.c (resolve_fl_derived0): On failing the test for C437
1419 set the type to BT_UNKNOWN to prevent repeat error messages.
1421 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
1424 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer dereference.
1426 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
1429 * array.c (gfc_match_array_constructor): Set a checkpoint before
1430 matching a typespec. Drop it on success, restore it otherwise.
1432 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
1435 * gfortran.h (struct gfc_undo_change_set): New field 'previous'.
1436 (gfc_new_undo_checkpoint, gfc_drop_last_undo_checkpoint,
1437 gfc_restore_last_undo_checkpoint): New prototypes.
1438 * symbol.c (default_undo_chgset_var): Update initialization.
1439 (single_undo_checkpoint_p, gfc_new_undo_checkpoint,
1440 free_undo_change_set_data, pop_undo_change_set,
1441 gfc_drop_last_undo_checkpoint, enforce_single_undo_checkpoint):
1443 (save_symbol_data): Handle multiple change sets. Make sure old_symbol
1444 field's previous value is not overwritten. Clear gfc_new field.
1445 (restore_old_symbol): Restore previous old_symbol field.
1446 (gfc_restore_last_undo_checkpoint): New function, using body renamed
1447 from gfc_undo_symbols. Restore the previous change set as current one.
1448 (gfc_undo_symbols): New body.
1449 (gfc_commit_symbols, gfc_commit_symbol, gfc_enforce_clean_symbol_state):
1450 Call enforce_single_undo_checkpoint.
1451 (gfc_symbol_done_2): Ditto. Free change set data.
1453 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
1455 * symbol.c (restore_old_symbol): Fix thinko.
1457 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
1459 * symbol.c (gfc_undo_symbols): Move code...
1460 (restore_old_symbol): ... here as a new function.
1462 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
1464 * Make-lang.in (F95_PARSER_OBJS): Add dependency to vec.h.
1465 * gfortran.h: Include vec.h.
1466 (gfc_undo_change_set): New struct.
1467 * symbol.c (tentative_tbp): Remove struct.
1468 (changed_syms, tentative_tbp_list): Remove variables.
1469 (default_undo_chgset_var, latest_undo_chgset): New variables.
1470 (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
1471 gfc_commit_symbols, gfc_commit_symbol,
1472 gfc_enforce_clean_symbol_state, gfc_get_typebound_proc):
1473 Use latest_undo_chgset instead of changed_syms and tentative_tbp_list.
1475 2013-03-01 Tobias Burnus <burnus@net-b.de>
1478 * iresolve.c (resolve_bound): Use gfc_get_string instead of xstrdup.
1479 * symbol.c (free_components): Free proc-pointer components.
1481 2013-03-01 Tobias Burnus <burnus@net-b.de>
1483 * trans-decl.c (gfc_trans_deferred_vars): Free expr after use.
1484 * trans-io.c (build_dt): Ditto.
1486 2013-02-24 Joseph Myers <joseph@codesourcery.com>
1488 * resolve.c (generate_component_assignments): Don't use UTF-8
1489 ligature in diagnostic.
1491 2013-02-21 Janus Weil <janus@gcc.gnu.org>
1494 * trans-array.c (structure_alloc_comps): Handle procedure-pointer
1495 components with allocatable result.
1497 2013-02-21 Tobias Burnus <burnus@net-b.de>
1500 * gfortran.texi (Part II: Language Reference, Extensions,
1501 Non-Fortran Main Program): Sort @menu to match actual section order.
1502 * intrinsic.texi (Intrinsic Procedures): Ditto.
1503 (C_F_POINTER, PRECISION): Move to the alphabetically correct place.
1505 2013-02-15 Tobias Burnus <burnus@net-b.de>
1506 Mikael Morin <mikael@gcc.gnu.org>
1509 * simplify.c (gfc_simplify_matmul): Fix result shape
1512 2013-02-15 Tobias Burnus <burnus@net-b.de>
1515 * resolve.c (apply_default_init_local): Don't create an
1516 initializer for a result variable.
1518 2013-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1521 * gfortran.h (gfc_add_include_path): Add boolean argument
1523 * scanner.c (gfc_add_include_path): Pass along warn argument
1524 to add_path_to_list.
1525 * options.c (gfc_post_options): Add true warn argument to
1526 gfc_add_include_path.
1527 (gfc_handle_module_path_options): Likewise.
1528 (gfc_handle_option): Also gfc_add_include_path for intrinsic
1529 modules, without warning.
1531 2013-02-14 Paul Thomas <pault@gcc.gnu.org>
1532 Tobias Burnus <burnus@net-b.de>
1535 * trans-decl.c (gfc_get_symbol_decl): Fix deferred-length
1536 results for functions without extra result variable.
1539 2013-01-30 Tobias Burnus <burnus@net-b.de>
1542 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
1543 results for functions without extra result variable.
1545 2013-02-12 Janus Weil <janus@gcc.gnu.org>
1548 * resolve.c (resolve_call): Do not check deferred procedures for
1551 2013-02-09 Paul Thomas <pault@gcc.gnu.org>
1554 * check.c (array_check): It is an error if a procedure is
1557 2013-02-08 Mikael Morin <mikael@gcc.gnu.org>
1560 * trans-types.c (gfc_get_function_type): Change a NULL backend_decl
1561 to error_mark_node on entry. Detect recursive types. Build a variadic
1562 procedure type if the type is recursive. Restore the initial
1565 2013-02-07 Tobias Burnus <burnus@net-b.de>
1568 * gfortran.texi (Standards): Mention TS29113.
1569 (Varying Length Character): Mention deferred-length
1571 (Fortran 2003 Status): Add unlimited polymorphic.
1572 (TS 29113 Status): Add TYPE(*) and DIMENSION(..).
1573 (C Interop): Update the section about TS29113.
1575 2013-02-06 Paul Thomas <pault@gcc.gnu.org>
1578 * trans-array.c (trans_array_constructor): Remove condition
1579 'dynamic' = true if the loop ubound is a VAR_DECL.
1581 2013-02-04 Paul Thomas <pault@gcc.gnu.org>
1585 * trans-array.c (gfc_alloc_allocatable_for_assignment): Save
1586 the lhs descriptor before it is modified for reallocation. Use
1587 it to deallocate allocatable components in the reallocation
1588 block. Nullify allocatable components for newly (re)allocated
1591 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
1594 * resolve.c (resolve_typebound_procedures): Recurse through
1597 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
1601 * gfortran.h (struct gfc_symbol): New field 'resolved'.
1602 * resolve.c (resolve_fl_var_and_proc): Don't skip result symbols.
1603 (resolve_symbol): Skip duplicate calls. Don't check the current
1606 2013-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1610 * decl.c (gfc_match_end): Remove half-ready namespace
1611 from parent if the end of a block is missing.
1612 * parse.c (parse_module): Do not put namespace into
1615 2013-01-30 Tobias Burnus <burnus@net-b.de>
1618 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
1619 results for functions without extra result variable.
1621 2013-01-29 Janus Weil <janus@gcc.gnu.org>
1622 Mikael Morin <mikael@gcc.gnu.org>
1625 * gfortran.h (gfc_component): Delete members 'formal' and 'formal_ns'.
1626 (gfc_copy_formal_args,gfc_copy_formal_args_ppc,gfc_expr_replace_symbols,
1627 gfc_expr_replace_comp): Delete.
1628 (gfc_sym_get_dummy_args): New prototype.
1629 * dependency.c (gfc_check_fncall_dependency): Use
1630 'gfc_sym_get_dummy_args'.
1631 * expr.c (gfc_is_constant_expr): Ditto.
1632 (replace_symbol,gfc_expr_replace_symbols,replace_comp,
1633 gfc_expr_replace_comp): Deleted.
1634 * frontend-passes.c (doloop_code,do_function): Use
1635 'gfc_sym_get_dummy_args'.
1636 * interface.c (gfc_check_operator_interface,gfc_compare_interfaces,
1637 gfc_procedure_use,gfc_ppc_use,gfc_arglist_matches_symbol,
1638 gfc_check_typebound_override): Ditto.
1639 * module.c (MOD_VERSION): Bump module version.
1640 (mio_component): Do not read/write 'formal' and 'formal_ns'.
1641 * resolve.c (resolve_procedure_interface,resolve_fl_derived0): Do not
1642 copy formal args, but just keep a pointer to the interface.
1643 (resolve_function,resolve_call,resolve_typebound_generic_call,
1644 resolve_ppc_call,resolve_expr_ppc,generate_component_assignments,
1645 resolve_fl_procedure,gfc_resolve_finalizers,check_generic_tbp_ambiguity,
1646 resolve_typebound_procedure,check_uop_procedure): Use
1647 'gfc_sym_get_dummy_args'.
1648 * symbol.c (free_components): Do not free 'formal' and 'formal_ns'.
1649 (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Deleted.
1650 (gfc_sym_get_dummy_args): New function.
1651 * trans-array.c (get_array_charlen,gfc_walk_elemental_function_args):
1652 Use 'gfc_sym_get_dummy_args'.
1653 * trans-decl.c (build_function_decl,create_function_arglist,
1654 build_entry_thunks,init_intent_out_dt,gfc_trans_deferred_vars,
1655 add_argument_checking): Ditto.
1656 * trans-expr.c (gfc_map_fcn_formal_to_actual,gfc_conv_procedure_call,
1657 gfc_conv_statement_function): Ditto.
1658 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
1659 * trans-types.c (create_fn_spec,gfc_get_function_type): Ditto.
1661 2013-01-28 Tobias Burnus <burnus@net-b.de>
1662 Mikael Morin <mikael@gcc.gnu.org>
1665 * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
1667 (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
1668 * decl.c (gfc_match_data_decl): Ditto.
1669 (variable_decl): Remove undeclared type error.
1670 (gfc_match_import): Use renamed instead of original name.
1672 2013-01-27 Paul Thomas <pault@gcc.gnu.org>
1676 * gfortran.h : Add associate_var to symbol_attr.
1677 * resolve.c (resolve_assoc_var): Set associate_var attribute.
1678 If the target class_ok is set, set it for the associate
1680 * check.c (allocatable_check): Associate variables should not
1681 have the allocatable attribute even if their symbols do.
1682 * class.c (gfc_build_class_symbol): Symbols with associate_var
1683 set will always have a good class container.
1685 2013-01-23 Janus Weil <janus@gcc.gnu.org>
1688 * resolve.c (resolve_select): Add argument 'select_type', reject
1689 non-scalar expressions.
1690 (resolve_select_type,resolve_code): Pass new argument to
1693 2013-01-23 Jakub Jelinek <jakub@redhat.com>
1696 * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
1697 and DECL_IGNORED_P on select_type_temporary and don't set
1700 2013-01-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1703 * scanner.c (add_path_to_list): Copy path to temporary and strip
1704 trailing directory separators before calling stat().
1706 2013-01-17 Richard Biener <rguenther@suse.de>
1708 * trans-stmt.c (gfc_trans_do): Conditionally compute countm1
1709 dependent on sign of step, avoids repeated evaluation of
1710 step sign test. Avoid undefined overflow issues by using unsigned
1713 2013-01-16 Janus Weil <janus@gcc.gnu.org>
1716 * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
1719 2013-01-16 Jakub Jelinek <jakub@redhat.com>
1720 Tobias Burnus <burnus@net-b.de>
1723 * lang.opt (fintrinsic-modules-path): Don't accept Joined.
1724 (fintrinsic-modules-path=): New.
1725 * options.c (gfc_handle_option, gfc_get_option_string,
1726 gfc_get_option_string): Handle the latter.
1728 2013-01-16 Jakub Jelinek <jakub@redhat.com>
1731 * trans-stmt.c (gfc_trans_do): Put countm1-- before conditional
1732 and use value of countm1 before the decrement in the condition.
1734 2013-01-15 Paul Thomas <pault@gcc.gnu.org>
1737 * expr.c (gfc_check_pointer_assign): Check for presence of
1738 's2' before using it.
1740 2013-01-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1743 * frontend-passes.c (optimize_reduction): New function,
1744 including prototype.
1745 (callback_reduction): Likewise.
1746 (gfc_run_passes): Also run optimize_reduction.
1747 (copy_walk_reduction_arg): New function.
1748 (dummy_code_callback): New function.
1750 2013-01-13 Jakub Jelinek <jakub@redhat.com>
1753 * trans-expr.c (gfc_conv_structure): Call
1754 unshare_expr_without_location on the ctor elements.
1756 2013-01-13 Paul Thomas <pault@gcc.gnu.org>
1759 * expr.c (gfc_check_pointer_assign): Ensure that both lvalue
1760 and rvalue interfaces are presented to gfc_compare_interfaces.
1761 Simplify references to interface names by using the symbols
1762 themselves. Call gfc_compare_interfaces with s1 and s2 inter-
1763 changed to overcome the asymmetry of this function. Do not
1764 repeat the check for the presence of s1 and s2.
1766 2013-01-12 Janus Weil <janus@gcc.gnu.org>
1769 * trans-array.c (gfc_conv_array_parameter): No packing was done for
1770 full arrays of derived type.
1772 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
1775 * class.c (get_unique_type_string): Change $tar to STAR and
1776 replace sprintf by strcpy where there is no formatting.
1777 * decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
1779 2013-01-09 Mikael Morin <mikael@gcc.gnu.org>
1782 * module.c (check_for_ambiguous): Get the current program unit using
1785 2013-01-09 Tobias Burnus <burnus@net-b.de>
1788 * resolve.c (resolve_symbol): Reject non-C_Bool logicals
1789 in BIND(C) procedures with -std=f*.
1791 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
1794 * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
1795 character function arguments to elemental procedures in
1796 scalarization loops.
1798 2013-01-07 Tobias Burnus <burnus@net-b.de>
1801 * gfortran.h (gfc_check_assign_symbol): Update prototype.
1802 * decl.c (add_init_expr_to_sym, do_parm): Update call.
1803 * expr.c (gfc_check_assign_symbol): Handle BT_CLASS and
1804 improve error location; support components.
1805 (gfc_check_pointer_assign): Handle component assignments.
1806 * resolve.c (resolve_fl_derived0): Call gfc_check_assign_symbol.
1807 (resolve_values): Update call.
1808 (resolve_structure_cons): Avoid double diagnostic.
1810 2013-01-07 Tobias Burnus <burnus@net-b.de>
1811 Thomas Koenig <tkoenig@gcc.gnu.org>
1814 * expr.c (gfc_build_intrinsic_call): Avoid clashes
1815 with user's procedures.
1816 * gfortran.h (gfc_build_intrinsic_call): Update prototype.
1817 * simplify.c (gfc_simplify_size): Update call.
1818 * class.c (finalization_scalarizer, finalization_get_offset,
1819 finalizer_insert_packed_call, generate_finalization_wrapper):
1820 Clean up by using gfc_build_intrinsic_call.
1822 2013-01-07 Tobias Burnus <burnus@net-b.de>
1825 * resolve.c (resolve_select_type): Reject intrinsic types for
1826 a non-unlimited-polymorphic selector.
1828 2013-01-06 Paul Thomas <pault@gcc.gnu.org>
1833 * trans-array.c (build_array_ref): Check the TYPE_CANONICAL
1834 to see if it is GFC_CLASS_TYPE_P.
1835 * trans-expr.c (gfc_get_vptr_from_expr): The same.
1836 (gfc_conv_class_to_class): If the types are not the same,
1837 cast parmese->expr to the type of ctree.
1838 * trans-types.c (gfc_get_derived_type): GFC_CLASS_TYPE_P of
1839 CLASS components must be set.
1841 2013-01-06 Mikael Morin <mikael@gcc.gnu.org>
1846 * module.c (read_module): Don't reuse local symtree if the associated
1847 symbol isn't exactly the one wanted. Don't reuse local symtree if it is
1849 * resolve.c (resolve_call): Use symtree's name instead of symbol's to
1852 2013-01-05 Steven G. Kargl <kargl@gcc.gnu.org>
1853 Mikael Morin <mikael@gcc.gnu.org>
1856 * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
1858 * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
1860 2013-01-05 Tobias Burnus <burnus@net-b.de>
1862 * class.c (finalize_component): Used passed offset expr.
1863 (finalization_get_offset): New static function.
1864 (finalizer_insert_packed_call, generate_finalization_wrapper): Use it
1865 to handle noncontiguous arrays.
1867 2013-01-04 Tobias Burnus <burnus@net-b.de>
1869 * trans.c (gfc_build_final_call): New function.
1870 * trans.h (gfc_build_final_call, gfc_conv_scalar_to_descriptor):
1871 New function prototypes.
1872 * trans-expr.c (gfc_conv_scalar_to_descriptor): Renamed from
1873 conv_scalar_to_descriptor, removed static attribute.
1874 (gfc_conv_procedure_call): Honor renaming.
1876 2013-01-04 Tobias Burnus <burnus@net-b.de>
1878 * intrinsic.c (add_functions): New internal intrinsic
1879 function GFC_PREFIX ("stride").
1880 * gfortran.h (gfc_isym_id): Add GFC_ISYM_STRIDE.
1881 * intrinsic.h (gfc_resolve_stride): New prototypes.
1882 * iresolve.c (gfc_resolve_stride): New function.
1883 * trans-intrinsic.c (conv_intrinsic_stride): New static
1885 (gfc_conv_intrinsic_function): Use it.
1887 2013-01-04 Tobias Burnus <burnus@net-b.de>
1889 * class.c (gfc_find_intrinsic_vtab): Add _final
1891 * decl.c (gfc_match_null): Remove superfluous
1892 variadic argument to gfc_match.
1894 2013-01-04 Paul Thomas <pault@gcc.gnu.org>
1897 * match.c (copy_ts_from_selector_to_associate): Remove call to
1898 gfc_resolve_expr and replace it with explicit setting of the
1899 array reference type.
1900 * resolve.c (resolve_select_type): It is an error if the
1901 selector is coindexed.
1903 2013-01-04 Tobias Burnus <burnus@net-b.de>
1906 * decl.c (gfc_match_null): Parse and reject MOLD.
1908 2013-01-04 Tobias Burnus <burnus@net-b.de>
1912 * class.c (gfc_class_null_initializer): Fix finding the vtab.
1913 (gfc_find_intrinsic_vtab): Use BT_VOID for some components.
1915 2013-01-03 Janus Weil <janus@gcc.gnu.org>
1918 * expr.c (gfc_check_assign): Use 'gfc_expr_attr' to evaluate attributes
1919 of rvalue. Correct hyphenation in error message.
1921 2013-01-03 Jakub Jelinek <jakub@redhat.com>
1923 * gfortranspec.c (lang_specific_driver): Update copyright notice
1926 Copyright (C) 2013 Free Software Foundation, Inc.
1928 Copying and distribution of this file, with or without modification,
1929 are permitted in any medium without royalty provided the copyright
1930 notice and this notice are preserved.