* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git] / gcc / fortran / ChangeLog-2013
blob6c7cea7c4a406d4a22eb528cb92a5c51a2165e56
1 2013-12-30  Janus Weil  <janus@gcc.gnu.org>
3         PR fortran/58998
4         * resolve.c (resolve_symbol): Check that symbol is not only flavorless
5         but also untyped.
7 2013-12-29  Janus Weil  <janus@gcc.gnu.org>
9         PR fortran/59612
10         * dump-parse-tree.c (show_typespec): Check for charlen.
11         * invoke.texi: Fix documentation of -fdump-fortran-optimized and
12         -fdump-parse-tree.
14 2013-12-18  Janus Weil  <janus@gcc.gnu.org>
16         PR fortran/59493
17         * gfortran.h (gfc_find_intrinsic_vtab): Removed prototype.
18         (gfc_find_vtab): New prototype.
19         * class.c (gfc_find_intrinsic_vtab): Rename to 'find_intrinsic_vtab' and
20         make static. Minor modifications.
21         (gfc_find_vtab): New function.
22         (gfc_class_initializer): Use new function 'gfc_find_vtab'.
23         * check.c (gfc_check_move_alloc): Ditto.
24         * expr.c (gfc_check_pointer_assign): Ditto.
25         * interface.c (compare_actual_formal): Ditto.
26         * resolve.c (resolve_allocate_expr, resolve_select_type): Ditto.
27         * trans-expr.c (gfc_conv_intrinsic_to_class, gfc_trans_class_assign):
28         Ditto.
29         * trans-intrinsic.c (conv_intrinsic_move_alloc): Ditto.
30         * trans-stmt.c (gfc_trans_allocate): Ditto.
32 2013-12-16  Janus Weil  <janus@gcc.gnu.org>
34         PR fortran/54949
35         * symbol.c (check_conflict): Forbid abstract procedure pointers.
36         (gfc_add_abstract): Check for attribute conflicts.
38 2013-12-16  Jakub Jelinek  <jakub@redhat.com>
40         PR libgomp/59337
41         * openmp.c (resolve_omp_atomic): Adjust error message.
43 2013-12-15  Janus Weil  <janus@gcc.gnu.org>
45         PR fortran/59493
46         * class.c (gfc_find_intrinsic_vtab): Handle BT_CLASS.
48 2013-12-14  Janus Weil  <janus@gcc.gnu.org>
50         PR fortran/59502
51         * primary.c (gfc_match_varspec): Check for 'class_ok'.
53 2013-12-14  Janus Weil  <janus@gcc.gnu.org>
55         PR fortran/59450
56         * module.c (mio_expr): Handle type-bound function expressions.
58 2013-12-12  Tobias Burnus  <burnus@net-b.de>
60         PR fortran/59440
61         * trans-decl.c (generate_namelist_decl): Ensure debug DIE
62         is created by setting DECL_IGNORED_P to 0.
64 2013-12-11  Janus Weil  <janus@gcc.gnu.org>
66         PR fortran/58916
67         * resolve.c (conformable_arrays): Treat scalar 'e2'.
68         (resolve_allocate_expr): Check rank also for unlimited-polymorphic
69         variables.
71 2013-12-10  Janus Weil  <janus@gcc.gnu.org>
73         PR fortran/35831
74         * interface.c (check_dummy_characteristics): Add checks for several
75         attributes.
77 2013-12-10  Janus Weil  <janus@gcc.gnu.org>
79         * gfortran.texi: Add possible kind values (and default) for
80         DOUBLE PRECISION.
81         * invoke.texi: Correct documentation of -fdefault-integer-8,
82         -fdefault-real-8 and -fdefault-double-8.
84 2013-12-10  Janus Weil  <janus@gcc.gnu.org>
86         * gfortran.texi: Modify documentation of kind type parameters.
87         * invoke.texi: Extend documentation of -fdefault-integer-8 and
88         -fdefault-real-8.
90 2013-12-10  Janus Weil  <janus@gcc.gnu.org>
92         * invoke.texi: Add -freal-4-real-16. Rearrange kind promotion options.
94 2013-12-08  Tobias Burnus  <burnus@net-b.de>
95             Janus Weil  <janus@gcc.gnu.org>
97         PR fortran/58099
98         PR fortran/58676
99         PR fortran/41724
100         * resolve.c (gfc_resolve_intrinsic): Set elemental/pure.
101         (resolve_fl_procedure): Reject pure dummy procedures/procedure
102         pointers.
103         (gfc_explicit_interface_required): Don't require a
104         match of ELEMENTAL for intrinsics.
106 2013-12-07  Janus Weil  <janus@gcc.gnu.org>
108         PR fortran/59414
109         * resolve.c (resolve_specific_f0): Handle CLASS-valued functions.
111 2013-12-04  Tobias Burnus  <burnus@net-b.de>
113         PR debug/37132
114         * trans-decl.c (generate_namelist_decl, create_module_nml_decl):
115         New static functions.
116         (gfc_generate_module_vars, generate_local_vars): Call them.
117         (gfc_trans_use_stmts): Handle namelists for debug genertion.
119 2013-12-01  Paul Thomas  <pault@gcc.gnu.org>
121         PR fortran/57354
122         * trans-array.c (gfc_conv_resolve_dependencies): For other than
123         SS_SECTION, do a dependency check if the lhs is liable to be
124         reallocated.
126 2013-12-01  Paul Thomas  <pault@gcc.gnu.org>
128         PR fortran/58410
129         * trans-array.c (gfc_alloc_allocatable_for_assignment): Do not
130         use the array bounds of an unallocated array but set its size
131         to zero instead.
133 2013-12-01  Paul Thomas  <pault@gcc.gnu.org>
135         PR fortran/34547
136         * resolve.c (resolve_transfer): EXPR_NULL is always in an
137         invalid context in a transfer statement.
139 2013-11-28  Sergey Ostanevich  <sergos.gnu@gmail.com>
141         * lang.opt (Wopenmp-simd): New.
143 2013-11-25  Janus Weil  <janus@gcc.gnu.org>
145         PR fortran/59143
146         * interface.c (get_expr_storage_size): Handle array-valued type-bound
147         procedures.
149 2013-11-24  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
151         * scanner.c (gfc_open_intrinsic_module): Remove function.
152         * gfortran.h (gfc_open_intrinsic_module): Remove prototype.
154 2013-11-23  Janus Weil  <janus@gcc.gnu.org>
156         PR fortran/59228
157         * interface.c (compare_parameter): Check for array spec.
159 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
161         * trans.c: Add required include files from gimple.h.
162         * trans-expr.c: Likewise
163         * trans-openmp.c: Likewise
165 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
167         * trans.c (trans_runtime_error_vararg): Remove use of input_line
168         macro.
170 2013-11-17  Andrew MacLeod  <amacleod@redhat.com>
172         * fortran/trans-intrinsic.c: Include tree-nested.h.
174 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
176         * trans-expr.c: Include only gimplify.h and gimple.h as needed.
177         * trans-openmp.c: Likewise.
179 2013-11-14  Diego Novillo  <dnovillo@google.com>
181         * decl.c: Include stringpool.h.
182         * iresolve.c: Include stringpool.h.
183         * match.c: Include stringpool.h.
184         * module.c: Include stringpool.h.
185         * target-memory.c: Include stor-layout.h.
186         * trans-common.c: Include stringpool.h.
187         Include stor-layout.h.
188         Include varasm.h.
189         * trans-const.c: Include stor-layout.h.
190         * trans-decl.c: Include stringpool.h.
191         Include stor-layout.h.
192         Include varasm.h.
193         Include attribs.h.
194         * trans-expr.c: Include stringpool.h.
195         * trans-intrinsic.c: Include stringpool.h.
196         Include tree-nested.h.
197         Include stor-layout.h.
198         * trans-io.c: Include stringpool.h.
199         Include stor-layout.h.
200         * trans-openmp.c: Include stringpool.h.
201         * trans-stmt.c: Include stringpool.h.
202         * trans-types.c: Include stor-layout.h.
203         Include stringpool.h.
204         * trans.c: Include stringpool.h.
206 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
208         * f95-lang.c: Don't include gimple.h.
209         * trans-array.c: Include gimple-expr.h instead of gimple.h.
210         * trans.c: Likewise.
211         * trans-decl.c: Likewise.
212         * trans-expr.c: Include gimplify.h.
213         * trans-openmp.c: Likewise.
215 2013-11-07  Janus Weil  <janus@gcc.gnu.org>
217         PR fortran/58471
218         * primary.c (gfc_expr_attr): Check for result symbol.
220 2013-11-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
222         * gfortran.texi: Fix typo.
224 2013-11-05  Tobias Burnus  <burnus@net-b.de>
226         * lang.opt (-Wdate-time): New option
227         * cpp.c (gfc_cpp_option_data): Add warn_date_time.
228         (gfc_cpp_init_options, gfc_cpp_handle_option,
229         gfc_cpp_post_options): Handle it and pass on to libcpp.
231 2013-11-05  Steven G. Kargl <kargl@gcc.gnu.org>
233         PR fortran/58989
234         * check.c (gfc_check_reshape): ensure that shape is a constant
235         expression.
237 2013-11-05  Tobias Burnus  <burnus@net-b.de>
239         * lang.opt (fopenmp-simd): New option.
240         * gfortran.h (gfc_option_t): Add gfc_flag_openmp_simd.
241         * options.c (gfc_handle_option): Handle it.
243 2013-11-04  Ian Lance Taylor  <iant@google.com>
245         * f95-lang.c (ATTR_LEAF_LIST): Define.
247 2013-11-04  Paul Thomas  <pault@gcc.gnu.org>
249         PR fortran/58771
250         * trans-io.c (transfer_expr): If the backend_decl for a derived
251         type is missing, build it with gfc_typenode_for_spec.
253 2013-11-04  Paul Thomas  <pault@gcc.gnu.org>
255         PR fortran/57445
256         * trans-expr.c (gfc_conv_class_to_class): Remove spurious
257         assert.
259 2013-10-29  Tobias Burnus  <burnus@net-b.de>
261         PR fortran/44350
262         * parse.c (parse_spec): Add C1116 constraint
263         check for BLOCK DATA.
265 2013-10-29  Paul Thomas  <pault@gcc.gnu.org>
267         PR fortran/58793
268         * trans-types.c (gfc_typenode_for_spec): Add typenode for
269         BT_HOLLERITH. Note that the length is incorrect but unusable.
271         PR fortran/58858
272         * target-memory.c (gfc_element_size): Add element sizes for
273         BT_VOID and BT_ASSUMED, using gfc_typenode_for_spec.
275 2013-10-24  Tobias Burnus  <burnus@net-b.de>
277         PR fortran/44646
278         * trans-stmt.c (struct forall_info): Add do_concurrent field.
279         (gfc_trans_forall_1): Set it for do concurrent.
280         (gfc_trans_forall_loop): Mark those as annot_expr_ivdep_kind.
282 2013-10-23  Tobias Burnus  <burnus@net-b.de>
284         PR fortran/58793
285         * interface.c (compare_parameter): Reject passing TYPE(*)
286         to CLASS(*).
288 2013-10-22  Paul Thomas  <pault@gcc.gnu.org>
290         PR fortran 57893
291         * class.c : Include target-memory.h.
292         (gfc_find_intrinsic_vtab) Build a minimal expression so that
293         gfc_element_size can be used to obtain the storage size, rather
294         that the kind value.
296 2013-10-21  Tobias Burnus  <burnus@net-b.de>
298         PR fortran/58803
299         * decl.c (match_ppc_decl): Prevent later
300         double free.
302 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
304         * trans-openmp.c: Include omp-low.h.
306 2013-10-16  Tobias Burnus  <burnus@net-b.de>
308         PR fortran/58652
309         * interface.c (compare_parameter): Accept passing CLASS(*)
310         to CLASS(*).
312 2013-10-16  Tobias Burnus  <burnus@net-b.de>
314         * intrinsic.texi (OpenMP Modules): Update to OpenMPv4.
315         Document omp_proc_bind_kind.
317 2013-10-15  Tobias Burnus  <burnus@net-b.de>
319         PR fortran/58652
320         * trans-intrinsic.c (conv_intrinsic_move_alloc): Fix handling
321         of CLASS(*) variables.
323 2013-10-14  Tobias Burnus  <burnus@net-b.de>
325         PR fortran/58658
326         * expr.c (gfc_check_vardef_context): Fix pointer diagnostic
327         for CLASS(*).
329 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
331         * trans-openmp.c (gfc_omp_clause_default_ctor,
332         gfc_omp_clause_dtor): Return NULL for OMP_CLAUSE_REDUCTION.
333         * f95-lang.c (ATTR_NULL, DEF_FUNCTION_TYPE_8): Define.
334         * types.def (DEF_FUNCTION_TYPE_8): Document.
335         (BT_FN_VOID_OMPFN_PTR_UINT,
336         BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
337         BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG,
338         BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): Remove.
339         (BT_FN_VOID_OMPFN_PTR_UINT_UINT_UINT,
340         BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_UINT,
341         BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG_UINT,
342         BT_FN_BOOL_INT, BT_FN_BOOL_INT_BOOL, BT_FN_VOID_UINT_UINT,
343         BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR,
344         BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR,
345         BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): New.
347 2013-10-10  Tobias Burnus  <burnus@net-b.de>
349         PR fortran/58226
350         * options.c (gfc_get_option_string): Handle zero arg case.
352 2013-10-02  Tobias Burnus  <burnus@net-b.de>
354         PR fortran/58593
355         * trans-expr.c (gfc_conv_string_tmp): Fix obtaining
356         the byte size of a single character.
358 2013-10-01  Tobias Burnus  <burnus@net-b.de>
360         PR fortran/58579
361         * trans-expr.c (gfc_conv_string_tmp): Correctly obtain
362         the byte size of a single character.
364 2013-09-27  Janne Blomqvist  <jb@gcc.gnu.org>
366         * intrinsic.texi (DATE_AND_TIME): Fix example.
368 2013-09-25  Tobias Burnus  <burnus@net-b.de>
370         PR fortran/58436
371         * class.c (generate_finalization_wrapper): Handle CLASS(*).
373 2013-09-25  Tobias Burnus  <burnus@net-b.de>
375         PR fortran/57697
376         PR fortran/58469
377         * resolve.c (generate_component_assignments): Avoid double free
378         at runtime and freeing a still-being used expr.
380 2013-09-25  Tom Tromey  <tromey@redhat.com>
382         * Make-lang.in (fortran_OBJS): Use fortran/gfortranspec.o.
383         (gfortranspec.o): Remove.
384         (CFLAGS-fortran/gfortranspec.o): New variable.
385         (GFORTRAN_D_OBJS): Update.
386         ($(F95_PARSER_OBJS), fortran/openmp.o, GFORTRAN_TRANS_DEPS)
387         (fortran/f95-lang.o, fortran/scanner.o, fortran/convert.o)
388         (fortran/frontend-passes.o, fortran/trans.o, fortran/trans-decl.o)
389         (fortran/trans-types, fortran/trans-const.o, fortran/trans-expr.o)
390         (fortran/trans-stmt.o, fortran/trans-openmp.o, fortran/trans-io.o)
391         (fortran/trans-array.o, fortran/trans-intrinsic.o)
392         (fortran/dependency.o, fortran/trans-common.o, fortran/resolve.o)
393         (fortran/data.o, fortran/options.o, fortran/cpp.o)
394         (fortran/scanner.o, fortran/module.o): Remove.
396 2013-09-25  Tom Tromey  <tromey@redhat.com>
398         * Make-lang.in (gfortranspec.o): Don't use subshell.
400 2013-09-23  Janus Weil  <janus@gcc.gnu.org>
402         PR fortran/58355
403         * decl.c (check_extended_derived_type): Prevent segfault, modify error
404         message.
406 2013-09-20  Janus Weil  <janus@gcc.gnu.org>
408         PR fortran/58099
409         * expr.c (gfc_check_pointer_assign): Remove second call to
410         'gfc_compare_interfaces' with swapped arguments.
411         * interface.c (gfc_compare_interfaces): Symmetrize the call to
412         'check_result_characteristics' by calling it with swapped arguments.
414 2013-09-18  Tobias Burnus  <burnus@net-b.de>
416         * expr.c (gfc_check_assign_symbol): Free lvalue.ref.
418 2013-09-18  Tobias Burnus  <burnus@net-b.de>
420         PR fortran/43366
421         * primary.c (gfc_variable_attr): Also handle codimension.
422         * resolve.c (resolve_ordinary_assign): Add invalid-diagnostic for
423         polymorphic assignment.
425 2013-09-16  Tobias Burnus  <burnus@net-b.de>
427         PR fortran/58356
428         * class.c (generate_finalization_wrapper): Init proc_tree if
429         not yet resolved.
431 2013-09-16  Tobias Burnus  <burnus@net-b.de>
433         PR fortran/57697
434         * resolve.c (generate_component_assignments): Correctly handle the
435         case that the LHS is not allocated.
437 2013-09-15  Tobias Burnus  <burnus@net-b.de>
439         PR fortran/57697
440         * resolve.c (generate_component_assignments): Handle unallocated
441         LHS with defined assignment of components.
443 2013-09-12  Brooks Moses  <bmoses@google.com>
445         PR driver/42955
446         * Make-lang.in: Do not install driver binaries in $(target)/bin.
448 2013-09-09  Tobias Burnus  <burnus@net-b.de>
450         * invoke.texi (Error and Warning Options): Add hyphen.
452 2013-09-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
454         PR fortran/PR56519
455         * gfortran.h:  Declare gfc_do_concurrent_flag as extern.
456         * resolve.c:  Rename do_concurrent_flag to gfc_do_concurrent_flag
457         and make non-static.
458         (resolve_function):  Use gfc_do_concurrent_flag instead of
459         do_concurrent_flag.
460         (pure_subroutine):  Likewise.
461         (resolve_code):  Likewise.
462         (resolve_types):  Likewise.
463         * intrinsic.c (gfc_intrinsic_sub_interface):  Raise error for
464         non-pure intrinsic subroutines within DO CONCURRENT.
466 2013-08-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
468         PR fortran/52243
469         * trans-expr.c (is_runtime_conformable):  New function.
470         * gfc_trans_assignment_1:  Use it.
472 2013-08-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
474         PR fortran/58146
475         * array.c (gfc_ref_dimen_size):  If possible, use
476         gfc_dep_difference to calculate array refrence
477         sizes.  Fall back to integer code otherwise.
478         * dependency.c (discard_nops).  Move up.
479         Also discarde widening integer conversions.
480         (gfc_dep_compare_expr):  Use discard_nops.
482 2013-08-23  Mikael Morin  <mikael@gcc.gnu.org>
484         PR fortran/57798
485         * trans-array.c (gfc_conv_ss_startstride, set_loop_bounds,
486         gfc_set_delta): Generate preliminary code before the outermost loop.
488 2013-08-23  Janus Weil  <janus@gcc.gnu.org>
490         PR fortran/57843
491         * interface.c (gfc_extend_assign): Look for type-bound assignment
492         procedures before non-typebound.
494 2013-08-23  Mikael Morin  <mikael@gcc.gnu.org>
496         * trans-array.c (gfc_conv_section_startstride): Move &loop->pre access
497         to the callers.
498         (gfc_conv_ss_startstride, gfc_conv_expr_descriptor): Update callers.
500 2013-08-22  Janus Weil  <janus@gcc.gnu.org>
502         PR fortran/58185
503         * match.c (copy_ts_from_selector_to_associate): Only build class
504         container for polymorphic selector. Some cleanup.
506 2013-08-20  Janus Weil  <janus@gcc.gnu.org>
508         PR fortran/53655
509         * trans-decl.c (generate_local_decl): Check if type has any components.
511 2013-08-19  Janus Weil  <janus@gcc.gnu.org>
513         PR fortran/46271
514         * openmp.c (resolve_omp_clauses): Bugfix for procedure pointers.
516 2013-08-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
518         PR fortran/56666
519         * gfortran.h (gfc_option_t):  Add warn_zerotrip.
520         * invoke.texi (-Wzerotrip):  Document option.
521         * lang.opt (Wzerotrip):  Add.
522         * options.c (gfc_init_options):  Initialize warn_zerotrip.
523         (set_Wall): Add handling of warn_zerotrip.
524         (gfc_handle_option):  Handle OPT_Wzerotrip.
525         * resolve.c (gfc_resolve_iterator): Honor
526         gfc_option.warn_zerotrip; update error message to show
527         how to suppress the warning.
529 2013-08-09  Janus Weil  <janus@gcc.gnu.org>
531         * gfortran.h (gfc_get_code): Modified prototype.
532         * class.c (finalize_component, finalization_scalarizer,
533         finalization_get_offset, finalizer_insert_packed_call,
534         generate_finalization_wrapper, gfc_find_derived_vtab,
535         gfc_find_intrinsic_vtab): Use 'gfc_get_code'.
536         * io.c (match_io_iterator, match_io_element, terminate_io, get_io_list,
537         gfc_match_inquire): Call 'gfc_get_code' with argument.
538         * match.c (match_simple_forall, gfc_match_forall, gfc_match_goto,
539         gfc_match_nullify, gfc_match_call, match_simple_where, gfc_match_where):
540         Ditto.
541         * parse.c (new_level): Ditto.
542         (add_statement): Use XCNEW.
543         * resolve.c (resolve_entries, resolve_allocate_expr,
544         resolve_select_type, build_assignment, build_init_assign): Call
545         'gfc_get_code' with argument.
546         * st.c (gfc_get_code): Add argument 'op'.
547         * trans-expr.c (gfc_trans_class_array_init_assign): Call 'gfc_get_code'
548         with argument.
549         * trans-stmt.c (gfc_trans_allocate): Ditto.
551 2013-08-09  Janus Weil  <janus@gcc.gnu.org>
553         PR fortran/58058
554         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Free the temporary
555         string, if necessary.
557 2013-08-06  Martin Jambor  <mjambor@suse.cz>
559         PR fortran/57987
560         * trans-decl.c (gfc_generate_function_code): Never call
561         cgraph_finalize_function on nested functions.
563 2013-08-06  Janus Weil  <janus@gcc.gnu.org>
565         PR fortran/57306
566         * class.c (gfc_class_null_initializer): Rename to
567         'gfc_class_initializer'. Treat non-NULL init-exprs.
568         * gfortran.h (gfc_class_null_initializer): Update prototype.
569         * trans-decl.c (gfc_get_symbol_decl): Treat class variables.
570         * trans-expr.c (gfc_conv_initializer): Ditto.
571         (gfc_trans_subcomponent_assign): Renamed gfc_class_null_initializer.
573 2013-07-30  Tobias Burnus  <burnus@net-b.de>
575         PR fortran/57530
576         * symbol.c (gfc_type_compatible): A type is type compatible with
577         a class if both have the same declared type.
578         * interface.c (compare_type): Reject CLASS/TYPE even if they
579         are type compatible.
581 2013-07-30  Tobias Burnus  <burnus@net-b.de>
583         PR fortran/57530
584         * trans-expr.c (gfc_trans_class_assign): Handle CLASS array
585         functions.
586         (gfc_trans_pointer_assign): Ditto and support pointer assignment of
587         a polymorphic var to a nonpolymorphic var.
589 2013-07-22  Po Chang  <pchang9@cs.wisc.edu>
591         * match.c (gfc_match_call): Exit loop after setting i.
593         * resolve.c (resolve_variable): Exit loop after setting seen.
595         * expr.c (gfc_check_pointer_assign): Exit loop after setting warn.
597         * trans-array.c (set_loop_bounds): Exit loop after setting
598         nonoptional_arr.
600         * trans-io.c (gfc_trans_transfer): Exit loop after setting seen_vector.
602 2013-07-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
604         PR fortran/58009
605         * expr.c (gfc_check_vardef_context):  Check for same values in
606         vector expression subscripts.
608 2013-07-27  Tobias Burnus  <burnus@net-b.de>
610         PR fortran/57991
611         * interface.c (check_some_aliasing): Also warn for intent OUT/OUT.
613 2013-07-27  Janus Weil  <janus@gcc.gnu.org>
615         PR fortran/57285
616         * check.c (dim_rank_check): Re-enable this check for CLASS arrays.
618 2013-07-25  Janus Weil  <janus@gcc.gnu.org>
620         PR fortran/57966
621         * resolve.c (resolve_typebound_function): Make sure the declared type,
622         including its type-bound procedures, is resolved before resolving the
623         actual type-bound call.
625 2013-07-25  Janus Weil  <janus@gcc.gnu.org>
627         PR fortran/57639
628         * interface.c (compare_parameter): Check for class_ok.
629         * simplify.c (gfc_simplify_same_type_as): Ditto.
631 2013-07-23   OndÅ™ej Bílka  <neleai@seznam.cz>
633         * decl.c: Fix comment typos.
634         * interface.c: Likewise.
635         * trans-array.c: Likewise.
636         * trans.c: Likewise.
638 2013-07-22  Tobias Burnus  <burnus@net-b.de>
640         PR fortran/57906
641         PR fortran/52052
642         * class.c (gfc_build_class_symbol): Set coarray_comp.
643         * trans-array.c (structure_alloc_comps): For coarrays,
644         directly use the data pointer address.
646 2013-07-22  Chang  <pchang9@cs.wisc.edu>
648         * trans-decl.c (gfc_build_dummy_array_decl): Exit loop after
649         setting PACKED_PARTIAL.
651 2013-07-22  Tobias Burnus  <burnus@net-b.de>
653         * trans-array.c (gfc_array_allocate): Correct memory-leak patch.
655 2013-07-22  Tobias Burnus  <burnus@net-b.de>
657         * trans-array.c (gfc_array_allocate,
658         gfc_trans_deferred_array): Plug memory leak.
660 2013-07-21  OndÅ™ej Bílka  <neleai@seznam.cz>
662         * trans-decl.c: Fix comment typos.
663         * trans-expr.c: Ditto.
665 2013-07-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
667         PR fortran/56937
668         * dependency.c (gfc_dep_resolver):  Treat identical
669         array subscripts as identical; don't unconditionally
670         return a dependency if an array subscript is found.
672 2013-07-21  Tobias Burnus  <burnus@net-b.de>
674         PR fortran/35862
675         * libgfortran.h (GFC_FPE_DOWNWARD, GFC_FPE_TONEAREST,
676         GFC_FPE_TOWARDZERO, GFC_FPE_UPWARD): New defines.
678 2013-07-21  Tobias Burnus  <burnus@net-b.de>
680         PR fortran/57894
681         * check.c (min_max_args): Add keyword= check.
683 2013-07-17  Mikael Morin  <mikael@gcc.gnu.org>
684             Tobias Burnus  <burnus@net-b.de>
686         PR fortran/57895
687         * match.c (gfc_match_name): Ensure that the error
688         message regarding -fdollar-ok gets printed.
689         (gfc_match_common): Avoid multiple freeing.
691 2013-07-16  Tobias Burnus  <burnus@net-b.de>
693         PR fortran/57912
694         * trans-expr.c (gfc_trans_scalar_assign): Correct if
695         condition for caf realloc.
697 2013-07-15  Tobias Burnus  <burnus@net-b.de>
699         * trans-array.h (gfc_deallocate_alloc_comp_no_caf,
700         gfc_reassign_alloc_comp_caf): New prototype.
701         * trans-array.c (enum): Add DEALLOCATE_ALLOC_COMP_NO_CAF
702         and COPY_ALLOC_COMP_CAF.
703         (structure_alloc_comps): Handle it.
704         (gfc_reassign_alloc_comp_caf,
705         gfc_deallocate_alloc_comp_no_caf): New function.
706         (gfc_alloc_allocatable_for_assignment): Call it.
707         * trans-expr.c (gfc_trans_scalar_assign,
708         gfc_trans_arrayfunc_assign, gfc_trans_assignment_1): Ditto.
709         * parse.c (parse_derived): Correctly set coarray_comp.
710         * resolve.c (resolve_symbol): Improve error wording.
712 2013-07-15  Tobias Burnus  <burnus@net-b.de>
714         PR fortran/37336
715         * trans.c (gfc_add_comp_finalizer_call): New function.
716         * trans.h (gfc_add_comp_finalizer_call): New prototype.
717         * trans-array.c (structure_alloc_comps): Call it.
719 2013-07-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
720             Tobias Burnus  <burnus@gcc.gnu.org>
722         PR fortran/52669
723         * trans-decl.c (gfc_finish_var_decl):  Move setting of
724         PRIVATE for a module variable if the module has a private
725         default or -fmodule-private is given to...
726         (gfc_create_module_variable): here. Optionally
727         warn about private module variable which is not used.
729 2013-07-08  Tobias Burnus  <burnus@net-b.de>
731         PR fortran/57834
732         * check.c (is_c_interoperable): Add special case for c_f_pointer.
733         (explicit-size, gfc_check_c_f_pointer, gfc_check_c_loc): Update
734         call.
736 2013-07-08  Tobias Burnus  <burnus@net-b.de>
738         PR fortran/50554
739         * io.c (match_inquire_element): Add missing do-var check.
741 2013-07-08  Tobias Burnus  <burnus@net-b.de>
743         PR fortran/57785
744         * simplify.c (compute_dot_product): Complex conjugate for
745         dot_product.
746         (gfc_simplify_dot_product, gfc_simplify_matmul): Update call.
748 2013-07-08  Tobias Burnus  <burnus@net-b.de>
750         PR fortran/57469
751         * trans-decl.c (generate_local_decl): Don't warn that
752         a dummy is unused, when it is in a namelist.
754 2013-07-01  Dominique d'Humieres  <dominiq@lps.ens.fr>
756         PR fortran/54788
757         * array.c (spec_size): handle the case as==NULL.
759 2013-06-26  Tobias Burnus  <burnus@net-b.de>
761         PR fortran/29800
762         * trans-array.c (gfc_conv_array_ref): Improve out-of-bounds
763         diagnostic message.
764         * trans-array.c (gfc_conv_array_ref): Update prototype.
765         * trans-expr.c (gfc_conv_variable): Update call.
767 2013-06-24  Steven G. Kargl  <sgk@troutmask.apl.washington.edu>
768             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
769             Dominique d'Humieres  <dominiq@lps.ens.fr>
771         PR fortran/52413
772         * simplify.c (gfc_simplify_fraction): Fix the sign of negative values.
774 2013-06-21  Tobias Burnus  <burnus@net-b.de>
776         PR fortran/37336
777         * trans-array.c (gfc_trans_deferred_array): Call the
778         finalizer for nonallocatable local variables.
779         * trans-decl.c (gfc_get_symbol_decl): Add local
780         finalizable vars to the deferred list.
781         (gfc_trans_deferred_vars): Call gfc_trans_deferred_array
782         for those.
784 2013-06-21  Tobias Burnus  <burnus@net-b.de>
786         * trans-array.c (gfc_alloc_allocatable_for_assignment): Allocate
787         at least one byte.
788         * trans-expr.c (alloc_scalar_allocatable_for_assignment): Ditto.
790 2013-06-20  Tobias Burnus  <burnus@net-b.de>
792         * resolve.c (get_temp_from_expr): Don't set FL_VARIABLE twice.
794 2013-06-17  Tobias Burnus  <burnus@net-b.de>
796         * gfortran.h (gfc_option_t): Add fpe_summary.
797         * gfortran.texi (_gfortran_set_options): Update.
798         * invoke.texi (-ffpe-summary): Add doc.
799         * lang.opt (ffpe-summary): Add flag.
800         * options.c (gfc_init_options, gfc_handle_option): Handle it.
801         (gfc_handle_fpe_option): Renamed from gfc_handle_fpe_trap_option,
802         also handle fpe_summary.
803         * trans-decl.c (create_main_function): Update
804         _gfortran_set_options call.
806 2013-06-15  Mikael Morin  <mikael@gcc.gnu.org>
808         PR fortran/49074
809         PR fortran/56136
810         * dependency.c (gfc_check_argument_var_dependency): Return 0 in the
811         array constructor case.
813 2013-06-14  Tobias Burnus  <burnus@net-b.de>
815         PR fortran/57508
816         * resolve.c (get_temp_from_expr): Don't copy function
817         result attributes to temporary.
819 2013-06-14  Tobias Burnus  <burnus@net-b.de>
821         PR fortran/57596
822         * trans-decl.c (gfc_trans_deferred_vars): Honor OPTIONAL
823         for nullify and deferred-strings' length variable.
825 2013-06-13  Mikael Morin  <mikael@gcc.gnu.org>
827         PR fortran/49074
828         * trans-expr.c (gfc_conv_variable): Don't walk the reference chain.
829         Handle NULL array references.
830         (gfc_conv_procedure_call): Remove code handling NULL array references.
832 2013-06-11  Tobias Burnus  <burnus@net-b.de>
834         PR fortran/57535
835         * trans-array.c (build_class_array_ref): Fix ICE for
836         function result variables.
838 2013-06-08  Tobias Burnus  <burnus@net-b.de>
840         PR fortran/37336
841         * trans-decl.c (init_intent_out_dt): Call finalizer
842         when appropriate.
844 2013-06-08  Tobias Burnus  <burnus@net-b.de>
846         PR fortran/57553
847         * simplify.c (gfc_simplify_storage_size): Handle literal
848         strings.
849         * trans-intrinsic.c (gfc_conv_intrinsic_storage_size):
850         Add missing fold_convert.
852 2013-06-07  Tobias Burnus  <burnus@net-b.de>
854         PR fortran/57549
855         * array.c (gfc_match_array_constructor): Call
856         gfc_match_type_spec instead of gfc_match_decl_type_spec.
857         * match.c (gfc_match_type_spec): Renamed from match_type_spec.
858         (gfc_match_type_is, gfc_match_allocate): Update call.
859         * match.h (gfc_match_type_spec): Add prototype.
861 2013-06-07  Tobias Burnus  <burnus@net-b.de>
863         PR fortran/57556
864         * trans.c (gfc_build_final_call): Init block before use.
866 2013-06-06  Tobias Burnus  <burnus@net-b.de>
868         PR fortran/57542
869         * trans.c (gfc_build_final_call): Add se.pre to the block
870         and modify the assert.
872 2013-06-04  Tobias Burnus  <burnus@net-b.de>
874         PR fortran/37336
875         * trans.h (gfc_build_final_call): Remove prototype.
876         (gfc_add_finalizer_call): Add prototype.
877         * trans-array.c (gfc_trans_dealloc_allocated): Support finalization.
878         (structure_alloc_comps): Update caller.
879         (gfc_trans_deferred_array): Call finalizer.
880         * trans-array.h (gfc_trans_dealloc_allocated): Update prototype.
881         * trans-decl.c (gfc_trans_deferred_vars): Don't deallocate/finalize
882         variables of the main program.
883         * trans-expr.c (gfc_conv_procedure_call): Support finalization.
884         * trans-openmp.c (gfc_omp_clause_dtor,
885         gfc_trans_omp_array_reduction): Update calls.
886         * trans-stmt.c (gfc_trans_deallocate): Avoid double deallocation
887         of alloc components.
888         * trans.c (gfc_add_finalizer_call): New function.
889         (gfc_deallocate_with_status,
890         gfc_deallocate_scalar_with_status): Call it
891         (gfc_build_final_call): Fix handling of scalar coarrays,
892         move up in the file and make static.
894 2013-06-01  Janus Weil  <janus@gcc.gnu.org>
895             Mikael Morin  <mikael@gcc.gnu.org>
897         * error.c (get_terminal_width): Only limit the width if we're
898         outputting to a terminal. Try to determine width via ioctl.
900 2013-06-01  Tobias Burnus  <burnus@net-b.de>
902         * decl.c (add_global_entry): Take locus.
903         (gfc_match_entry): Update call.
904         (gfc_match_end): Better error location.
905         * parse.c (parse_block_data, parse_module, add_global_procedure,
906         add_global_program): Use better locus data.
908 2013-05-31  Tobias Burnus  <burnus@net-b.de>
910         PR fortran/57456
911         * trans-array.c (gfc_array_init_size): Use passed type spec,
912         when available.
913         (gfc_array_allocate): Pass typespec on.
914         * trans-array.h (gfc_array_allocate): Update prototype.
915         * trans-stmt.c (gfc_trans_allocate): Pass typespec on.
917 2013-05-31  Janus Weil  <janus@gcc.gnu.org>
919         PR fortran/54190
920         PR fortran/57217
921         * gfortran.h (gfc_terminal_width): Remove prototype.
922         * error.c (get_terminal_width): Moved here from misc.c. Renamed.
923         Try to determine terminal width from environment variable.
924         * interface.c (compare_type, compare_rank): New functions. Fix assumed
925         type/rank handling.
926         (compare_type_rank, check_dummy_characteristics,
927         check_result_characteristics, gfc_compare_interfaces): Use them.
928         (symbol_rank): Slightly modified and moved.
929         * misc.c (gfc_terminal_width): Moved to error.c.
931 2013-05-30  Janus Weil  <janus@gcc.gnu.org>
933         PR fortran/54189
934         * resolve.c (check_assumed_size_reference): Check for e->ref.
936 2013-05-30  Tobias Burnus  <burnus@net-b.de>
938         PR fortran/57458
939         * interface.c (compare_parameter): Update C1239/C1240 constraint
940         check for assumed-rank/TS29113.
942 2013-05-29  Tobias Burnus  <burnus@net-b.de>
944         PR fortran/37336
945         * class.c (finalize_component): Fix coarray array refs.
946         (generate_finalization_wrapper): Only gfc_convert_type_warn
947         when the kind value is different.
948         (gfc_find_intrinsic_vtab): _copy's dst is now intent(inout).
949         (gfc_find_derived_vtab): Ditto. Enable finalization-wrapper
950         generation.
951         * module.c (MOD_VERSION): Bump.
952         (gfc_dump_module, gfc_use_module): Remove empty line in .mod.
953         * trans-array.c (gfc_conv_descriptor_token): Accept nonrestricted
954         void pointer.
955         (gfc_array_allocate, structure_alloc_comps): Don't nullify for
956         BT_CLASS allocations.
957         * trans-stmt.c (gfc_trans_allocate): Ditto.
959 2013-05-29  Tobias Burnus  <burnus@net-b.de>
961         PR fortran/37336
962         * resolve.c (gfc_resolve_finalizers): Remove not implemented error.
964 2013-05-28  Tobias Burnus  <burnus@net-b.de>
966         * trans-expr.c (gfc_conv_procedure_call): Deallocate
967         polymorphic arrays for allocatable intent(out) dummies.
968         (gfc_reset_vptr): New function, moved from trans-stmt.c
969         and extended.
970         * trans-stmt.c (reset_vptr): Remove.
971         (gfc_trans_deallocate): Update calls.
972         * trans.h (gfc_reset_vptr): New prototype.
974 2013-05-28  Dominique d'Humieres  <dominiq@lps.ens.fr>
976         PR fortran/57435
977         * module.c (check_for_ambiguous): Avoid null pointer deref.
979 2013-05-28  Janus Weil  <janus@gcc.gnu.org>
980             Tobias Burnus  <burnus@net-b.de>
982         PR fortran/57217
983         * interface.c (check_dummy_characteristics): Symmetrize type check.
985 2013-05-27  Bud Davis  <jmdavis@link.com>
987         PR fortran/50405
988         * resolve.c (resolve_formal_arglist): Detect error when an argument
989         has the same name as the function.
991 2013-05-27  Tobias Burnus  <burnus@net-b.de>
993         * expr.c (gfc_build_intrinsic_call): Make symbol as attr.artificial.
994         * intrinsic.c (gfc_is_intrinsic): Disable std check for those.
996 2013-05-22  Tobias Burnus  <burnus@net-b.de>
998         * resolve.c (get_temp_from_expr): Change mangling to
999         start always with a _.
1001 2013-05-22  Tobias Burnus  <burnus@net-b.de>
1003         * resolve.c (get_temp_from_expr): Fix temp var mangling.
1005 2013-05-22  Tobias Burnus  <burnus@net-b.de>
1007         PR fortran/57364
1008         * resolve.c (get_temp_from_expr): Commit created sym.
1010 2013-05-22  Tobias Burnus  <burnus@net-b.de>
1012         PR fortran/57338
1013         * intrinsic.c (do_check): Move some checks to ...
1014         (do_ts29113_check): ... this new function.
1015         (check_specific, gfc_intrinsic_sub_interface): Call it.
1017 2013-05-22  Janne Blomqvist  <jb@gcc.gnu.org>
1019         * intrinsic.texi (RANDOM_SEED): Improve example.
1021 2013-05-21  Tobias Burnus  <burnus@net-b.de>
1023         PR fortran/57035
1024         * intrinsic.c (do_check): Add constraint check for
1025         NO_ARG_CHECK, assumed rank and assumed type.
1026         * gfortran.texi (NO_ARG_CHECK): Minor wording change,
1027         allow PRESENT intrinsic.
1029 2013-05-20  Tobias Burnus  <burnus@net-b.de>
1031         PR fortran/48858
1032         PR fortran/55465
1033         * decl.c (add_global_entry): Add sym_name.
1034         * parse.c (add_global_procedure): Ditto.
1035         * resolve.c (resolve_bind_c_derived_types): Handle multiple decl for
1036         a procedure.
1037         (resolve_global_procedure): Handle gsym->ns pointing to a module.
1038         * trans-decl.c (gfc_get_extern_function_decl): Ditto.
1040 2013-05-20  Tobias Burnus  <burnus@net-b.de>
1042         PR fortran/48858
1043         * decl.c (add_global_entry): Use nonbinding name
1044         only for F2003 or if no binding label exists.
1045         (gfc_match_entry): Update calls.
1046         * parse.c (gfc_global_used): Improve error message.
1047         (add_global_procedure): Use nonbinding name
1048         only for F2003 or if no binding label exists.
1049         (gfc_parse_file): Update call.
1050         * resolve.c (resolve_global_procedure): Use binding
1051         name when available.
1052         * trans-decl.c (gfc_get_extern_function_decl): Ditto.
1054 2013-05-20  Tobias Burnus  <burnus@net-b.de>
1056         PR fortran/48858
1057         * decl.c (gfc_match_bind_c_stmt): Add gfc_notify_std.
1058         * match.c (gfc_match_common): Don't add commons to gsym.
1059         * resolve.c (resolve_common_blocks): Add to gsym and
1060         add checks.
1061         (resolve_bind_c_comms): Remove.
1062         (resolve_types): Remove call to the latter.
1063         * trans-common.c (gfc_common_ns): Remove static var.
1064         (gfc_map_of_all_commons): Add static var.
1065         (build_common_decl): Correctly handle binding label.
1067 2013-05-16  Jason Merrill  <jason@redhat.com>
1069         * Make-lang.in (f951$(exeext)): Use link mutex.
1071 2013-05-05  Tobias Burnus  <burnus@net-b.de>
1073         * resolve.c (conformable_arrays): Avoid segfault
1074         when ar.start[i] == NULL.
1076 2013-05-05  Tobias Burnus  <burnus@net-b.de>
1078         PR fortran/57141
1079         * decl.c (gfc_match_null): Permit use-associated
1080         NULL intrinsic.
1082 2013-05-04  Tobias Burnus  <burnus@net-b.de>
1084         * decl.c (gfc_verify_c_interop_param): Permit allocatable
1085         and pointer with -std=f2008ts.
1087 2013-05-02  Tobias Burnus  <burnus@net-b.de>
1089         PR fortran/57142
1090         * simplify.c (gfc_simplify_size): Renamed from
1091         simplify_size; fix kind=8 handling.
1092         (gfc_simplify_size): New function.
1093         (gfc_simplify_shape): Add range check.
1094         * resolve.c (resolve_function): Fix handling
1095         for ISYM_SIZE.
1097 2013-05-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
1099         * frontend-passes.c (optimize_power):  Fix typo
1100         in comment.
1102 2013-04-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
1104         PR fortran/57071
1105         * frontend-passes.c (optimize_power):  Simplify
1106         1**k to 1.
1108 2013-04-28  Tobias Burnus  <burnus@net-b.de>
1110         PR fortran/57114
1111         * intrinsic.texi (RANK): Correct syntax description and
1112         expected result.
1114 2013-04-28  Tobias Burnus  <burnus@net-b.de>
1116         PR fortran/57093
1117         * trans-types.c (gfc_get_element_type): Fix handling
1118         of scalar coarrays of type character.
1119         * intrinsic.texi (PACK): Add missing ")".
1121 2013-04-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
1123         PR fortran/57071
1124         * frontend-passes (optimize_power):  New function.
1125         (optimize_op):  Use it.
1127 2013-04-25  Janne Blomqvist  <jb@gcc.gnu.org>
1129         PR bootstrap/57028
1130         * Make-lang.in (f951): Link in ZLIB.
1131         (CFLAGS-fortran/module.o): Add zlib include directory.
1133 2013-04-22  Janus Weil  <janus@gcc.gnu.org>
1135         PR fortran/53685
1136         PR fortran/57022
1137         * check.c (gfc_calculate_transfer_sizes): Fix for array-valued SOURCE
1138         expressions.
1139         * simplify.c (gfc_simplify_sizeof,gfc_simplify_storage_size): Get rid
1140         of special treatment for EXPR_ARRAY.
1141         * target-memory.h (gfc_element_size): New prototype.
1142         * target-memory.c (size_array): Remove.
1143         (gfc_element_size): New function.
1144         (gfc_target_expr_size): Modified to always return the full size of the
1145         expression.
1147 2013-04-20  Tobias Burnus  <burnus@net-b.de>
1149         PR fortran/56907
1150         * trans-intrinsic.c (conv_isocbinding_function): Don't pack array
1151         passed to C_LOC
1153 2013-04-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
1154             Mikael Morin  <mikael@gcc.gnu.org>
1156         PR fortran/56872
1157         * frontend-passes.c (copy_walk_reduction_arg): Change argument type
1158         to gfc_constructor.  If it has an iterator, wrap the copy of its
1159         expression in an array constructor with that iterator.  Don't special
1160         case function expressions.
1161         (callback_reduction): Update caller.  Don't return early if there is
1162         an iterator.
1164 2013-04-18  Tobias Burnus  <burnus@net-b.de>
1166         * expr.c (find_array_element): Don't copy expr.
1167         * data.c (create_character_initializer): Free expr.
1168         * frontend-passes.c (combine_array_constructor): Ditto.
1169         * match.c (match_typebound_call, gfc_match_select_type): Ditto.
1170         * resolve.c (resolve_typebound_function): Free gfc_ref.
1172 2013-04-18  Tobias Burnus  <burnus@net-b.de>
1174         PR fortran/56994
1175         * invoke.texi (NEAREST): S argument is not optional.
1177 2013-04-17  Janus Weil  <janus@gcc.gnu.org>
1179         PR fortran/56814
1180         * interface.c (check_result_characteristics): Get result from interface
1181         if present.
1183 2013-04-17  Janne Blomqvist  <jb@gcc.gnu.org>
1185         PR fortran/40958
1186         * scanner.h: New file.
1187         * Make-lang.in: Dependencies on scanner.h.
1188         * scanner.c (gfc_directorylist): Move to scanner.h.
1189         * module.c: Don't include md5.h, include scanner.h and zlib.h.
1190         (MOD_VERSION): Add comment about backwards compatibility.
1191         (module_fp): Change type to gzFile.
1192         (ctx): Remove.
1193         (gzopen_included_file_1): New function.
1194         (gzopen_included_file): New function.
1195         (gzopen_intrinsic_module): New function.
1196         (write_char): Use gzputc.
1197         (read_crc32_from_module_file): New function.
1198         (read_md5_from_module_file): Remove.
1199         (gfc_dump_module): Use gz* functions instead of stdio, check gzip
1200         crc32 instead of md5.
1201         (read_module_to_tmpbuf): Use gz* functions instead of stdio.
1202         (gfc_use_module): Use gz* functions.
1204 2013-04-16  Tobias Burnus  <burnus@net-b.de>
1206         PR fortran/39505
1207         * decl.c (ext_attr_list): Add EXT_ATTR_NO_ARG_CHECK.
1208         * gfortran.h (ext_attr_id_t): Ditto.
1209         * gfortran.texi (GNU Fortran Compiler Directives):
1210         Document it.
1211         * interface.c (compare_type_rank): Ignore rank for NO_ARG_CHECK.
1212         (compare_parameter): Ditto - and regard as unlimited polymorphic.
1213         * resolve.c (resolve_symbol, resolve_variable): Add same constraint
1214         checks as for TYPE(*); turn dummy to TYPE(*),dimension(*).
1215         (gfc_explicit_interface_required): Require explicit interface
1216         for NO_ARG_CHECK.
1218 2013-04-16  Janus Weil  <janus@gcc.gnu.org>
1220         PR fortran/56968
1221         * expr.c (gfc_check_pointer_assign): Handle generic functions returning
1222         procedure pointers.
1224 2013-04-16  Tobias Burnus  <burnus@net-b.de>
1226         PR fortran/56969
1227         * intrinsic.c (gfc_intrinsic_func_interface): Don't set
1228         module name to "(intrinsic)" for intrinsics from intrinsic
1229         modules.
1231 2013-04-15  Tobias Burnus  <burnus@net-b.de>
1233         * intrinsic.texi (SYSTEM_CLOCK): Recommend kind=8.
1235 2013-04-15  Janne Blomqvist  <jb@gcc.gnu.org>
1237         PR fortran/56919
1238         * intrinsics.texi (SYSTEM_CLOCK): Update documentation.
1240 2013-04-15  Tobias Burnus  <burnus@net-b.de>
1242         * class.c (gfc_find_intrinsic_vtab): Removed unused var.
1243         * dependency.c (check_data_pointer_types): Fix check.
1244         * frontend-passes.c (check_data_pointer_types): Remove
1245         superfluous statement.
1246         * parse.c (decode_omp_directive): Add missing break.
1247         * resolve.c (resolve_typebound_subroutine: Free variable.
1248         * trans-decl.c (create_function_arglist): Correct condition.
1250 2013-04-14  Mikael Morin  <mikael@gcc.gnu.org>
1252         PR fortran/56816
1253         * match.c (gfc_match_select_type): Add syntax error. Move namespace
1254         allocation and cleanup...
1255         * parse.c (decode_statement): ... here.
1257 2013-04-13  Janus Weil  <janus@gcc.gnu.org>
1259         PR fortran/55959
1260         * expr.c (gfc_simplify_expr): Branch is not unreachable.
1262 2013-04-12  Janus Weil  <janus@gcc.gnu.org>
1264         PR fortran/56266
1265         * primary.c (gfc_match_varspec): Turn gcc_assert into MATCH_ERROR.
1267 2013-04-12  Tobias Burnus  <burnus@net-b.de>
1269         PR fortran/56929
1270         * trans-array.c (duplicate_allocatable): Fix handling
1271         of scalar coarrays.
1273 2013-04-12  Janus Weil  <janus@gcc.gnu.org>
1275         PR fortran/56261
1276         * gfortran.h (gfc_explicit_interface_required): New prototype.
1277         * expr.c (gfc_check_pointer_assign): Check if an explicit interface is
1278         required in a proc-ptr assignment.
1279         * interface.c (check_result_characteristics): Extra check.
1280         * resolve.c (gfc_explicit_interface_required): New function.
1281         (resolve_global_procedure): Use new function
1282         'gfc_explicit_interface_required'. Do a full interface check.
1284 2013-04-12  Tobias Burnus  <burnus@net-b.de>
1286         PR fortran/56845
1287         * trans-decl.c (gfc_trans_deferred_vars): Restrict
1288         static CLASS init to SAVE and -fno-automatic.
1290 2013-04-12  Tobias Burnus  <burnus@net-b.de>
1292         PR fortran/56845
1293         * trans-decl.c (gfc_trans_deferred_vars): Set _vptr for
1294         allocatable static BT_CLASS.
1295         * trans-expr.c (gfc_class_set_static_fields): New function.
1296         * trans.h (gfc_class_set_static_fields): New prototype.
1298 2013-04-11  Janne Blomqvist  <jb@gcc.gnu.org>
1300         * gfortran.h: Remove enum gfc_try, replace gfc_try with bool type.
1301         * arith.c: Replace gfc_try with bool type.
1302         * array.c: Likewise.
1303         * check.c: Likewise.
1304         * class.c: Likewise.
1305         * cpp.c: Likewise.
1306         * cpp.h: Likewise.
1307         * data.c: Likewise.
1308         * data.h: Likewise.
1309         * decl.c: Likewise.
1310         * error.c: Likewise.
1311         * expr.c: Likewise.
1312         * f95-lang.c: Likewise.
1313         * interface.c: Likewise.
1314         * intrinsic.c: Likewise.
1315         * intrinsic.h: Likewise.
1316         * io.c: Likewise.
1317         * match.c: Likewise.
1318         * match.h: Likewise.
1319         * module.c: Likewise.
1320         * openmp.c: Likewise.
1321         * parse.c: Likewise.
1322         * parse.h: Likewise.
1323         * primary.c: Likewise.
1324         * resolve.c: Likewise.
1325         * scanner.c: Likewise.
1326         * simplify.c: Likewise.
1327         * symbol.c: Likewise.
1328         * trans-intrinsic.c: Likewise.
1329         * trans-openmp.c: Likewise.
1330         * trans-stmt.c: Likewise.
1331         * trans-types.c: Likewise.
1333 2013-04-09  Tobias Burnus  <burnus@net-b.de>
1335         * gfortran.texi (KIND Type Parameters,
1336         Internal representation of LOGICAL variables): Add crossrefs.
1337         (Intrinsic Types): Mention issues with _Bool interop.
1338         (Naming and argument-passing conventions): New section.
1340 2013-04-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
1342         PR fortran/56782
1343         * frontend-passes.c (callback_reduction):  Don't do
1344         any simplification if there is only a single element
1345         which has an iterator.
1347 2013-04-07  Tobias Burnus  <burnus@net-b.de>
1349         PR fortran/56849
1350         * iresolve.c (gfc_resolve_reshape): Set shape also
1351         with order=.
1353 2013-04-04  Janus Weil  <janus@gcc.gnu.org>
1355         PR fortran/40881
1356         * match.c (gfc_match_return): Remove standard notification.
1357         * primary.c (gfc_match_actual_arglist): Add standard notification.
1359 2013-04-04  Tobias Burnus  <burnus@net-b.de>
1361         PR fortran/50269
1362         * gcc/fortran/check.c (is_c_interoperable,
1363         gfc_check_c_loc): Correct c_loc array checking
1364         for Fortran 2003 and Fortran 2008.
1366 2013-04-03  Janus Weil  <janus@gcc.gnu.org>
1368         PR fortran/56284
1369         PR fortran/40881
1370         * decl.c (gfc_match_formal_arglist): Warn about alternate-return
1371         arguments.
1372         * interface.c (check_dummy_characteristics): Return if symbols are NULL.
1374 2013-04-01  Janus Weil  <janus@gcc.gnu.org>
1376         PR fortran/56500
1377         * symbol.c (gfc_set_default_type): Build class container for
1378         IMPLICIT CLASS.
1380 2013-03-31  Tobias Burnus  <burnus@net-b.de>
1382         * class.c (finalization_scalarizer, finalizer_insert_packed_call,
1383         generate_finalization_wrapper): Avoid segfault with absent SIZE=
1384         argument to TRANSFER and use correct result kind for SIZE.
1385         * intrinsic.c (gfc_isym_id_by_intmod): Also handle ids of
1386         nonmodules.
1387         * trans.c (gfc_build_final_call): Handle coarrays.
1389 2013-03-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
1391         * trans-expr.c (build_memcmp_call):  New function.
1392         (gfc_build_compare_string):  If the strings
1393         compared have constant and equal lengths and
1394         the strings are kind=1, or, for kind=4 strings,
1395         the test is for (in)equality, use memcmp().
1397 2013-03-29  Tobias Burnus  <burnus@net-b.de>
1399         PR fortran/35203
1400         * trans-decl.c (create_function_arglist): Pass hidden argument
1401         for passed-by-value optional+value dummies.
1402         * trans-expr.c (gfc_conv_expr_present,
1403         gfc_conv_procedure_call): Handle those.
1405 2013-03-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
1407         PR fortran/45159
1408         * gfortran.h (gfc_dep_difference):  Add prototype.
1409         * dependency.c (discard_nops):  New function.
1410         (gfc_dep_difference):  New function.
1411         (check_section_vs_section):  Use gfc_dep_difference
1412         to calculate the difference of starting indices.
1413         * trans-expr.c (gfc_conv_substring):  Use
1414         gfc_dep_difference to calculate the length of
1415         substrings where possible.
1417 2013-03-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
1419         PR fortran/55806
1420         * frontend-passes.c (optimize_code):  Keep track of
1421         current code to make code insertion possible.
1422         (combine_array_constructor):  New function.
1423         (optimize_op):  Call it.
1425 2013-03-27  Tobias Burnus  <burnus@net-b.de>
1427         PR fortran/56650
1428         PR fortran/36437
1429         * check.c (gfc_check_sizeof, gfc_check_c_sizeof,
1430         gfc_check_storage_size): Update checks.
1431         * intrinsic.texi (SIZEOF): Correct class.
1432         * intrinsic.h (gfc_simplify_sizeof,
1433         gfc_simplify_storage_size): New prototypes.
1434         * intrinsic.c (add_functions): Use them.
1435         * simplify.c (gfc_simplify_sizeof,
1436         gfc_simplify_storage_size): New functions.
1438 2013-03-27  Janne Blomqvist  <jb@gcc.gnu.org>
1440         PR fortran/25708
1441         * module.c (module_locus): Use long for position.
1442         (module_content): New variable.
1443         (module_pos): Likewise.
1444         (prev_character): Remove.
1445         (bad_module): Free data instead of closing mod file.
1446         (set_module_locus): Use module_pos.
1447         (get_module_locus): Likewise.
1448         (module_char): use buffer rather than stdio file.
1449         (module_unget_char): Likewise.
1450         (read_module_to_tmpbuf): New function.
1451         (gfc_use_module): Call read_module_to_tmpbuf.
1453 2013-03-26  Tobias Burnus  <burnus@net-b.de>
1455         PR fortran/56649
1456         * simplify.c (gfc_simplify_merge): Simplify more.
1458 2013-03-25  Tobias Burnus  <burnus@net-b.de>
1460         PR fortran/38536
1461         PR fortran/38813
1462         PR fortran/38894
1463         PR fortran/39288
1464         PR fortran/40963
1465         PR fortran/45824
1466         PR fortran/47023
1467         PR fortran/47034
1468         PR fortran/49023
1469         PR fortran/50269
1470         PR fortran/50612
1471         PR fortran/52426
1472         PR fortran/54263
1473         PR fortran/55343
1474         PR fortran/55444
1475         PR fortran/55574
1476         PR fortran/56079
1477         PR fortran/56378
1478         * check.c (gfc_var_strlen): Properly handle 0-sized string.
1479         (gfc_check_c_sizeof): Use is_c_interoperable, add checks.
1480         (is_c_interoperable, gfc_check_c_associated, gfc_check_c_f_pointer,
1481         gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc): New
1482         functions.
1483         * expr.c (check_inquiry): Add c_sizeof, compiler_version and
1484         compiler_options.
1485         (gfc_check_pointer_assign): Refine function result check.
1486         gfortran.h (gfc_isym_id): Add GFC_ISYM_C_ASSOCIATED,
1487         GFC_ISYM_C_F_POINTER, GFC_ISYM_C_F_PROCPOINTER, GFC_ISYM_C_FUNLOC,
1488         GFC_ISYM_C_LOC.
1489         (iso_fortran_env_symbol, iso_c_binding_symbol): Handle
1490         NAMED_SUBROUTINE.
1491         (generate_isocbinding_symbol): Update prototype.
1492         (get_iso_c_sym): Remove.
1493         (gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New prototypes.
1494         * intrinsic.c (gfc_intrinsic_subroutine_by_id): New function.
1495         (gfc_intrinsic_sub_interface): Use it.
1496         (add_functions, add_subroutines): Add missing C-binding intrinsics.
1497         (gfc_intrinsic_func_interface): Add special case for c_loc.
1498         gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New functions.
1499         (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Use them.
1500         * intrinsic.h (gfc_check_c_associated, gfc_check_c_f_pointer,
1501         gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc,
1502         gfc_resolve_c_loc, gfc_resolve_c_funloc): New prototypes.
1503         * iresolve.c (gfc_resolve_c_loc, gfc_resolve_c_funloc): New
1504         functions.
1505         * iso-c-binding.def: Split PROCEDURE into NAMED_SUBROUTINE and
1506         NAMED_FUNCTION.
1507         * iso-fortran-env.def: Add NAMED_SUBROUTINE for completeness.
1508         * module.c (create_intrinsic_function): Support subroutines and
1509         derived-type results.
1510         (use_iso_fortran_env_module): Update calls.
1511         (import_iso_c_binding_module): Ditto; update calls to
1512         generate_isocbinding_symbol.
1513         * resolve.c (find_arglists): Skip for intrinsic symbols.
1514         (gfc_resolve_intrinsic): Find intrinsic subs via id.
1515         (is_scalar_expr_ptr, gfc_iso_c_func_interface,
1516         set_name_and_label, gfc_iso_c_sub_interface): Remove.
1517         (resolve_function, resolve_specific_s0): Remove calls to those.
1518         (resolve_structure_cons): Fix handling.
1519         * symbol.c (gen_special_c_interop_ptr): Update c_ptr/c_funptr
1520         generation.
1521         (gen_cptr_param, gen_fptr_param, gen_shape_param,
1522         build_formal_args, get_iso_c_sym): Remove.
1523         (std_for_isocbinding_symbol): Handle NAMED_SUBROUTINE.
1524         (generate_isocbinding_symbol): Support hidden symbols and
1525         using c_ptr/c_funptr symtrees for nullptr defs.
1526         * target-memory.c (gfc_target_encode_expr): Fix handling
1527         of c_ptr/c_funptr.
1528         * trans-expr.c (conv_isocbinding_procedure): Remove.
1529         (gfc_conv_procedure_call): Remove call to it.
1530         (gfc_trans_subcomponent_assign, gfc_conv_expr): Update handling
1531         of c_ptr/c_funptr.
1532         * trans-intrinsic.c (conv_isocbinding_function,
1533         conv_isocbinding_subroutine): New.
1534         (gfc_conv_intrinsic_function, gfc_conv_intrinsic_subroutine):
1535         Call them.
1536         * trans-io.c (transfer_expr): Fix handling of c_ptr/c_funptr.
1537         * trans-types.c (gfc_typenode_for_spec,
1538         gfc_get_derived_type): Ditto.
1539         (gfc_init_c_interop_kinds): Handle NAMED_SUBROUTINE.
1541 2013-03-18  Tobias Burnus  <burnus@net-b.de>
1543         * gfortran.h (gfc_option_t): Remove flag_whole_file.
1544         * invoke.texi (-fno-whole-file): Remove.
1545         * lang.opt (fwhole-file): Change to Ignore.
1546         * options.c (gfc_init_options, gfc_post_options,
1547         gfc_handle_option): Remove !flag_whole_file handling
1548         * parse.c (resolve_all_program_units, translate_all_program_units,
1549         gfc_parse_file): Ditto.
1550         * resolve.c (resolve_global_procedure): Ditto.
1551         * trans-decl.c (gfc_get_symbol_decl, gfc_get_extern_function_decl,
1552         gfc_create_module_variable): Ditto.
1553         * trans-types.c (gfc_get_derived_type): Ditto.
1555 2013-03-15  Tobias Burnus  <burnus@net-b.de>
1557         PR fortran/56615
1558         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Pack arrays
1559         if they are not simply contiguous.
1561 2013-03-11  Tobias Burnus  <burnus@net-b.de>
1563         * gfortran.texi (STRUCTURE and RECORD): State more clearly how
1564         to convert them into derived types.
1566 2013-03-10  Paul Thomas  <pault@gcc.gnu.org>
1568         PR fortran/56575
1569         * expr.c (gfc_default_initializer): Check that a class declared
1570         type has any components.
1571         * resolve.c (resolve_fl_derived0): On failing the test for C437
1572         set the type to BT_UNKNOWN to prevent repeat error messages.
1574 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
1576         PR fortran/56477
1577         * expr.c (gfc_check_pointer_assign): Avoid NULL pointer dereference.
1579 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
1581         PR fortran/54730
1582         * array.c (gfc_match_array_constructor): Set a checkpoint before
1583         matching a typespec.  Drop it on success, restore it otherwise.
1585 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
1587         PR fortran/54730
1588         * gfortran.h (struct gfc_undo_change_set): New field 'previous'.
1589         (gfc_new_undo_checkpoint, gfc_drop_last_undo_checkpoint,
1590         gfc_restore_last_undo_checkpoint): New prototypes.
1591         * symbol.c (default_undo_chgset_var): Update initialization.
1592         (single_undo_checkpoint_p, gfc_new_undo_checkpoint,
1593         free_undo_change_set_data, pop_undo_change_set,
1594         gfc_drop_last_undo_checkpoint, enforce_single_undo_checkpoint):
1595         New functions.
1596         (save_symbol_data): Handle multiple change sets.  Make sure old_symbol
1597         field's previous value is not overwritten.  Clear gfc_new field.
1598         (restore_old_symbol): Restore previous old_symbol field.
1599         (gfc_restore_last_undo_checkpoint): New function, using body renamed
1600         from gfc_undo_symbols.  Restore the previous change set as current one.
1601         (gfc_undo_symbols): New body.
1602         (gfc_commit_symbols, gfc_commit_symbol, gfc_enforce_clean_symbol_state):
1603         Call enforce_single_undo_checkpoint.
1604         (gfc_symbol_done_2): Ditto.  Free change set data.
1606 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
1608         * symbol.c (restore_old_symbol): Fix thinko.
1610 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
1612         * symbol.c (gfc_undo_symbols): Move code...
1613         (restore_old_symbol): ... here as a new function.
1615 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
1617         * Make-lang.in (F95_PARSER_OBJS): Add dependency to vec.h.
1618         * gfortran.h: Include vec.h.
1619         (gfc_undo_change_set): New struct.
1620         * symbol.c (tentative_tbp): Remove struct.
1621         (changed_syms, tentative_tbp_list): Remove variables.
1622         (default_undo_chgset_var, latest_undo_chgset): New variables.
1623         (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
1624         gfc_commit_symbols, gfc_commit_symbol,
1625         gfc_enforce_clean_symbol_state, gfc_get_typebound_proc):
1626         Use latest_undo_chgset instead of changed_syms and tentative_tbp_list.
1628 2013-03-01  Tobias Burnus  <burnus@net-b.de>
1630         PR fortran/56491
1631         * iresolve.c (resolve_bound): Use gfc_get_string instead of xstrdup.
1632         * symbol.c (free_components): Free proc-pointer components.
1634 2013-03-01  Tobias Burnus  <burnus@net-b.de>
1636         * trans-decl.c (gfc_trans_deferred_vars): Free expr after use.
1637         * trans-io.c (build_dt): Ditto.
1639 2013-02-24  Joseph Myers  <joseph@codesourcery.com>
1641         * resolve.c (generate_component_assignments): Don't use UTF-8
1642         ligature in diagnostic.
1644 2013-02-21  Janus Weil  <janus@gcc.gnu.org>
1646         PR fortran/56385
1647         * trans-array.c (structure_alloc_comps): Handle procedure-pointer
1648         components with allocatable result.
1650 2013-02-21  Tobias Burnus  <burnus@net-b.de>
1652         PR fortran/56416
1653         * gfortran.texi (Part II: Language Reference, Extensions,
1654         Non-Fortran Main Program): Sort @menu to match actual section order.
1655         * intrinsic.texi (Intrinsic Procedures): Ditto.
1656         (C_F_POINTER, PRECISION): Move to the alphabetically correct place.
1658 2013-02-15  Tobias Burnus  <burnus@net-b.de>
1659             Mikael Morin  <mikael@gcc.gnu.org>
1661         PR fortran/56318
1662         * simplify.c (gfc_simplify_matmul): Fix result shape
1663         and matmul result.
1665 2013-02-15  Tobias Burnus  <burnus@net-b.de>
1667         PR fortran/53818
1668         * resolve.c (apply_default_init_local): Don't create an
1669         initializer for a result variable.
1671 2013-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
1673         PR fortran/56224
1674         * gfortran.h (gfc_add_include_path):  Add boolean argument
1675         for warn.
1676         * scanner.c (gfc_add_include_path):  Pass along warn argument
1677         to add_path_to_list.
1678         * options.c (gfc_post_options):  Add true warn argument to
1679         gfc_add_include_path.
1680         (gfc_handle_module_path_options):  Likewise.
1681         (gfc_handle_option): Also gfc_add_include_path for intrinsic
1682         modules, without warning.
1684 2013-02-14  Paul Thomas  <pault@gcc.gnu.org>
1685             Tobias Burnus  <burnus@net-b.de>
1687         PR testsuite/56138
1688         * trans-decl.c (gfc_get_symbol_decl): Fix deferred-length
1689         results for functions without extra result variable.
1691         Revert:
1692         2013-01-30  Tobias Burnus  <burnus@net-b.de>
1694         PR fortran/56138
1695         * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
1696         results for functions without extra result variable.
1698 2013-02-12  Janus Weil  <janus@gcc.gnu.org>
1700         PR fortran/46952
1701         * resolve.c (resolve_call): Do not check deferred procedures for
1702         recursiveness.
1704 2013-02-09  Paul Thomas  <pault@gcc.gnu.org>
1706         PR fortran/55362
1707         * check.c (array_check): It is an error if a procedure is
1708         passed.
1710 2013-02-08  Mikael Morin  <mikael@gcc.gnu.org>
1712         PR fortran/54107
1713         * trans-types.c (gfc_get_function_type): Change a NULL backend_decl
1714         to error_mark_node on entry.  Detect recursive types.  Build a variadic
1715         procedure type if the type is recursive.  Restore the initial
1716         backend_decl.
1718 2013-02-07  Tobias Burnus  <burnus@net-b.de>
1720         PR fortran/54339
1721         * gfortran.texi (Standards): Mention TS29113.
1722         (Varying Length Character): Mention deferred-length
1723         strings.
1724         (Fortran 2003 Status): Add unlimited polymorphic.
1725         (TS 29113 Status): Add TYPE(*) and DIMENSION(..).
1726         (C Interop): Update the section about TS29113.
1728 2013-02-06  Paul Thomas  <pault@gcc.gnu.org>
1730         PR fortran/55789
1731         * trans-array.c (trans_array_constructor): Remove condition
1732         'dynamic' = true if the loop ubound is a VAR_DECL.
1734 2013-02-04  Paul Thomas  <pault@gcc.gnu.org>
1736         PR fortran/56008
1737         PR fortran/47517
1738         * trans-array.c (gfc_alloc_allocatable_for_assignment): Save
1739         the lhs descriptor before it is modified for reallocation. Use
1740         it to deallocate allocatable components in the reallocation
1741         block.  Nullify allocatable components for newly (re)allocated
1742         arrays.
1744 2013-02-04  Mikael Morin  <mikael@gcc.gnu.org>
1746         PR fortran/54195
1747         * resolve.c (resolve_typebound_procedures): Recurse through
1748         resolve_symbol.
1750 2013-02-04  Mikael Morin  <mikael@gcc.gnu.org>
1752         PR fortran/54107
1753         PR fortran/54195
1754         * gfortran.h (struct gfc_symbol): New field 'resolved'.
1755         * resolve.c (resolve_fl_var_and_proc): Don't skip result symbols.
1756         (resolve_symbol): Skip duplicate calls.  Don't check the current
1757         namespace.
1759 2013-02-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
1761         PR fortran/50627
1762         PR fortran/56054
1763         * decl.c (gfc_match_end):  Remove half-ready namespace
1764         from parent if the end of a block is missing.
1765         * parse.c (parse_module):  Do not put namespace into
1766         gsymbol on error.
1768 2013-01-30  Tobias Burnus  <burnus@net-b.de>
1770         PR fortran/56138
1771         * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
1772         results for functions without extra result variable.
1774 2013-01-29  Janus Weil  <janus@gcc.gnu.org>
1775             Mikael Morin  <mikael@gcc.gnu.org>
1777         PR fortran/54107
1778         * gfortran.h (gfc_component): Delete members 'formal' and 'formal_ns'.
1779         (gfc_copy_formal_args,gfc_copy_formal_args_ppc,gfc_expr_replace_symbols,
1780         gfc_expr_replace_comp): Delete.
1781         (gfc_sym_get_dummy_args): New prototype.
1782         * dependency.c (gfc_check_fncall_dependency): Use
1783         'gfc_sym_get_dummy_args'.
1784         * expr.c (gfc_is_constant_expr): Ditto.
1785         (replace_symbol,gfc_expr_replace_symbols,replace_comp,
1786         gfc_expr_replace_comp): Deleted.
1787         * frontend-passes.c (doloop_code,do_function): Use
1788         'gfc_sym_get_dummy_args'.
1789         * interface.c (gfc_check_operator_interface,gfc_compare_interfaces,
1790         gfc_procedure_use,gfc_ppc_use,gfc_arglist_matches_symbol,
1791         gfc_check_typebound_override): Ditto.
1792         * module.c (MOD_VERSION): Bump module version.
1793         (mio_component): Do not read/write 'formal' and 'formal_ns'.
1794         * resolve.c (resolve_procedure_interface,resolve_fl_derived0): Do not
1795         copy formal args, but just keep a pointer to the interface.
1796         (resolve_function,resolve_call,resolve_typebound_generic_call,
1797         resolve_ppc_call,resolve_expr_ppc,generate_component_assignments,
1798         resolve_fl_procedure,gfc_resolve_finalizers,check_generic_tbp_ambiguity,
1799         resolve_typebound_procedure,check_uop_procedure): Use
1800         'gfc_sym_get_dummy_args'.
1801         * symbol.c (free_components): Do not free 'formal' and 'formal_ns'.
1802         (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Deleted.
1803         (gfc_sym_get_dummy_args): New function.
1804         * trans-array.c (get_array_charlen,gfc_walk_elemental_function_args):
1805         Use 'gfc_sym_get_dummy_args'.
1806         * trans-decl.c (build_function_decl,create_function_arglist,
1807         build_entry_thunks,init_intent_out_dt,gfc_trans_deferred_vars,
1808         add_argument_checking): Ditto.
1809         * trans-expr.c (gfc_map_fcn_formal_to_actual,gfc_conv_procedure_call,
1810         gfc_conv_statement_function): Ditto.
1811         * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
1812         * trans-types.c (create_fn_spec,gfc_get_function_type): Ditto.
1814 2013-01-28  Tobias Burnus  <burnus@net-b.de>
1815             Mikael Morin  <mikael@gcc.gnu.org>
1817         PR fortran/53537
1818         * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
1819         interface block.
1820         (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
1821         * decl.c (gfc_match_data_decl): Ditto.
1822         (variable_decl): Remove undeclared type error.
1823         (gfc_match_import): Use renamed instead of original name.
1825 2013-01-27  Paul Thomas  <pault@gcc.gnu.org>
1827         PR fortran/55984
1828         PR fortran/56047
1829         * gfortran.h : Add associate_var to symbol_attr.
1830         * resolve.c (resolve_assoc_var): Set associate_var attribute.
1831         If the target class_ok is set, set it for the associate
1832         variable.
1833         * check.c (allocatable_check): Associate variables should not
1834         have the allocatable attribute even if their symbols do.
1835         * class.c (gfc_build_class_symbol): Symbols with associate_var
1836         set will always have a good class container.
1838 2013-01-23  Janus Weil  <janus@gcc.gnu.org>
1840         PR fortran/56081
1841         * resolve.c (resolve_select): Add argument 'select_type', reject
1842         non-scalar expressions.
1843         (resolve_select_type,resolve_code): Pass new argument to
1844         'resolve_select'.
1846 2013-01-23  Jakub Jelinek  <jakub@redhat.com>
1848         PR fortran/56052
1849         * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
1850         and DECL_IGNORED_P on select_type_temporary and don't set
1851         DECL_BY_REFERENCE.
1853 2013-01-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
1855         PR fortran/55919
1856         * scanner.c (add_path_to_list): Copy path to temporary and strip
1857         trailing directory separators before calling stat().
1859 2013-01-17  Richard Biener  <rguenther@suse.de>
1861         * trans-stmt.c (gfc_trans_do): Conditionally compute countm1
1862         dependent on sign of step, avoids repeated evaluation of
1863         step sign test.  Avoid undefined overflow issues by using unsigned
1864         arithmetic.
1866 2013-01-16  Janus Weil  <janus@gcc.gnu.org>
1868         PR fortran/55983
1869         * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
1870         asserting it.
1872 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
1873             Tobias Burnus  <burnus@net-b.de>
1875         PR driver/55884
1876         * lang.opt (fintrinsic-modules-path): Don't accept Joined.
1877         (fintrinsic-modules-path=): New.
1878         * options.c (gfc_handle_option, gfc_get_option_string,
1879         gfc_get_option_string): Handle the latter.
1881 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
1883         PR fortran/52865
1884         * trans-stmt.c (gfc_trans_do): Put countm1-- before conditional
1885         and use value of countm1 before the decrement in the condition.
1887 2013-01-15  Paul Thomas  <pault@gcc.gnu.org>
1889         PR fortran/54286
1890         * expr.c (gfc_check_pointer_assign): Check for presence of
1891         's2' before using it.
1893 2013-01-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
1895         PR fortran/55806
1896         * frontend-passes.c (optimize_reduction):  New function,
1897         including prototype.
1898         (callback_reduction):  Likewise.
1899         (gfc_run_passes):  Also run optimize_reduction.
1900         (copy_walk_reduction_arg):  New function.
1901         (dummy_code_callback):  New function.
1903 2013-01-13  Jakub Jelinek  <jakub@redhat.com>
1905         PR fortran/55935
1906         * trans-expr.c (gfc_conv_structure): Call
1907         unshare_expr_without_location on the ctor elements.
1909 2013-01-13  Paul Thomas  <pault@gcc.gnu.org>
1911         PR fortran/54286
1912         * expr.c (gfc_check_pointer_assign): Ensure that both lvalue
1913         and rvalue interfaces are presented to gfc_compare_interfaces.
1914         Simplify references to interface names by using the symbols
1915         themselves. Call gfc_compare_interfaces with s1 and s2 inter-
1916         changed to overcome the asymmetry of this function. Do not
1917         repeat the check for the presence of s1 and s2.
1919 2013-01-12  Janus Weil  <janus@gcc.gnu.org>
1921         PR fortran/55072
1922         * trans-array.c (gfc_conv_array_parameter): No packing was done for
1923         full arrays of derived type.
1925 2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
1927         PR fortran/55868
1928         * class.c (get_unique_type_string): Change $tar to STAR and
1929         replace sprintf by strcpy where there is no formatting.
1930         * decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
1932 2013-01-09  Mikael Morin  <mikael@gcc.gnu.org>
1934         PR fortran/47203
1935         * module.c (check_for_ambiguous): Get the current program unit using
1936         gfc_current_ns.
1938 2013-01-09  Tobias Burnus  <burnus@net-b.de>
1940         PR fortran/55758
1941         * resolve.c (resolve_symbol): Reject non-C_Bool logicals
1942         in BIND(C) procedures with -std=f*.
1944 2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
1946         PR fortran/55618
1947         * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
1948         character function arguments to elemental procedures in
1949         scalarization loops.
1951 2013-01-07  Tobias Burnus  <burnus@net-b.de>
1953         PR fortran/55763
1954         * gfortran.h (gfc_check_assign_symbol): Update prototype.
1955         * decl.c (add_init_expr_to_sym, do_parm): Update call.
1956         * expr.c (gfc_check_assign_symbol): Handle BT_CLASS and
1957         improve error location; support components.
1958         (gfc_check_pointer_assign): Handle component assignments.
1959         * resolve.c (resolve_fl_derived0): Call gfc_check_assign_symbol.
1960         (resolve_values): Update call.
1961         (resolve_structure_cons): Avoid double diagnostic.
1963 2013-01-07  Tobias Burnus  <burnus@net-b.de>
1964             Thomas Koenig  <tkoenig@gcc.gnu.org>
1966         PR fortran/55852
1967         * expr.c (gfc_build_intrinsic_call): Avoid clashes
1968         with user's procedures.
1969         * gfortran.h (gfc_build_intrinsic_call): Update prototype.
1970         * simplify.c (gfc_simplify_size): Update call.
1971         * class.c (finalization_scalarizer, finalization_get_offset,
1972         finalizer_insert_packed_call, generate_finalization_wrapper):
1973         Clean up by using gfc_build_intrinsic_call.
1975 2013-01-07  Tobias Burnus  <burnus@net-b.de>
1977         PR fortran/55763
1978         * resolve.c (resolve_select_type): Reject intrinsic types for
1979         a non-unlimited-polymorphic selector.
1981 2013-01-06  Paul Thomas  <pault@gcc.gnu.org>
1983         PR fortran/53876
1984         PR fortran/54990
1985         PR fortran/54992
1986         * trans-array.c (build_array_ref): Check the TYPE_CANONICAL
1987         to see if it is GFC_CLASS_TYPE_P.
1988         * trans-expr.c (gfc_get_vptr_from_expr): The same.
1989         (gfc_conv_class_to_class): If the types are not the same,
1990         cast parmese->expr to the type of ctree.
1991         * trans-types.c (gfc_get_derived_type): GFC_CLASS_TYPE_P of
1992         CLASS components must be set.
1994 2013-01-06  Mikael Morin  <mikael@gcc.gnu.org>
1996         PR fortran/42769
1997         PR fortran/45836
1998         PR fortran/45900
1999         * module.c (read_module): Don't reuse local symtree if the associated
2000         symbol isn't exactly the one wanted.  Don't reuse local symtree if it is
2001         ambiguous.
2002         * resolve.c (resolve_call): Use symtree's name instead of symbol's to
2003         lookup the symtree.
2005 2013-01-05  Steven G. Kargl  <kargl@gcc.gnu.org>
2006             Mikael Morin  <mikael@gcc.gnu.org>
2008         PR fortran/55827
2009         * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
2010         e->symtree == NULL.
2011         * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
2013 2013-01-05  Tobias Burnus  <burnus@net-b.de>
2015         * class.c (finalize_component): Used passed offset expr.
2016         (finalization_get_offset): New static function.
2017         (finalizer_insert_packed_call, generate_finalization_wrapper): Use it
2018         to handle noncontiguous arrays.
2020 2013-01-04  Tobias Burnus  <burnus@net-b.de>
2022         * trans.c (gfc_build_final_call): New function.
2023         * trans.h (gfc_build_final_call, gfc_conv_scalar_to_descriptor):
2024         New function prototypes.
2025         * trans-expr.c (gfc_conv_scalar_to_descriptor): Renamed from
2026         conv_scalar_to_descriptor, removed static attribute.
2027         (gfc_conv_procedure_call): Honor renaming.
2029 2013-01-04  Tobias Burnus  <burnus@net-b.de>
2031         * intrinsic.c (add_functions): New internal intrinsic
2032         function GFC_PREFIX ("stride").
2033         * gfortran.h (gfc_isym_id): Add GFC_ISYM_STRIDE.
2034         * intrinsic.h (gfc_resolve_stride): New prototypes.
2035         * iresolve.c (gfc_resolve_stride): New function.
2036         * trans-intrinsic.c (conv_intrinsic_stride): New static
2037         function.
2038         (gfc_conv_intrinsic_function): Use it.
2040 2013-01-04  Tobias Burnus  <burnus@net-b.de>
2042         * class.c (gfc_find_intrinsic_vtab): Add _final
2043         component.
2044         * decl.c (gfc_match_null): Remove superfluous
2045         variadic argument to gfc_match.
2047 2013-01-04  Paul Thomas  <pault@gcc.gnu.org>
2049         PR fortran/55172
2050         * match.c (copy_ts_from_selector_to_associate): Remove call to
2051         gfc_resolve_expr and replace it with explicit setting of the
2052         array reference type.
2053         * resolve.c (resolve_select_type): It is an error if the
2054         selector is coindexed.
2056 2013-01-04  Tobias Burnus  <burnus@net-b.de>
2058         PR fortran/55763
2059         * decl.c (gfc_match_null): Parse and reject MOLD.
2061 2013-01-04  Tobias Burnus  <burnus@net-b.de>
2063         PR fortran/55854
2064         PR fortran/55763
2065         * class.c (gfc_class_null_initializer): Fix finding the vtab.
2066         (gfc_find_intrinsic_vtab): Use BT_VOID for some components.
2068 2013-01-03  Janus Weil  <janus@gcc.gnu.org>
2070         PR fortran/55855
2071         * expr.c (gfc_check_assign): Use 'gfc_expr_attr' to evaluate attributes
2072         of rvalue. Correct hyphenation in error message.
2074 2013-01-03  Jakub Jelinek  <jakub@redhat.com>
2076         * gfortranspec.c (lang_specific_driver): Update copyright notice
2077         dates.
2079 Copyright (C) 2013 Free Software Foundation, Inc.
2081 Copying and distribution of this file, with or without modification,
2082 are permitted in any medium without royalty provided the copyright
2083 notice and this notice are preserved.