2013-08-12 Thomas Koenig <tkoenig@gcc.gnu.org>
[official-gcc.git] / gcc / fortran / ChangeLog
blobba34ac1c5ab6d964c5337e0f8e654b4782e862fc
1 2013-08-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
3         PR fortran/56666
4         * gfortran.h (gfc_option_t):  Add warn_zerotrip.
5         * invoke.texi (-Wzerotrip):  Document option.
6         * lang.opt (Wzerotrip):  Add.
7         * options.c (gfc_init_options):  Initialize warn_zerotrip.
8         (set_Wall): Add handling of warn_zerotrip.
9         (gfc_handle_option):  Handle OPT_Wzerotrip.
10         * resolve.c (gfc_resolve_iterator): Honor
11         gfc_option.warn_zerotrip; update error message to show
12         how to suppress the warning.
14 2013-08-09  Janus Weil  <janus@gcc.gnu.org>
16         * gfortran.h (gfc_get_code): Modified prototype.
17         * class.c (finalize_component, finalization_scalarizer,
18         finalization_get_offset, finalizer_insert_packed_call,
19         generate_finalization_wrapper, gfc_find_derived_vtab,
20         gfc_find_intrinsic_vtab): Use 'gfc_get_code'.
21         * io.c (match_io_iterator, match_io_element, terminate_io, get_io_list,
22         gfc_match_inquire): Call 'gfc_get_code' with argument.
23         * match.c (match_simple_forall, gfc_match_forall, gfc_match_goto,
24         gfc_match_nullify, gfc_match_call, match_simple_where, gfc_match_where):
25         Ditto.
26         * parse.c (new_level): Ditto.
27         (add_statement): Use XCNEW.
28         * resolve.c (resolve_entries, resolve_allocate_expr,
29         resolve_select_type, build_assignment, build_init_assign): Call
30         'gfc_get_code' with argument.
31         * st.c (gfc_get_code): Add argument 'op'.
32         * trans-expr.c (gfc_trans_class_array_init_assign): Call 'gfc_get_code'
33         with argument.
34         * trans-stmt.c (gfc_trans_allocate): Ditto.
36 2013-08-09  Janus Weil  <janus@gcc.gnu.org>
38         PR fortran/58058
39         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Free the temporary
40         string, if necessary.
42 2013-08-06  Martin Jambor  <mjambor@suse.cz>
44         PR fortran/57987
45         * trans-decl.c (gfc_generate_function_code): Never call
46         cgraph_finalize_function on nested functions.
48 2013-08-06  Janus Weil  <janus@gcc.gnu.org>
50         PR fortran/57306
51         * class.c (gfc_class_null_initializer): Rename to
52         'gfc_class_initializer'. Treat non-NULL init-exprs.
53         * gfortran.h (gfc_class_null_initializer): Update prototype.
54         * trans-decl.c (gfc_get_symbol_decl): Treat class variables.
55         * trans-expr.c (gfc_conv_initializer): Ditto.
56         (gfc_trans_subcomponent_assign): Renamed gfc_class_null_initializer.
58 2013-07-30  Tobias Burnus  <burnus@net-b.de>
60         PR fortran/57530
61         * symbol.c (gfc_type_compatible): A type is type compatible with
62         a class if both have the same declared type.
63         * interface.c (compare_type): Reject CLASS/TYPE even if they
64         are type compatible.
66 2013-07-30  Tobias Burnus  <burnus@net-b.de>
68         PR fortran/57530
69         * trans-expr.c (gfc_trans_class_assign): Handle CLASS array
70         functions.
71         (gfc_trans_pointer_assign): Ditto and support pointer assignment of
72         a polymorphic var to a nonpolymorphic var.
74 2013-07-22  Po Chang  <pchang9@cs.wisc.edu>
76         * match.c (gfc_match_call): Exit loop after setting i.
78         * resolve.c (resolve_variable): Exit loop after setting seen.
80         * expr.c (gfc_check_pointer_assign): Exit loop after setting warn.
82         * trans-array.c (set_loop_bounds): Exit loop after setting
83         nonoptional_arr.
85         * trans-io.c (gfc_trans_transfer): Exit loop after setting seen_vector.
87 2013-07-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
89         PR fortran/58009
90         * expr.c (gfc_check_vardef_context):  Check for same values in
91         vector expression subscripts.
93 2013-07-27  Tobias Burnus  <burnus@net-b.de>
95         PR fortran/57991
96         * interface.c (check_some_aliasing): Also warn for intent OUT/OUT.
98 2013-07-27  Janus Weil  <janus@gcc.gnu.org>
100         PR fortran/57285
101         * check.c (dim_rank_check): Re-enable this check for CLASS arrays.
103 2013-07-25  Janus Weil  <janus@gcc.gnu.org>
105         PR fortran/57966
106         * resolve.c (resolve_typebound_function): Make sure the declared type,
107         including its type-bound procedures, is resolved before resolving the
108         actual type-bound call.
110 2013-07-25  Janus Weil  <janus@gcc.gnu.org>
112         PR fortran/57639
113         * interface.c (compare_parameter): Check for class_ok.
114         * simplify.c (gfc_simplify_same_type_as): Ditto.
116 2013-07-23   Ondřej Bílka  <neleai@seznam.cz>
118         * decl.c: Fix comment typos.
119         * interface.c: Likewise.
120         * trans-array.c: Likewise.
121         * trans.c: Likewise.
123 2013-07-22  Tobias Burnus  <burnus@net-b.de>
125         PR fortran/57906
126         PR fortran/52052
127         * class.c (gfc_build_class_symbol): Set coarray_comp.
128         * trans-array.c (structure_alloc_comps): For coarrays,
129         directly use the data pointer address.
131 2013-07-22  Chang  <pchang9@cs.wisc.edu>
133         * trans-decl.c (gfc_build_dummy_array_decl): Exit loop after
134         setting PACKED_PARTIAL.
136 2013-07-22  Tobias Burnus  <burnus@net-b.de>
138         * trans-array.c (gfc_array_allocate): Correct memory-leak patch.
140 2013-07-22  Tobias Burnus  <burnus@net-b.de>
142         * trans-array.c (gfc_array_allocate,
143         gfc_trans_deferred_array): Plug memory leak.
145 2013-07-21  Ondřej Bílka  <neleai@seznam.cz>
147         * trans-decl.c: Fix comment typos.
148         * trans-expr.c: Ditto.
150 2013-07-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
152         PR fortran/56937
153         * dependency.c (gfc_dep_resolver):  Treat identical
154         array subscripts as identical; don't unconditionally
155         return a dependency if an array subscript is found.
157 2013-07-21  Tobias Burnus  <burnus@net-b.de>
159         PR fortran/35862
160         * libgfortran.h (GFC_FPE_DOWNWARD, GFC_FPE_TONEAREST,
161         GFC_FPE_TOWARDZERO, GFC_FPE_UPWARD): New defines.
163 2013-07-21  Tobias Burnus  <burnus@net-b.de>
165         PR fortran/57894
166         * check.c (min_max_args): Add keyword= check.
168 2013-07-17  Mikael Morin  <mikael@gcc.gnu.org>
169             Tobias Burnus  <burnus@net-b.de>
171         PR fortran/57895
172         * match.c (gfc_match_name): Ensure that the error
173         message regarding -fdollar-ok gets printed.
174         (gfc_match_common): Avoid multiple freeing.
176 2013-07-16  Tobias Burnus  <burnus@net-b.de>
178         PR fortran/57912
179         * trans-expr.c (gfc_trans_scalar_assign): Correct if
180         condition for caf realloc.
182 2013-07-15  Tobias Burnus  <burnus@net-b.de>
184         * trans-array.h (gfc_deallocate_alloc_comp_no_caf,
185         gfc_reassign_alloc_comp_caf): New prototype.
186         * trans-array.c (enum): Add DEALLOCATE_ALLOC_COMP_NO_CAF
187         and COPY_ALLOC_COMP_CAF.
188         (structure_alloc_comps): Handle it.
189         (gfc_reassign_alloc_comp_caf,
190         gfc_deallocate_alloc_comp_no_caf): New function.
191         (gfc_alloc_allocatable_for_assignment): Call it.
192         * trans-expr.c (gfc_trans_scalar_assign,
193         gfc_trans_arrayfunc_assign, gfc_trans_assignment_1): Ditto.
194         * parse.c (parse_derived): Correctly set coarray_comp.
195         * resolve.c (resolve_symbol): Improve error wording.
197 2013-07-15  Tobias Burnus  <burnus@net-b.de>
199         PR fortran/37336
200         * trans.c (gfc_add_comp_finalizer_call): New function.
201         * trans.h (gfc_add_comp_finalizer_call): New prototype.
202         * trans-array.c (structure_alloc_comps): Call it.
204 2013-07-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
205             Tobias Burnus  <burnus@gcc.gnu.org>
207         PR fortran/52669
208         * trans-decl.c (gfc_finish_var_decl):  Move setting of
209         PRIVATE for a module variable if the module has a private
210         default or -fmodule-private is given to...
211         (gfc_create_module_variable): here. Optionally
212         warn about private module variable which is not used.
214 2013-07-08  Tobias Burnus  <burnus@net-b.de>
216         PR fortran/57834
217         * check.c (is_c_interoperable): Add special case for c_f_pointer.
218         (explicit-size, gfc_check_c_f_pointer, gfc_check_c_loc): Update
219         call.
221 2013-07-08  Tobias Burnus  <burnus@net-b.de>
223         PR fortran/50554
224         * io.c (match_inquire_element): Add missing do-var check.
226 2013-07-08  Tobias Burnus  <burnus@net-b.de>
228         PR fortran/57785
229         * simplify.c (compute_dot_product): Complex conjugate for
230         dot_product.
231         (gfc_simplify_dot_product, gfc_simplify_matmul): Update call.
233 2013-07-08  Tobias Burnus  <burnus@net-b.de>
235         PR fortran/57469
236         * trans-decl.c (generate_local_decl): Don't warn that
237         a dummy is unused, when it is in a namelist.
239 2013-07-01  Dominique d'Humieres  <dominiq@lps.ens.fr>
241         PR fortran/54788
242         * array.c (spec_size): handle the case as==NULL.
244 2013-06-26  Tobias Burnus  <burnus@net-b.de>
246         PR fortran/29800
247         * trans-array.c (gfc_conv_array_ref): Improve out-of-bounds
248         diagnostic message.
249         * trans-array.c (gfc_conv_array_ref): Update prototype.
250         * trans-expr.c (gfc_conv_variable): Update call.
252 2013-06-24  Steven G. Kargl  <sgk@troutmask.apl.washington.edu>
253             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
254             Dominique d'Humieres  <dominiq@lps.ens.fr>
256         PR fortran/52413
257         * simplify.c (gfc_simplify_fraction): Fix the sign of negative values.
259 2013-06-21  Tobias Burnus  <burnus@net-b.de>
261         PR fortran/37336
262         * trans-array.c (gfc_trans_deferred_array): Call the
263         finalizer for nonallocatable local variables.
264         * trans-decl.c (gfc_get_symbol_decl): Add local
265         finalizable vars to the deferred list.
266         (gfc_trans_deferred_vars): Call gfc_trans_deferred_array
267         for those.
269 2013-06-21  Tobias Burnus  <burnus@net-b.de>
271         * trans-array.c (gfc_alloc_allocatable_for_assignment): Allocate
272         at least one byte.
273         * trans-expr.c (alloc_scalar_allocatable_for_assignment): Ditto.
275 2013-06-20  Tobias Burnus  <burnus@net-b.de>
277         * resolve.c (get_temp_from_expr): Don't set FL_VARIABLE twice.
279 2013-06-17  Tobias Burnus  <burnus@net-b.de>
281         * gfortran.h (gfc_option_t): Add fpe_summary.
282         * gfortran.texi (_gfortran_set_options): Update.
283         * invoke.texi (-ffpe-summary): Add doc.
284         * lang.opt (ffpe-summary): Add flag.
285         * options.c (gfc_init_options, gfc_handle_option): Handle it.
286         (gfc_handle_fpe_option): Renamed from gfc_handle_fpe_trap_option,
287         also handle fpe_summary.
288         * trans-decl.c (create_main_function): Update
289         _gfortran_set_options call.
291 2013-06-15  Mikael Morin  <mikael@gcc.gnu.org>
293         PR fortran/49074
294         PR fortran/56136
295         * dependency.c (gfc_check_argument_var_dependency): Return 0 in the
296         array constructor case.
298 2013-06-14  Tobias Burnus  <burnus@net-b.de>
300         PR fortran/57508
301         * resolve.c (get_temp_from_expr): Don't copy function
302         result attributes to temporary.
304 2013-06-14  Tobias Burnus  <burnus@net-b.de>
306         PR fortran/57596
307         * trans-decl.c (gfc_trans_deferred_vars): Honor OPTIONAL
308         for nullify and deferred-strings' length variable.
310 2013-06-13  Mikael Morin  <mikael@gcc.gnu.org>
312         PR fortran/49074
313         * trans-expr.c (gfc_conv_variable): Don't walk the reference chain.
314         Handle NULL array references.
315         (gfc_conv_procedure_call): Remove code handling NULL array references.
317 2013-06-11  Tobias Burnus  <burnus@net-b.de>
319         PR fortran/57535
320         * trans-array.c (build_class_array_ref): Fix ICE for
321         function result variables.
323 2013-06-08  Tobias Burnus  <burnus@net-b.de>
325         PR fortran/37336
326         * trans-decl.c (init_intent_out_dt): Call finalizer
327         when appropriate.
329 2013-06-08  Tobias Burnus  <burnus@net-b.de>
331         PR fortran/57553
332         * simplify.c (gfc_simplify_storage_size): Handle literal
333         strings.
334         * trans-intrinsic.c (gfc_conv_intrinsic_storage_size):
335         Add missing fold_convert.
337 2013-06-07  Tobias Burnus  <burnus@net-b.de>
339         PR fortran/57549
340         * array.c (gfc_match_array_constructor): Call
341         gfc_match_type_spec instead of gfc_match_decl_type_spec.
342         * match.c (gfc_match_type_spec): Renamed from match_type_spec.
343         (gfc_match_type_is, gfc_match_allocate): Update call.
344         * match.h (gfc_match_type_spec): Add prototype.
346 2013-06-07  Tobias Burnus  <burnus@net-b.de>
348         PR fortran/57556
349         * trans.c (gfc_build_final_call): Init block before use.
351 2013-06-06  Tobias Burnus  <burnus@net-b.de>
353         PR fortran/57542
354         * trans.c (gfc_build_final_call): Add se.pre to the block
355         and modify the assert.
357 2013-06-04  Tobias Burnus  <burnus@net-b.de>
359         PR fortran/37336
360         * trans.h (gfc_build_final_call): Remove prototype.
361         (gfc_add_finalizer_call): Add prototype.
362         * trans-array.c (gfc_trans_dealloc_allocated): Support finalization.
363         (structure_alloc_comps): Update caller.
364         (gfc_trans_deferred_array): Call finalizer.
365         * trans-array.h (gfc_trans_dealloc_allocated): Update prototype.
366         * trans-decl.c (gfc_trans_deferred_vars): Don't deallocate/finalize
367         variables of the main program.
368         * trans-expr.c (gfc_conv_procedure_call): Support finalization.
369         * trans-openmp.c (gfc_omp_clause_dtor,
370         gfc_trans_omp_array_reduction): Update calls.
371         * trans-stmt.c (gfc_trans_deallocate): Avoid double deallocation
372         of alloc components.
373         * trans.c (gfc_add_finalizer_call): New function.
374         (gfc_deallocate_with_status,
375         gfc_deallocate_scalar_with_status): Call it
376         (gfc_build_final_call): Fix handling of scalar coarrays,
377         move up in the file and make static.
379 2013-06-01  Janus Weil  <janus@gcc.gnu.org>
380             Mikael Morin  <mikael@gcc.gnu.org>
382         * error.c (get_terminal_width): Only limit the width if we're
383         outputting to a terminal. Try to determine width via ioctl.
385 2013-06-01  Tobias Burnus  <burnus@net-b.de>
387         * decl.c (add_global_entry): Take locus.
388         (gfc_match_entry): Update call.
389         (gfc_match_end): Better error location.
390         * parse.c (parse_block_data, parse_module, add_global_procedure,
391         add_global_program): Use better locus data.
393 2013-05-31  Tobias Burnus  <burnus@net-b.de>
395         PR fortran/57456
396         * trans-array.c (gfc_array_init_size): Use passed type spec,
397         when available.
398         (gfc_array_allocate): Pass typespec on.
399         * trans-array.h (gfc_array_allocate): Update prototype.
400         * trans-stmt.c (gfc_trans_allocate): Pass typespec on.
402 2013-05-31  Janus Weil  <janus@gcc.gnu.org>
404         PR fortran/54190
405         PR fortran/57217
406         * gfortran.h (gfc_terminal_width): Remove prototype.
407         * error.c (get_terminal_width): Moved here from misc.c. Renamed.
408         Try to determine terminal width from environment variable.
409         * interface.c (compare_type, compare_rank): New functions. Fix assumed
410         type/rank handling.
411         (compare_type_rank, check_dummy_characteristics,
412         check_result_characteristics, gfc_compare_interfaces): Use them.
413         (symbol_rank): Slightly modified and moved.
414         * misc.c (gfc_terminal_width): Moved to error.c.
416 2013-05-30  Janus Weil  <janus@gcc.gnu.org>
418         PR fortran/54189
419         * resolve.c (check_assumed_size_reference): Check for e->ref.
421 2013-05-30  Tobias Burnus  <burnus@net-b.de>
423         PR fortran/57458
424         * interface.c (compare_parameter): Update C1239/C1240 constraint
425         check for assumed-rank/TS29113.
427 2013-05-29  Tobias Burnus  <burnus@net-b.de>
429         PR fortran/37336
430         * class.c (finalize_component): Fix coarray array refs.
431         (generate_finalization_wrapper): Only gfc_convert_type_warn
432         when the kind value is different.
433         (gfc_find_intrinsic_vtab): _copy's dst is now intent(inout).
434         (gfc_find_derived_vtab): Ditto. Enable finalization-wrapper
435         generation.
436         * module.c (MOD_VERSION): Bump.
437         (gfc_dump_module, gfc_use_module): Remove empty line in .mod.
438         * trans-array.c (gfc_conv_descriptor_token): Accept nonrestricted
439         void pointer.
440         (gfc_array_allocate, structure_alloc_comps): Don't nullify for
441         BT_CLASS allocations.
442         * trans-stmt.c (gfc_trans_allocate): Ditto.
444 2013-05-29  Tobias Burnus  <burnus@net-b.de>
446         PR fortran/37336
447         * resolve.c (gfc_resolve_finalizers): Remove not implemented error.
449 2013-05-28  Tobias Burnus  <burnus@net-b.de>
451         * trans-expr.c (gfc_conv_procedure_call): Deallocate
452         polymorphic arrays for allocatable intent(out) dummies.
453         (gfc_reset_vptr): New function, moved from trans-stmt.c
454         and extended.
455         * trans-stmt.c (reset_vptr): Remove.
456         (gfc_trans_deallocate): Update calls.
457         * trans.h (gfc_reset_vptr): New prototype.
459 2013-05-28  Dominique d'Humieres  <dominiq@lps.ens.fr>
461         PR fortran/57435
462         * module.c (check_for_ambiguous): Avoid null pointer deref.
464 2013-05-28  Janus Weil  <janus@gcc.gnu.org>
465             Tobias Burnus  <burnus@net-b.de>
467         PR fortran/57217
468         * interface.c (check_dummy_characteristics): Symmetrize type check.
470 2013-05-27  Bud Davis  <jmdavis@link.com>
472         PR fortran/50405
473         * resolve.c (resolve_formal_arglist): Detect error when an argument
474         has the same name as the function.
476 2013-05-27  Tobias Burnus  <burnus@net-b.de>
478         * expr.c (gfc_build_intrinsic_call): Make symbol as attr.artificial.
479         * intrinsic.c (gfc_is_intrinsic): Disable std check for those.
481 2013-05-22  Tobias Burnus  <burnus@net-b.de>
483         * resolve.c (get_temp_from_expr): Change mangling to
484         start always with a _.
486 2013-05-22  Tobias Burnus  <burnus@net-b.de>
488         * resolve.c (get_temp_from_expr): Fix temp var mangling.
490 2013-05-22  Tobias Burnus  <burnus@net-b.de>
492         PR fortran/57364
493         * resolve.c (get_temp_from_expr): Commit created sym.
495 2013-05-22  Tobias Burnus  <burnus@net-b.de>
497         PR fortran/57338
498         * intrinsic.c (do_check): Move some checks to ...
499         (do_ts29113_check): ... this new function.
500         (check_specific, gfc_intrinsic_sub_interface): Call it.
502 2013-05-22  Janne Blomqvist  <jb@gcc.gnu.org>
504         * intrinsic.texi (RANDOM_SEED): Improve example.
506 2013-05-21  Tobias Burnus  <burnus@net-b.de>
508         PR fortran/57035
509         * intrinsic.c (do_check): Add constraint check for
510         NO_ARG_CHECK, assumed rank and assumed type.
511         * gfortran.texi (NO_ARG_CHECK): Minor wording change,
512         allow PRESENT intrinsic.
514 2013-05-20  Tobias Burnus  <burnus@net-b.de>
516         PR fortran/48858
517         PR fortran/55465
518         * decl.c (add_global_entry): Add sym_name.
519         * parse.c (add_global_procedure): Ditto.
520         * resolve.c (resolve_bind_c_derived_types): Handle multiple decl for
521         a procedure.
522         (resolve_global_procedure): Handle gsym->ns pointing to a module.
523         * trans-decl.c (gfc_get_extern_function_decl): Ditto.
525 2013-05-20  Tobias Burnus  <burnus@net-b.de>
527         PR fortran/48858
528         * decl.c (add_global_entry): Use nonbinding name
529         only for F2003 or if no binding label exists.
530         (gfc_match_entry): Update calls.
531         * parse.c (gfc_global_used): Improve error message.
532         (add_global_procedure): Use nonbinding name
533         only for F2003 or if no binding label exists.
534         (gfc_parse_file): Update call.
535         * resolve.c (resolve_global_procedure): Use binding
536         name when available.
537         * trans-decl.c (gfc_get_extern_function_decl): Ditto.
539 2013-05-20  Tobias Burnus  <burnus@net-b.de>
541         PR fortran/48858
542         * decl.c (gfc_match_bind_c_stmt): Add gfc_notify_std.
543         * match.c (gfc_match_common): Don't add commons to gsym.
544         * resolve.c (resolve_common_blocks): Add to gsym and
545         add checks.
546         (resolve_bind_c_comms): Remove.
547         (resolve_types): Remove call to the latter.
548         * trans-common.c (gfc_common_ns): Remove static var.
549         (gfc_map_of_all_commons): Add static var.
550         (build_common_decl): Correctly handle binding label.
552 2013-05-16  Jason Merrill  <jason@redhat.com>
554         * Make-lang.in (f951$(exeext)): Use link mutex.
556 2013-05-05  Tobias Burnus  <burnus@net-b.de>
558         * resolve.c (conformable_arrays): Avoid segfault
559         when ar.start[i] == NULL.
561 2013-05-05  Tobias Burnus  <burnus@net-b.de>
563         PR fortran/57141
564         * decl.c (gfc_match_null): Permit use-associated
565         NULL intrinsic.
567 2013-05-04  Tobias Burnus  <burnus@net-b.de>
569         * decl.c (gfc_verify_c_interop_param): Permit allocatable
570         and pointer with -std=f2008ts.
572 2013-05-02  Tobias Burnus  <burnus@net-b.de>
574         PR fortran/57142
575         * simplify.c (gfc_simplify_size): Renamed from
576         simplify_size; fix kind=8 handling.
577         (gfc_simplify_size): New function.
578         (gfc_simplify_shape): Add range check.
579         * resolve.c (resolve_function): Fix handling
580         for ISYM_SIZE.
582 2013-05-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
584         * frontend-passes.c (optimize_power):  Fix typo
585         in comment.
587 2013-04-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
589         PR fortran/57071
590         * frontend-passes.c (optimize_power):  Simplify
591         1**k to 1.
593 2013-04-28  Tobias Burnus  <burnus@net-b.de>
595         PR fortran/57114
596         * intrinsic.texi (RANK): Correct syntax description and
597         expected result.
599 2013-04-28  Tobias Burnus  <burnus@net-b.de>
601         PR fortran/57093
602         * trans-types.c (gfc_get_element_type): Fix handling
603         of scalar coarrays of type character.
604         * intrinsic.texi (PACK): Add missing ")".
606 2013-04-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
608         PR fortran/57071
609         * frontend-passes (optimize_power):  New function.
610         (optimize_op):  Use it.
612 2013-04-25  Janne Blomqvist  <jb@gcc.gnu.org>
614         PR bootstrap/57028
615         * Make-lang.in (f951): Link in ZLIB.
616         (CFLAGS-fortran/module.o): Add zlib include directory.
618 2013-04-22  Janus Weil  <janus@gcc.gnu.org>
620         PR fortran/53685
621         PR fortran/57022
622         * check.c (gfc_calculate_transfer_sizes): Fix for array-valued SOURCE
623         expressions.
624         * simplify.c (gfc_simplify_sizeof,gfc_simplify_storage_size): Get rid
625         of special treatment for EXPR_ARRAY.
626         * target-memory.h (gfc_element_size): New prototype.
627         * target-memory.c (size_array): Remove.
628         (gfc_element_size): New function.
629         (gfc_target_expr_size): Modified to always return the full size of the
630         expression.
632 2013-04-20  Tobias Burnus  <burnus@net-b.de>
634         PR fortran/56907
635         * trans-intrinsic.c (conv_isocbinding_function): Don't pack array
636         passed to C_LOC
638 2013-04-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
639             Mikael Morin  <mikael@gcc.gnu.org>
641         PR fortran/56872
642         * frontend-passes.c (copy_walk_reduction_arg): Change argument type
643         to gfc_constructor.  If it has an iterator, wrap the copy of its
644         expression in an array constructor with that iterator.  Don't special
645         case function expressions.
646         (callback_reduction): Update caller.  Don't return early if there is
647         an iterator.
649 2013-04-18  Tobias Burnus  <burnus@net-b.de>
651         * expr.c (find_array_element): Don't copy expr.
652         * data.c (create_character_initializer): Free expr.
653         * frontend-passes.c (combine_array_constructor): Ditto.
654         * match.c (match_typebound_call, gfc_match_select_type): Ditto.
655         * resolve.c (resolve_typebound_function): Free gfc_ref.
657 2013-04-18  Tobias Burnus  <burnus@net-b.de>
659         PR fortran/56994
660         * invoke.texi (NEAREST): S argument is not optional.
662 2013-04-17  Janus Weil  <janus@gcc.gnu.org>
664         PR fortran/56814
665         * interface.c (check_result_characteristics): Get result from interface
666         if present.
668 2013-04-17  Janne Blomqvist  <jb@gcc.gnu.org>
670         PR fortran/40958
671         * scanner.h: New file.
672         * Make-lang.in: Dependencies on scanner.h.
673         * scanner.c (gfc_directorylist): Move to scanner.h.
674         * module.c: Don't include md5.h, include scanner.h and zlib.h.
675         (MOD_VERSION): Add comment about backwards compatibility.
676         (module_fp): Change type to gzFile.
677         (ctx): Remove.
678         (gzopen_included_file_1): New function.
679         (gzopen_included_file): New function.
680         (gzopen_intrinsic_module): New function.
681         (write_char): Use gzputc.
682         (read_crc32_from_module_file): New function.
683         (read_md5_from_module_file): Remove.
684         (gfc_dump_module): Use gz* functions instead of stdio, check gzip
685         crc32 instead of md5.
686         (read_module_to_tmpbuf): Use gz* functions instead of stdio.
687         (gfc_use_module): Use gz* functions.
689 2013-04-16  Tobias Burnus  <burnus@net-b.de>
691         PR fortran/39505
692         * decl.c (ext_attr_list): Add EXT_ATTR_NO_ARG_CHECK.
693         * gfortran.h (ext_attr_id_t): Ditto.
694         * gfortran.texi (GNU Fortran Compiler Directives):
695         Document it.
696         * interface.c (compare_type_rank): Ignore rank for NO_ARG_CHECK.
697         (compare_parameter): Ditto - and regard as unlimited polymorphic.
698         * resolve.c (resolve_symbol, resolve_variable): Add same constraint
699         checks as for TYPE(*); turn dummy to TYPE(*),dimension(*).
700         (gfc_explicit_interface_required): Require explicit interface
701         for NO_ARG_CHECK.
703 2013-04-16  Janus Weil  <janus@gcc.gnu.org>
705         PR fortran/56968
706         * expr.c (gfc_check_pointer_assign): Handle generic functions returning
707         procedure pointers.
709 2013-04-16  Tobias Burnus  <burnus@net-b.de>
711         PR fortran/56969
712         * intrinsic.c (gfc_intrinsic_func_interface): Don't set
713         module name to "(intrinsic)" for intrinsics from intrinsic
714         modules.
716 2013-04-15  Tobias Burnus  <burnus@net-b.de>
718         * intrinsic.texi (SYSTEM_CLOCK): Recommend kind=8.
720 2013-04-15  Janne Blomqvist  <jb@gcc.gnu.org>
722         PR fortran/56919
723         * intrinsics.texi (SYSTEM_CLOCK): Update documentation.
725 2013-04-15  Tobias Burnus  <burnus@net-b.de>
727         * class.c (gfc_find_intrinsic_vtab): Removed unused var.
728         * dependency.c (check_data_pointer_types): Fix check.
729         * frontend-passes.c (check_data_pointer_types): Remove
730         superfluous statement.
731         * parse.c (decode_omp_directive): Add missing break.
732         * resolve.c (resolve_typebound_subroutine: Free variable.
733         * trans-decl.c (create_function_arglist): Correct condition.
735 2013-04-14  Mikael Morin  <mikael@gcc.gnu.org>
737         PR fortran/56816
738         * match.c (gfc_match_select_type): Add syntax error. Move namespace
739         allocation and cleanup...
740         * parse.c (decode_statement): ... here.
742 2013-04-13  Janus Weil  <janus@gcc.gnu.org>
744         PR fortran/55959
745         * expr.c (gfc_simplify_expr): Branch is not unreachable.
747 2013-04-12  Janus Weil  <janus@gcc.gnu.org>
749         PR fortran/56266
750         * primary.c (gfc_match_varspec): Turn gcc_assert into MATCH_ERROR.
752 2013-04-12  Tobias Burnus  <burnus@net-b.de>
754         PR fortran/56929
755         * trans-array.c (duplicate_allocatable): Fix handling
756         of scalar coarrays.
758 2013-04-12  Janus Weil  <janus@gcc.gnu.org>
760         PR fortran/56261
761         * gfortran.h (gfc_explicit_interface_required): New prototype.
762         * expr.c (gfc_check_pointer_assign): Check if an explicit interface is
763         required in a proc-ptr assignment.
764         * interface.c (check_result_characteristics): Extra check.
765         * resolve.c (gfc_explicit_interface_required): New function.
766         (resolve_global_procedure): Use new function
767         'gfc_explicit_interface_required'. Do a full interface check.
769 2013-04-12  Tobias Burnus  <burnus@net-b.de>
771         PR fortran/56845
772         * trans-decl.c (gfc_trans_deferred_vars): Restrict
773         static CLASS init to SAVE and -fno-automatic.
775 2013-04-12  Tobias Burnus  <burnus@net-b.de>
777         PR fortran/56845
778         * trans-decl.c (gfc_trans_deferred_vars): Set _vptr for
779         allocatable static BT_CLASS.
780         * trans-expr.c (gfc_class_set_static_fields): New function.
781         * trans.h (gfc_class_set_static_fields): New prototype.
783 2013-04-11  Janne Blomqvist  <jb@gcc.gnu.org>
785         * gfortran.h: Remove enum gfc_try, replace gfc_try with bool type.
786         * arith.c: Replace gfc_try with bool type.
787         * array.c: Likewise.
788         * check.c: Likewise.
789         * class.c: Likewise.
790         * cpp.c: Likewise.
791         * cpp.h: Likewise.
792         * data.c: Likewise.
793         * data.h: Likewise.
794         * decl.c: Likewise.
795         * error.c: Likewise.
796         * expr.c: Likewise.
797         * f95-lang.c: Likewise.
798         * interface.c: Likewise.
799         * intrinsic.c: Likewise.
800         * intrinsic.h: Likewise.
801         * io.c: Likewise.
802         * match.c: Likewise.
803         * match.h: Likewise.
804         * module.c: Likewise.
805         * openmp.c: Likewise.
806         * parse.c: Likewise.
807         * parse.h: Likewise.
808         * primary.c: Likewise.
809         * resolve.c: Likewise.
810         * scanner.c: Likewise.
811         * simplify.c: Likewise.
812         * symbol.c: Likewise.
813         * trans-intrinsic.c: Likewise.
814         * trans-openmp.c: Likewise.
815         * trans-stmt.c: Likewise.
816         * trans-types.c: Likewise.
818 2013-04-09  Tobias Burnus  <burnus@net-b.de>
820         * gfortran.texi (KIND Type Parameters,
821         Internal representation of LOGICAL variables): Add crossrefs.
822         (Intrinsic Types): Mention issues with _Bool interop.
823         (Naming and argument-passing conventions): New section.
825 2013-04-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
827         PR fortran/56782
828         * frontend-passes.c (callback_reduction):  Don't do
829         any simplification if there is only a single element
830         which has an iterator.
832 2013-04-07  Tobias Burnus  <burnus@net-b.de>
834         PR fortran/56849
835         * iresolve.c (gfc_resolve_reshape): Set shape also
836         with order=.
838 2013-04-04  Janus Weil  <janus@gcc.gnu.org>
840         PR fortran/40881
841         * match.c (gfc_match_return): Remove standard notification.
842         * primary.c (gfc_match_actual_arglist): Add standard notification.
844 2013-04-04  Tobias Burnus  <burnus@net-b.de>
846         PR fortran/50269
847         * gcc/fortran/check.c (is_c_interoperable,
848         gfc_check_c_loc): Correct c_loc array checking
849         for Fortran 2003 and Fortran 2008.
851 2013-04-03  Janus Weil  <janus@gcc.gnu.org>
853         PR fortran/56284
854         PR fortran/40881
855         * decl.c (gfc_match_formal_arglist): Warn about alternate-return
856         arguments.
857         * interface.c (check_dummy_characteristics): Return if symbols are NULL.
859 2013-04-01  Janus Weil  <janus@gcc.gnu.org>
861         PR fortran/56500
862         * symbol.c (gfc_set_default_type): Build class container for
863         IMPLICIT CLASS.
865 2013-03-31  Tobias Burnus  <burnus@net-b.de>
867         * class.c (finalization_scalarizer, finalizer_insert_packed_call,
868         generate_finalization_wrapper): Avoid segfault with absent SIZE=
869         argument to TRANSFER and use correct result kind for SIZE.
870         * intrinsic.c (gfc_isym_id_by_intmod): Also handle ids of
871         nonmodules.
872         * trans.c (gfc_build_final_call): Handle coarrays.
874 2013-03-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
876         * trans-expr.c (build_memcmp_call):  New function.
877         (gfc_build_compare_string):  If the strings
878         compared have constant and equal lengths and
879         the strings are kind=1, or, for kind=4 strings,
880         the test is for (in)equality, use memcmp().
882 2013-03-29  Tobias Burnus  <burnus@net-b.de>
884         PR fortran/35203
885         * trans-decl.c (create_function_arglist): Pass hidden argument
886         for passed-by-value optional+value dummies.
887         * trans-expr.c (gfc_conv_expr_present,
888         gfc_conv_procedure_call): Handle those.
890 2013-03-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
892         PR fortran/45159
893         * gfortran.h (gfc_dep_difference):  Add prototype.
894         * dependency.c (discard_nops):  New function.
895         (gfc_dep_difference):  New function.
896         (check_section_vs_section):  Use gfc_dep_difference
897         to calculate the difference of starting indices.
898         * trans-expr.c (gfc_conv_substring):  Use
899         gfc_dep_difference to calculate the length of
900         substrings where possible.
902 2013-03-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
904         PR fortran/55806
905         * frontend-passes.c (optimize_code):  Keep track of
906         current code to make code insertion possible.
907         (combine_array_constructor):  New function.
908         (optimize_op):  Call it.
910 2013-03-27  Tobias Burnus  <burnus@net-b.de>
912         PR fortran/56650
913         PR fortran/36437
914         * check.c (gfc_check_sizeof, gfc_check_c_sizeof,
915         gfc_check_storage_size): Update checks.
916         * intrinsic.texi (SIZEOF): Correct class.
917         * intrinsic.h (gfc_simplify_sizeof,
918         gfc_simplify_storage_size): New prototypes.
919         * intrinsic.c (add_functions): Use them.
920         * simplify.c (gfc_simplify_sizeof,
921         gfc_simplify_storage_size): New functions.
923 2013-03-27  Janne Blomqvist  <jb@gcc.gnu.org>
925         PR fortran/25708
926         * module.c (module_locus): Use long for position.
927         (module_content): New variable.
928         (module_pos): Likewise.
929         (prev_character): Remove.
930         (bad_module): Free data instead of closing mod file.
931         (set_module_locus): Use module_pos.
932         (get_module_locus): Likewise.
933         (module_char): use buffer rather than stdio file.
934         (module_unget_char): Likewise.
935         (read_module_to_tmpbuf): New function.
936         (gfc_use_module): Call read_module_to_tmpbuf.
938 2013-03-26  Tobias Burnus  <burnus@net-b.de>
940         PR fortran/56649
941         * simplify.c (gfc_simplify_merge): Simplify more.
943 2013-03-25  Tobias Burnus  <burnus@net-b.de>
945         PR fortran/38536
946         PR fortran/38813
947         PR fortran/38894
948         PR fortran/39288
949         PR fortran/40963
950         PR fortran/45824
951         PR fortran/47023
952         PR fortran/47034
953         PR fortran/49023
954         PR fortran/50269
955         PR fortran/50612
956         PR fortran/52426
957         PR fortran/54263
958         PR fortran/55343
959         PR fortran/55444
960         PR fortran/55574
961         PR fortran/56079
962         PR fortran/56378
963         * check.c (gfc_var_strlen): Properly handle 0-sized string.
964         (gfc_check_c_sizeof): Use is_c_interoperable, add checks.
965         (is_c_interoperable, gfc_check_c_associated, gfc_check_c_f_pointer,
966         gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc): New
967         functions.
968         * expr.c (check_inquiry): Add c_sizeof, compiler_version and
969         compiler_options.
970         (gfc_check_pointer_assign): Refine function result check.
971         gfortran.h (gfc_isym_id): Add GFC_ISYM_C_ASSOCIATED,
972         GFC_ISYM_C_F_POINTER, GFC_ISYM_C_F_PROCPOINTER, GFC_ISYM_C_FUNLOC,
973         GFC_ISYM_C_LOC.
974         (iso_fortran_env_symbol, iso_c_binding_symbol): Handle
975         NAMED_SUBROUTINE.
976         (generate_isocbinding_symbol): Update prototype.
977         (get_iso_c_sym): Remove.
978         (gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New prototypes.
979         * intrinsic.c (gfc_intrinsic_subroutine_by_id): New function.
980         (gfc_intrinsic_sub_interface): Use it.
981         (add_functions, add_subroutines): Add missing C-binding intrinsics.
982         (gfc_intrinsic_func_interface): Add special case for c_loc.
983         gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New functions.
984         (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Use them.
985         * intrinsic.h (gfc_check_c_associated, gfc_check_c_f_pointer,
986         gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc,
987         gfc_resolve_c_loc, gfc_resolve_c_funloc): New prototypes.
988         * iresolve.c (gfc_resolve_c_loc, gfc_resolve_c_funloc): New
989         functions.
990         * iso-c-binding.def: Split PROCEDURE into NAMED_SUBROUTINE and
991         NAMED_FUNCTION.
992         * iso-fortran-env.def: Add NAMED_SUBROUTINE for completeness.
993         * module.c (create_intrinsic_function): Support subroutines and
994         derived-type results.
995         (use_iso_fortran_env_module): Update calls.
996         (import_iso_c_binding_module): Ditto; update calls to
997         generate_isocbinding_symbol.
998         * resolve.c (find_arglists): Skip for intrinsic symbols.
999         (gfc_resolve_intrinsic): Find intrinsic subs via id.
1000         (is_scalar_expr_ptr, gfc_iso_c_func_interface,
1001         set_name_and_label, gfc_iso_c_sub_interface): Remove.
1002         (resolve_function, resolve_specific_s0): Remove calls to those.
1003         (resolve_structure_cons): Fix handling.
1004         * symbol.c (gen_special_c_interop_ptr): Update c_ptr/c_funptr
1005         generation.
1006         (gen_cptr_param, gen_fptr_param, gen_shape_param,
1007         build_formal_args, get_iso_c_sym): Remove.
1008         (std_for_isocbinding_symbol): Handle NAMED_SUBROUTINE.
1009         (generate_isocbinding_symbol): Support hidden symbols and
1010         using c_ptr/c_funptr symtrees for nullptr defs.
1011         * target-memory.c (gfc_target_encode_expr): Fix handling
1012         of c_ptr/c_funptr.
1013         * trans-expr.c (conv_isocbinding_procedure): Remove.
1014         (gfc_conv_procedure_call): Remove call to it.
1015         (gfc_trans_subcomponent_assign, gfc_conv_expr): Update handling
1016         of c_ptr/c_funptr.
1017         * trans-intrinsic.c (conv_isocbinding_function,
1018         conv_isocbinding_subroutine): New.
1019         (gfc_conv_intrinsic_function, gfc_conv_intrinsic_subroutine):
1020         Call them.
1021         * trans-io.c (transfer_expr): Fix handling of c_ptr/c_funptr.
1022         * trans-types.c (gfc_typenode_for_spec,
1023         gfc_get_derived_type): Ditto.
1024         (gfc_init_c_interop_kinds): Handle NAMED_SUBROUTINE.
1026 2013-03-18  Tobias Burnus  <burnus@net-b.de>
1028         * gfortran.h (gfc_option_t): Remove flag_whole_file.
1029         * invoke.texi (-fno-whole-file): Remove.
1030         * lang.opt (fwhole-file): Change to Ignore.
1031         * options.c (gfc_init_options, gfc_post_options,
1032         gfc_handle_option): Remove !flag_whole_file handling
1033         * parse.c (resolve_all_program_units, translate_all_program_units,
1034         gfc_parse_file): Ditto.
1035         * resolve.c (resolve_global_procedure): Ditto.
1036         * trans-decl.c (gfc_get_symbol_decl, gfc_get_extern_function_decl,
1037         gfc_create_module_variable): Ditto.
1038         * trans-types.c (gfc_get_derived_type): Ditto.
1040 2013-03-15  Tobias Burnus  <burnus@net-b.de>
1042         PR fortran/56615
1043         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Pack arrays
1044         if they are not simply contiguous.
1046 2013-03-11  Tobias Burnus  <burnus@net-b.de>
1048         * gfortran.texi (STRUCTURE and RECORD): State more clearly how
1049         to convert them into derived types.
1051 2013-03-10  Paul Thomas  <pault@gcc.gnu.org>
1053         PR fortran/56575
1054         * expr.c (gfc_default_initializer): Check that a class declared
1055         type has any components.
1056         * resolve.c (resolve_fl_derived0): On failing the test for C437
1057         set the type to BT_UNKNOWN to prevent repeat error messages.
1059 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
1061         PR fortran/56477
1062         * expr.c (gfc_check_pointer_assign): Avoid NULL pointer dereference.
1064 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
1066         PR fortran/54730
1067         * array.c (gfc_match_array_constructor): Set a checkpoint before
1068         matching a typespec.  Drop it on success, restore it otherwise.
1070 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
1072         PR fortran/54730
1073         * gfortran.h (struct gfc_undo_change_set): New field 'previous'.
1074         (gfc_new_undo_checkpoint, gfc_drop_last_undo_checkpoint,
1075         gfc_restore_last_undo_checkpoint): New prototypes.
1076         * symbol.c (default_undo_chgset_var): Update initialization.
1077         (single_undo_checkpoint_p, gfc_new_undo_checkpoint,
1078         free_undo_change_set_data, pop_undo_change_set,
1079         gfc_drop_last_undo_checkpoint, enforce_single_undo_checkpoint):
1080         New functions.
1081         (save_symbol_data): Handle multiple change sets.  Make sure old_symbol
1082         field's previous value is not overwritten.  Clear gfc_new field.
1083         (restore_old_symbol): Restore previous old_symbol field.
1084         (gfc_restore_last_undo_checkpoint): New function, using body renamed
1085         from gfc_undo_symbols.  Restore the previous change set as current one.
1086         (gfc_undo_symbols): New body.
1087         (gfc_commit_symbols, gfc_commit_symbol, gfc_enforce_clean_symbol_state):
1088         Call enforce_single_undo_checkpoint.
1089         (gfc_symbol_done_2): Ditto.  Free change set data.
1091 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
1093         * symbol.c (restore_old_symbol): Fix thinko.
1095 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
1097         * symbol.c (gfc_undo_symbols): Move code...
1098         (restore_old_symbol): ... here as a new function.
1100 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
1102         * Make-lang.in (F95_PARSER_OBJS): Add dependency to vec.h.
1103         * gfortran.h: Include vec.h.
1104         (gfc_undo_change_set): New struct.
1105         * symbol.c (tentative_tbp): Remove struct.
1106         (changed_syms, tentative_tbp_list): Remove variables.
1107         (default_undo_chgset_var, latest_undo_chgset): New variables.
1108         (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
1109         gfc_commit_symbols, gfc_commit_symbol,
1110         gfc_enforce_clean_symbol_state, gfc_get_typebound_proc):
1111         Use latest_undo_chgset instead of changed_syms and tentative_tbp_list.
1113 2013-03-01  Tobias Burnus  <burnus@net-b.de>
1115         PR fortran/56491
1116         * iresolve.c (resolve_bound): Use gfc_get_string instead of xstrdup.
1117         * symbol.c (free_components): Free proc-pointer components.
1119 2013-03-01  Tobias Burnus  <burnus@net-b.de>
1121         * trans-decl.c (gfc_trans_deferred_vars): Free expr after use.
1122         * trans-io.c (build_dt): Ditto.
1124 2013-02-24  Joseph Myers  <joseph@codesourcery.com>
1126         * resolve.c (generate_component_assignments): Don't use UTF-8
1127         ligature in diagnostic.
1129 2013-02-21  Janus Weil  <janus@gcc.gnu.org>
1131         PR fortran/56385
1132         * trans-array.c (structure_alloc_comps): Handle procedure-pointer
1133         components with allocatable result.
1135 2013-02-21  Tobias Burnus  <burnus@net-b.de>
1137         PR fortran/56416
1138         * gfortran.texi (Part II: Language Reference, Extensions,
1139         Non-Fortran Main Program): Sort @menu to match actual section order.
1140         * intrinsic.texi (Intrinsic Procedures): Ditto.
1141         (C_F_POINTER, PRECISION): Move to the alphabetically correct place.
1143 2013-02-15  Tobias Burnus  <burnus@net-b.de>
1144             Mikael Morin  <mikael@gcc.gnu.org>
1146         PR fortran/56318
1147         * simplify.c (gfc_simplify_matmul): Fix result shape
1148         and matmul result.
1150 2013-02-15  Tobias Burnus  <burnus@net-b.de>
1152         PR fortran/53818
1153         * resolve.c (apply_default_init_local): Don't create an
1154         initializer for a result variable.
1156 2013-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
1158         PR fortran/56224
1159         * gfortran.h (gfc_add_include_path):  Add boolean argument
1160         for warn.
1161         * scanner.c (gfc_add_include_path):  Pass along warn argument
1162         to add_path_to_list.
1163         * options.c (gfc_post_options):  Add true warn argument to
1164         gfc_add_include_path.
1165         (gfc_handle_module_path_options):  Likewise.
1166         (gfc_handle_option): Also gfc_add_include_path for intrinsic
1167         modules, without warning.
1169 2013-02-14  Paul Thomas  <pault@gcc.gnu.org>
1170             Tobias Burnus  <burnus@net-b.de>
1172         PR testsuite/56138
1173         * trans-decl.c (gfc_get_symbol_decl): Fix deferred-length
1174         results for functions without extra result variable.
1176         Revert:
1177         2013-01-30  Tobias Burnus  <burnus@net-b.de>
1179         PR fortran/56138
1180         * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
1181         results for functions without extra result variable.
1183 2013-02-12  Janus Weil  <janus@gcc.gnu.org>
1185         PR fortran/46952
1186         * resolve.c (resolve_call): Do not check deferred procedures for
1187         recursiveness.
1189 2013-02-09  Paul Thomas  <pault@gcc.gnu.org>
1191         PR fortran/55362
1192         * check.c (array_check): It is an error if a procedure is
1193         passed.
1195 2013-02-08  Mikael Morin  <mikael@gcc.gnu.org>
1197         PR fortran/54107
1198         * trans-types.c (gfc_get_function_type): Change a NULL backend_decl
1199         to error_mark_node on entry.  Detect recursive types.  Build a variadic
1200         procedure type if the type is recursive.  Restore the initial
1201         backend_decl.
1203 2013-02-07  Tobias Burnus  <burnus@net-b.de>
1205         PR fortran/54339
1206         * gfortran.texi (Standards): Mention TS29113.
1207         (Varying Length Character): Mention deferred-length
1208         strings.
1209         (Fortran 2003 Status): Add unlimited polymorphic.
1210         (TS 29113 Status): Add TYPE(*) and DIMENSION(..).
1211         (C Interop): Update the section about TS29113.
1213 2013-02-06 Paul Thomas  <pault@gcc.gnu.org>
1215         PR fortran/55789
1216         * trans-array.c (trans_array_constructor): Remove condition
1217         'dynamic' = true if the loop ubound is a VAR_DECL.
1219 2013-02-04  Paul Thomas  <pault@gcc.gnu.org>
1221         PR fortran/56008
1222         PR fortran/47517
1223         * trans-array.c (gfc_alloc_allocatable_for_assignment): Save
1224         the lhs descriptor before it is modified for reallocation. Use
1225         it to deallocate allocatable components in the reallocation
1226         block.  Nullify allocatable components for newly (re)allocated
1227         arrays.
1229 2013-02-04  Mikael Morin  <mikael@gcc.gnu.org>
1231         PR fortran/54195
1232         * resolve.c (resolve_typebound_procedures): Recurse through
1233         resolve_symbol.
1235 2013-02-04  Mikael Morin  <mikael@gcc.gnu.org>
1237         PR fortran/54107
1238         PR fortran/54195
1239         * gfortran.h (struct gfc_symbol): New field 'resolved'.
1240         * resolve.c (resolve_fl_var_and_proc): Don't skip result symbols.
1241         (resolve_symbol): Skip duplicate calls.  Don't check the current
1242         namespace.
1244 2013-02-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
1246         PR fortran/50627
1247         PR fortran/56054
1248         * decl.c (gfc_match_end):  Remove half-ready namespace
1249         from parent if the end of a block is missing.
1250         * parse.c (parse_module):  Do not put namespace into
1251         gsymbol on error.
1253 2013-01-30  Tobias Burnus  <burnus@net-b.de>
1255         PR fortran/56138
1256         * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
1257         results for functions without extra result variable.
1259 2013-01-29  Janus Weil  <janus@gcc.gnu.org>
1260             Mikael Morin  <mikael@gcc.gnu.org>
1262         PR fortran/54107
1263         * gfortran.h (gfc_component): Delete members 'formal' and 'formal_ns'.
1264         (gfc_copy_formal_args,gfc_copy_formal_args_ppc,gfc_expr_replace_symbols,
1265         gfc_expr_replace_comp): Delete.
1266         (gfc_sym_get_dummy_args): New prototype.
1267         * dependency.c (gfc_check_fncall_dependency): Use
1268         'gfc_sym_get_dummy_args'.
1269         * expr.c (gfc_is_constant_expr): Ditto.
1270         (replace_symbol,gfc_expr_replace_symbols,replace_comp,
1271         gfc_expr_replace_comp): Deleted.
1272         * frontend-passes.c (doloop_code,do_function): Use
1273         'gfc_sym_get_dummy_args'.
1274         * interface.c (gfc_check_operator_interface,gfc_compare_interfaces,
1275         gfc_procedure_use,gfc_ppc_use,gfc_arglist_matches_symbol,
1276         gfc_check_typebound_override): Ditto.
1277         * module.c (MOD_VERSION): Bump module version.
1278         (mio_component): Do not read/write 'formal' and 'formal_ns'.
1279         * resolve.c (resolve_procedure_interface,resolve_fl_derived0): Do not
1280         copy formal args, but just keep a pointer to the interface.
1281         (resolve_function,resolve_call,resolve_typebound_generic_call,
1282         resolve_ppc_call,resolve_expr_ppc,generate_component_assignments,
1283         resolve_fl_procedure,gfc_resolve_finalizers,check_generic_tbp_ambiguity,
1284         resolve_typebound_procedure,check_uop_procedure): Use
1285         'gfc_sym_get_dummy_args'.
1286         * symbol.c (free_components): Do not free 'formal' and 'formal_ns'.
1287         (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Deleted.
1288         (gfc_sym_get_dummy_args): New function.
1289         * trans-array.c (get_array_charlen,gfc_walk_elemental_function_args):
1290         Use 'gfc_sym_get_dummy_args'.
1291         * trans-decl.c (build_function_decl,create_function_arglist,
1292         build_entry_thunks,init_intent_out_dt,gfc_trans_deferred_vars,
1293         add_argument_checking): Ditto.
1294         * trans-expr.c (gfc_map_fcn_formal_to_actual,gfc_conv_procedure_call,
1295         gfc_conv_statement_function): Ditto.
1296         * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
1297         * trans-types.c (create_fn_spec,gfc_get_function_type): Ditto.
1299 2013-01-28  Tobias Burnus  <burnus@net-b.de>
1300             Mikael Morin  <mikael@gcc.gnu.org>
1302         PR fortran/53537
1303         * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
1304         interface block.
1305         (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
1306         * decl.c (gfc_match_data_decl): Ditto.
1307         (variable_decl): Remove undeclared type error.
1308         (gfc_match_import): Use renamed instead of original name.
1310 2013-01-27 Paul Thomas  <pault@gcc.gnu.org>
1312         PR fortran/55984
1313         PR fortran/56047
1314         * gfortran.h : Add associate_var to symbol_attr.
1315         * resolve.c (resolve_assoc_var): Set associate_var attribute.
1316         If the target class_ok is set, set it for the associate
1317         variable.
1318         * check.c (allocatable_check): Associate variables should not
1319         have the allocatable attribute even if their symbols do.
1320         * class.c (gfc_build_class_symbol): Symbols with associate_var
1321         set will always have a good class container.
1323 2013-01-23  Janus Weil  <janus@gcc.gnu.org>
1325         PR fortran/56081
1326         * resolve.c (resolve_select): Add argument 'select_type', reject
1327         non-scalar expressions.
1328         (resolve_select_type,resolve_code): Pass new argument to
1329         'resolve_select'.
1331 2013-01-23  Jakub Jelinek  <jakub@redhat.com>
1333         PR fortran/56052
1334         * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
1335         and DECL_IGNORED_P on select_type_temporary and don't set
1336         DECL_BY_REFERENCE.
1338 2013-01-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
1340         PR fortran/55919
1341         * scanner.c (add_path_to_list): Copy path to temporary and strip
1342         trailing directory separators before calling stat().
1344 2013-01-17  Richard Biener  <rguenther@suse.de>
1346         * trans-stmt.c (gfc_trans_do): Conditionally compute countm1
1347         dependent on sign of step, avoids repeated evaluation of
1348         step sign test.  Avoid undefined overflow issues by using unsigned
1349         arithmetic.
1351 2013-01-16  Janus Weil  <janus@gcc.gnu.org>
1353         PR fortran/55983
1354         * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
1355         asserting it.
1357 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
1358             Tobias Burnus  <burnus@net-b.de>
1360         PR driver/55884
1361         * lang.opt (fintrinsic-modules-path): Don't accept Joined.
1362         (fintrinsic-modules-path=): New.
1363         * options.c (gfc_handle_option, gfc_get_option_string,
1364         gfc_get_option_string): Handle the latter.
1366 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
1368         PR fortran/52865
1369         * trans-stmt.c (gfc_trans_do): Put countm1-- before conditional
1370         and use value of countm1 before the decrement in the condition.
1372 2013-01-15  Paul Thomas  <pault@gcc.gnu.org>
1374         PR fortran/54286
1375         * expr.c (gfc_check_pointer_assign): Check for presence of
1376         's2' before using it.
1378 2013-01-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
1380         PR fortran/55806
1381         * frontend-passes.c (optimize_reduction):  New function,
1382         including prototype.
1383         (callback_reduction):  Likewise.
1384         (gfc_run_passes):  Also run optimize_reduction.
1385         (copy_walk_reduction_arg):  New function.
1386         (dummy_code_callback):  New function.
1388 2013-01-13  Jakub Jelinek  <jakub@redhat.com>
1390         PR fortran/55935
1391         * trans-expr.c (gfc_conv_structure): Call
1392         unshare_expr_without_location on the ctor elements.
1394 2013-01-13  Paul Thomas  <pault@gcc.gnu.org>
1396         PR fortran/54286
1397         * expr.c (gfc_check_pointer_assign): Ensure that both lvalue
1398         and rvalue interfaces are presented to gfc_compare_interfaces.
1399         Simplify references to interface names by using the symbols
1400         themselves. Call gfc_compare_interfaces with s1 and s2 inter-
1401         changed to overcome the asymmetry of this function. Do not
1402         repeat the check for the presence of s1 and s2.
1404 2013-01-12  Janus Weil  <janus@gcc.gnu.org>
1406         PR fortran/55072
1407         * trans-array.c (gfc_conv_array_parameter): No packing was done for
1408         full arrays of derived type.
1410 2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
1412         PR fortran/55868
1413         * class.c (get_unique_type_string): Change $tar to STAR and
1414         replace sprintf by strcpy where there is no formatting.
1415         * decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
1417 2013-01-09  Mikael Morin  <mikael@gcc.gnu.org>
1419         PR fortran/47203
1420         * module.c (check_for_ambiguous): Get the current program unit using
1421         gfc_current_ns.
1423 2013-01-09  Tobias Burnus  <burnus@net-b.de>
1425         PR fortran/55758
1426         * resolve.c (resolve_symbol): Reject non-C_Bool logicals
1427         in BIND(C) procedures with -std=f*.
1429 2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
1431         PR fortran/55618
1432         * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
1433         character function arguments to elemental procedures in
1434         scalarization loops.
1436 2013-01-07  Tobias Burnus  <burnus@net-b.de>
1438         PR fortran/55763
1439         * gfortran.h (gfc_check_assign_symbol): Update prototype.
1440         * decl.c (add_init_expr_to_sym, do_parm): Update call.
1441         * expr.c (gfc_check_assign_symbol): Handle BT_CLASS and
1442         improve error location; support components.
1443         (gfc_check_pointer_assign): Handle component assignments.
1444         * resolve.c (resolve_fl_derived0): Call gfc_check_assign_symbol.
1445         (resolve_values): Update call.
1446         (resolve_structure_cons): Avoid double diagnostic.
1448 2013-01-07  Tobias Burnus  <burnus@net-b.de>
1449             Thomas Koenig  <tkoenig@gcc.gnu.org>
1451         PR fortran/55852
1452         * expr.c (gfc_build_intrinsic_call): Avoid clashes
1453         with user's procedures.
1454         * gfortran.h (gfc_build_intrinsic_call): Update prototype.
1455         * simplify.c (gfc_simplify_size): Update call.
1456         * class.c (finalization_scalarizer, finalization_get_offset,
1457         finalizer_insert_packed_call, generate_finalization_wrapper):
1458         Clean up by using gfc_build_intrinsic_call.
1460 2013-01-07  Tobias Burnus  <burnus@net-b.de>
1462         PR fortran/55763
1463         * resolve.c (resolve_select_type): Reject intrinsic types for
1464         a non-unlimited-polymorphic selector.
1466 2013-01-06  Paul Thomas  <pault@gcc.gnu.org>
1468         PR fortran/53876
1469         PR fortran/54990
1470         PR fortran/54992
1471         * trans-array.c (build_array_ref): Check the TYPE_CANONICAL
1472         to see if it is GFC_CLASS_TYPE_P.
1473         * trans-expr.c (gfc_get_vptr_from_expr): The same.
1474         (gfc_conv_class_to_class): If the types are not the same,
1475         cast parmese->expr to the type of ctree.
1476         * trans-types.c (gfc_get_derived_type): GFC_CLASS_TYPE_P of
1477         CLASS components must be set.
1479 2013-01-06  Mikael Morin  <mikael@gcc.gnu.org>
1481         PR fortran/42769
1482         PR fortran/45836
1483         PR fortran/45900
1484         * module.c (read_module): Don't reuse local symtree if the associated
1485         symbol isn't exactly the one wanted.  Don't reuse local symtree if it is
1486         ambiguous.
1487         * resolve.c (resolve_call): Use symtree's name instead of symbol's to
1488         lookup the symtree.
1490 2013-01-05  Steven G. Kargl  <kargl@gcc.gnu.org>
1491             Mikael Morin  <mikael@gcc.gnu.org>
1493         PR fortran/55827
1494         * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
1495         e->symtree == NULL.
1496         * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
1498 2013-01-05  Tobias Burnus  <burnus@net-b.de>
1500         * class.c (finalize_component): Used passed offset expr.
1501         (finalization_get_offset): New static function.
1502         (finalizer_insert_packed_call, generate_finalization_wrapper): Use it
1503         to handle noncontiguous arrays.
1505 2013-01-04  Tobias Burnus  <burnus@net-b.de>
1507         * trans.c (gfc_build_final_call): New function.
1508         * trans.h (gfc_build_final_call, gfc_conv_scalar_to_descriptor):
1509         New function prototypes.
1510         * trans-expr.c (gfc_conv_scalar_to_descriptor): Renamed from
1511         conv_scalar_to_descriptor, removed static attribute.
1512         (gfc_conv_procedure_call): Honor renaming.
1514 2013-01-04  Tobias Burnus  <burnus@net-b.de>
1516         * intrinsic.c (add_functions): New internal intrinsic
1517         function GFC_PREFIX ("stride").
1518         * gfortran.h (gfc_isym_id): Add GFC_ISYM_STRIDE.
1519         * intrinsic.h (gfc_resolve_stride): New prototypes.
1520         * iresolve.c (gfc_resolve_stride): New function.
1521         * trans-intrinsic.c (conv_intrinsic_stride): New static
1522         function.
1523         (gfc_conv_intrinsic_function): Use it.
1525 2013-01-04  Tobias Burnus  <burnus@net-b.de>
1527         * class.c (gfc_find_intrinsic_vtab): Add _final
1528         component.
1529         * decl.c (gfc_match_null): Remove superfluous
1530         variadic argument to gfc_match.
1532 2013-01-04  Paul Thomas  <pault@gcc.gnu.org>
1534         PR fortran/55172
1535         * match.c (copy_ts_from_selector_to_associate): Remove call to
1536         gfc_resolve_expr and replace it with explicit setting of the
1537         array reference type.
1538         * resolve.c (resolve_select_type): It is an error if the
1539         selector is coindexed.
1541 2013-01-04  Tobias Burnus  <burnus@net-b.de>
1543         PR fortran/55763
1544         * decl.c (gfc_match_null): Parse and reject MOLD.
1546 2013-01-04  Tobias Burnus  <burnus@net-b.de>
1548         PR fortran/55854
1549         PR fortran/55763
1550         * class.c (gfc_class_null_initializer): Fix finding the vtab.
1551         (gfc_find_intrinsic_vtab): Use BT_VOID for some components.
1553 2013-01-03  Janus Weil  <janus@gcc.gnu.org>
1555         PR fortran/55855
1556         * expr.c (gfc_check_assign): Use 'gfc_expr_attr' to evaluate attributes
1557         of rvalue. Correct hyphenation in error message.
1559 2013-01-03  Jakub Jelinek  <jakub@redhat.com>
1561         * gfortranspec.c (lang_specific_driver): Update copyright notice
1562         dates.
1564 Copyright (C) 2013 Free Software Foundation, Inc.
1566 Copying and distribution of this file, with or without modification,
1567 are permitted in any medium without royalty provided the copyright
1568 notice and this notice are preserved.