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