PR 57028 Bootstrap regression wrt zlib.
[platform/upstream/gcc.git] / gcc / fortran / ChangeLog
1 2013-04-25  Janne Blomqvist  <jb@gcc.gnu.org>
2
3         PR bootstrap/57028
4         * Make-lang.in (f951): Link in ZLIB.
5         (CFLAGS-fortran/module.o): Add zlib include directory.
6
7 2013-04-22  Janus Weil  <janus@gcc.gnu.org>
8
9         PR fortran/53685
10         PR fortran/57022
11         * check.c (gfc_calculate_transfer_sizes): Fix for array-valued SOURCE
12         expressions.
13         * simplify.c (gfc_simplify_sizeof,gfc_simplify_storage_size): Get rid
14         of special treatment for EXPR_ARRAY.
15         * target-memory.h (gfc_element_size): New prototype.
16         * target-memory.c (size_array): Remove.
17         (gfc_element_size): New function.
18         (gfc_target_expr_size): Modified to always return the full size of the
19         expression.
20
21 2013-04-20  Tobias Burnus  <burnus@net-b.de>
22
23         PR fortran/56907
24         * trans-intrinsic.c (conv_isocbinding_function): Don't pack array
25         passed to C_LOC
26
27 2013-04-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
28             Mikael Morin  <mikael@gcc.gnu.org>
29
30         PR fortran/56872
31         * frontend-passes.c (copy_walk_reduction_arg): Change argument type
32         to gfc_constructor.  If it has an iterator, wrap the copy of its
33         expression in an array constructor with that iterator.  Don't special
34         case function expressions.
35         (callback_reduction): Update caller.  Don't return early if there is
36         an iterator.
37
38 2013-04-18  Tobias Burnus  <burnus@net-b.de>
39
40         * expr.c (find_array_element): Don't copy expr.
41         * data.c (create_character_initializer): Free expr.
42         * frontend-passes.c (combine_array_constructor): Ditto.
43         * match.c (match_typebound_call, gfc_match_select_type): Ditto.
44         * resolve.c (resolve_typebound_function): Free gfc_ref.
45
46 2013-04-18  Tobias Burnus  <burnus@net-b.de>
47
48         PR fortran/56994
49         * invoke.texi (NEAREST): S argument is not optional.
50
51 2013-04-17  Janus Weil  <janus@gcc.gnu.org>
52
53         PR fortran/56814
54         * interface.c (check_result_characteristics): Get result from interface
55         if present.
56
57 2013-04-17  Janne Blomqvist  <jb@gcc.gnu.org>
58
59         PR fortran/40958
60         * scanner.h: New file.
61         * Make-lang.in: Dependencies on scanner.h.
62         * scanner.c (gfc_directorylist): Move to scanner.h.
63         * module.c: Don't include md5.h, include scanner.h and zlib.h.
64         (MOD_VERSION): Add comment about backwards compatibility.
65         (module_fp): Change type to gzFile.
66         (ctx): Remove.
67         (gzopen_included_file_1): New function.
68         (gzopen_included_file): New function.
69         (gzopen_intrinsic_module): New function.
70         (write_char): Use gzputc.
71         (read_crc32_from_module_file): New function.
72         (read_md5_from_module_file): Remove.
73         (gfc_dump_module): Use gz* functions instead of stdio, check gzip
74         crc32 instead of md5.
75         (read_module_to_tmpbuf): Use gz* functions instead of stdio.
76         (gfc_use_module): Use gz* functions.
77
78 2013-04-16  Tobias Burnus  <burnus@net-b.de>
79
80         PR fortran/39505
81         * decl.c (ext_attr_list): Add EXT_ATTR_NO_ARG_CHECK.
82         * gfortran.h (ext_attr_id_t): Ditto.
83         * gfortran.texi (GNU Fortran Compiler Directives):
84         Document it.
85         * interface.c (compare_type_rank): Ignore rank for NO_ARG_CHECK.
86         (compare_parameter): Ditto - and regard as unlimited polymorphic.
87         * resolve.c (resolve_symbol, resolve_variable): Add same constraint
88         checks as for TYPE(*); turn dummy to TYPE(*),dimension(*).
89         (gfc_explicit_interface_required): Require explicit interface
90         for NO_ARG_CHECK.
91
92 2013-04-16  Janus Weil  <janus@gcc.gnu.org>
93
94         PR fortran/56968
95         * expr.c (gfc_check_pointer_assign): Handle generic functions returning
96         procedure pointers.
97
98 2013-04-16  Tobias Burnus  <burnus@net-b.de>
99
100         PR fortran/56969
101         * intrinsic.c (gfc_intrinsic_func_interface): Don't set
102         module name to "(intrinsic)" for intrinsics from intrinsic
103         modules.
104
105 2013-04-15  Tobias Burnus  <burnus@net-b.de>
106
107         * intrinsic.texi (SYSTEM_CLOCK): Recommend kind=8.
108
109 2013-04-15  Janne Blomqvist  <jb@gcc.gnu.org>
110
111         PR fortran/56919
112         * intrinsics.texi (SYSTEM_CLOCK): Update documentation.
113
114 2013-04-15  Tobias Burnus  <burnus@net-b.de>
115
116         * class.c (gfc_find_intrinsic_vtab): Removed unused var.
117         * dependency.c (check_data_pointer_types): Fix check.
118         * frontend-passes.c (check_data_pointer_types): Remove
119         superfluous statement.
120         * parse.c (decode_omp_directive): Add missing break.
121         * resolve.c (resolve_typebound_subroutine: Free variable.
122         * trans-decl.c (create_function_arglist): Correct condition.
123
124 2013-04-14  Mikael Morin  <mikael@gcc.gnu.org>
125
126         PR fortran/56816
127         * match.c (gfc_match_select_type): Add syntax error. Move namespace
128         allocation and cleanup...
129         * parse.c (decode_statement): ... here.
130
131 2013-04-13  Janus Weil  <janus@gcc.gnu.org>
132
133         PR fortran/55959
134         * expr.c (gfc_simplify_expr): Branch is not unreachable.
135
136 2013-04-12  Janus Weil  <janus@gcc.gnu.org>
137
138         PR fortran/56266
139         * primary.c (gfc_match_varspec): Turn gcc_assert into MATCH_ERROR.
140
141 2013-04-12  Tobias Burnus  <burnus@net-b.de>
142
143         PR fortran/56929
144         * trans-array.c (duplicate_allocatable): Fix handling
145         of scalar coarrays.
146
147 2013-04-12  Janus Weil  <janus@gcc.gnu.org>
148
149         PR fortran/56261
150         * gfortran.h (gfc_explicit_interface_required): New prototype.
151         * expr.c (gfc_check_pointer_assign): Check if an explicit interface is
152         required in a proc-ptr assignment.
153         * interface.c (check_result_characteristics): Extra check.
154         * resolve.c (gfc_explicit_interface_required): New function.
155         (resolve_global_procedure): Use new function
156         'gfc_explicit_interface_required'. Do a full interface check.
157
158 2013-04-12  Tobias Burnus  <burnus@net-b.de>
159
160         PR fortran/56845
161         * trans-decl.c (gfc_trans_deferred_vars): Restrict
162         static CLASS init to SAVE and -fno-automatic.
163
164 2013-04-12  Tobias Burnus  <burnus@net-b.de>
165
166         PR fortran/56845
167         * trans-decl.c (gfc_trans_deferred_vars): Set _vptr for
168         allocatable static BT_CLASS.
169         * trans-expr.c (gfc_class_set_static_fields): New function.
170         * trans.h (gfc_class_set_static_fields): New prototype.
171
172 2013-04-11  Janne Blomqvist  <jb@gcc.gnu.org>
173
174         * gfortran.h: Remove enum gfc_try, replace gfc_try with bool type.
175         * arith.c: Replace gfc_try with bool type.
176         * array.c: Likewise.
177         * check.c: Likewise.
178         * class.c: Likewise.
179         * cpp.c: Likewise.
180         * cpp.h: Likewise.
181         * data.c: Likewise.
182         * data.h: Likewise.
183         * decl.c: Likewise.
184         * error.c: Likewise.
185         * expr.c: Likewise.
186         * f95-lang.c: Likewise.
187         * interface.c: Likewise.
188         * intrinsic.c: Likewise.
189         * intrinsic.h: Likewise.
190         * io.c: Likewise.
191         * match.c: Likewise.
192         * match.h: Likewise.
193         * module.c: Likewise.
194         * openmp.c: Likewise.
195         * parse.c: Likewise.
196         * parse.h: Likewise.
197         * primary.c: Likewise.
198         * resolve.c: Likewise.
199         * scanner.c: Likewise.
200         * simplify.c: Likewise.
201         * symbol.c: Likewise.
202         * trans-intrinsic.c: Likewise.
203         * trans-openmp.c: Likewise.
204         * trans-stmt.c: Likewise.
205         * trans-types.c: Likewise.
206
207 2013-04-09  Tobias Burnus  <burnus@net-b.de>
208
209         * gfortran.texi (KIND Type Parameters,
210         Internal representation of LOGICAL variables): Add crossrefs.
211         (Intrinsic Types): Mention issues with _Bool interop.
212         (Naming and argument-passing conventions): New section.
213
214 2013-04-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
215
216         PR fortran/56782
217         * frontend-passes.c (callback_reduction):  Dont't do
218         any simplification if there is only a single element
219         which has an iterator.
220
221 2013-04-07  Tobias Burnus  <burnus@net-b.de>
222
223         PR fortran/56849
224         * iresolve.c (gfc_resolve_reshape): Set shape also
225         with order=.
226
227 2013-04-04  Janus Weil  <janus@gcc.gnu.org>
228
229         PR fortran/40881
230         * match.c (gfc_match_return): Remove standard notification.
231         * primary.c (gfc_match_actual_arglist): Add standard notification.
232
233 2013-04-04  Tobias Burnus  <burnus@net-b.de>
234
235         PR fortran/50269
236         * gcc/fortran/check.c (is_c_interoperable,
237         gfc_check_c_loc): Correct c_loc array checking
238         for Fortran 2003 and Fortran 2008.
239
240 2013-04-03  Janus Weil  <janus@gcc.gnu.org>
241
242         PR fortran/56284
243         PR fortran/40881
244         * decl.c (gfc_match_formal_arglist): Warn about alternate-return
245         arguments.
246         * interface.c (check_dummy_characteristics): Return if symbols are NULL.
247
248 2013-04-01  Janus Weil  <janus@gcc.gnu.org>
249
250         PR fortran/56500
251         * symbol.c (gfc_set_default_type): Build class container for
252         IMPLICIT CLASS.
253
254 2013-03-31  Tobias Burnus  <burnus@net-b.de>
255
256         * class.c (finalization_scalarizer, finalizer_insert_packed_call,
257         generate_finalization_wrapper): Avoid segfault with absent SIZE=
258         argment to TRANSFER and use correct result kind for SIZE.
259         * intrinsic.c (gfc_isym_id_by_intmod): Also handle ids of
260         nonmodules.
261         * trans.c (gfc_build_final_call): Handle coarrays.
262
263 2013-03-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
264
265         * trans-expr.c (build_memcmp_call):  New function.
266         (gfc_build_compare_string):  If the strings
267         compared have constant and equal lengths and
268         the strings are kind=1, or, for kind=4 strings,
269         the test is for (in)equality, use memcmp().
270
271 2013-03-29  Tobias Burnus  <burnus@net-b.de>
272
273         PR fortran/35203
274         * trans-decl.c (create_function_arglist): Pass hidden argument
275         for passed-by-value optional+value dummies.
276         * trans-expr.c (gfc_conv_expr_present,
277         gfc_conv_procedure_call): Handle those.
278
279 2013-03-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
280
281         PR fortran/45159
282         * gfortran.h (gfc_dep_difference):  Add prototype.
283         * dependency.c (discard_nops):  New function.
284         (gfc_dep_difference):  New function.
285         (check_section_vs_section):  Use gfc_dep_difference
286         to calculate the difference of starting indices.
287         * trans-expr.c (gfc_conv_substring):  Use
288         gfc_dep_difference to calculate the length of
289         substrings where possible.
290
291 2013-03-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
292
293         PR fortran/55806
294         * frontend-passes.c (optimize_code):  Keep track of
295         current code to make code insertion possible.
296         (combine_array_constructor):  New function.
297         (optimize_op):  Call it.
298
299 2013-03-27  Tobias Burnus  <burnus@net-b.de>
300
301         PR fortran/56650
302         PR fortran/36437
303         * check.c (gfc_check_sizeof, gfc_check_c_sizeof,
304         gfc_check_storage_size): Update checks.
305         * intrinsic.texi (SIZEOF): Correct class.
306         * intrinsic.h (gfc_simplify_sizeof,
307         gfc_simplify_storage_size): New prototypes.
308         * intrinsic.c (add_functions): Use them.
309         * simplify.c (gfc_simplify_sizeof,
310         gfc_simplify_storage_size): New functions.
311
312 2013-03-27  Janne Blomqvist  <jb@gcc.gnu.org>
313
314         PR fortran/25708
315         * module.c (module_locus): Use long for position.
316         (module_content): New variable.
317         (module_pos): Likewise.
318         (prev_character): Remove.
319         (bad_module): Free data instead of closing mod file.
320         (set_module_locus): Use module_pos.
321         (get_module_locus): Likewise.
322         (module_char): use buffer rather than stdio file.
323         (module_unget_char): Likewise.
324         (read_module_to_tmpbuf): New function.
325         (gfc_use_module): Call read_module_to_tmpbuf.
326
327 2013-03-26  Tobias Burnus  <burnus@net-b.de>
328
329         PR fortran/56649
330         * simplify.c (gfc_simplify_merge): Simplify more.
331
332 2013-03-25  Tobias Burnus  <burnus@net-b.de>
333
334         PR fortran/38536
335         PR fortran/38813
336         PR fortran/38894
337         PR fortran/39288
338         PR fortran/40963
339         PR fortran/45824
340         PR fortran/47023
341         PR fortran/47034
342         PR fortran/49023
343         PR fortran/50269
344         PR fortran/50612
345         PR fortran/52426
346         PR fortran/54263
347         PR fortran/55343
348         PR fortran/55444
349         PR fortran/55574
350         PR fortran/56079
351         PR fortran/56378
352         * check.c (gfc_var_strlen): Properly handle 0-sized string.
353         (gfc_check_c_sizeof): Use is_c_interoperable, add checks.
354         (is_c_interoperable, gfc_check_c_associated, gfc_check_c_f_pointer,
355         gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc): New
356         functions.
357         * expr.c (check_inquiry): Add c_sizeof, compiler_version and
358         compiler_options.
359         (gfc_check_pointer_assign): Refine function result check.
360         gfortran.h (gfc_isym_id): Add GFC_ISYM_C_ASSOCIATED,
361         GFC_ISYM_C_F_POINTER, GFC_ISYM_C_F_PROCPOINTER, GFC_ISYM_C_FUNLOC,
362         GFC_ISYM_C_LOC.
363         (iso_fortran_env_symbol, iso_c_binding_symbol): Handle
364         NAMED_SUBROUTINE.
365         (generate_isocbinding_symbol): Update prototype.
366         (get_iso_c_sym): Remove.
367         (gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New prototypes.
368         * intrinsic.c (gfc_intrinsic_subroutine_by_id): New function.
369         (gfc_intrinsic_sub_interface): Use it.
370         (add_functions, add_subroutines): Add missing C-binding intrinsics.
371         (gfc_intrinsic_func_interface): Add special case for c_loc.
372         gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New functions.
373         (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Use them.
374         * intrinsic.h (gfc_check_c_associated, gfc_check_c_f_pointer,
375         gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc,
376         gfc_resolve_c_loc, gfc_resolve_c_funloc): New prototypes.
377         * iresolve.c (gfc_resolve_c_loc, gfc_resolve_c_funloc): New
378         functions.
379         * iso-c-binding.def: Split PROCEDURE into NAMED_SUBROUTINE and
380         NAMED_FUNCTION.
381         * iso-fortran-env.def: Add NAMED_SUBROUTINE for completeness.
382         * module.c (create_intrinsic_function): Support subroutines and
383         derived-type results.
384         (use_iso_fortran_env_module): Update calls.
385         (import_iso_c_binding_module): Ditto; update calls to
386         generate_isocbinding_symbol.
387         * resolve.c (find_arglists): Skip for intrinsic symbols.
388         (gfc_resolve_intrinsic): Find intrinsic subs via id.
389         (is_scalar_expr_ptr, gfc_iso_c_func_interface,
390         set_name_and_label, gfc_iso_c_sub_interface): Remove.
391         (resolve_function, resolve_specific_s0): Remove calls to those.
392         (resolve_structure_cons): Fix handling.
393         * symbol.c (gen_special_c_interop_ptr): Update c_ptr/c_funptr
394         generation.
395         (gen_cptr_param, gen_fptr_param, gen_shape_param,
396         build_formal_args, get_iso_c_sym): Remove.
397         (std_for_isocbinding_symbol): Handle NAMED_SUBROUTINE.
398         (generate_isocbinding_symbol): Support hidden symbols and
399         using c_ptr/c_funptr symtrees for nullptr defs.
400         * target-memory.c (gfc_target_encode_expr): Fix handling
401         of c_ptr/c_funptr.
402         * trans-expr.c (conv_isocbinding_procedure): Remove.
403         (gfc_conv_procedure_call): Remove call to it.
404         (gfc_trans_subcomponent_assign, gfc_conv_expr): Update handling
405         of c_ptr/c_funptr.
406         * trans-intrinsic.c (conv_isocbinding_function,
407         conv_isocbinding_subroutine): New.
408         (gfc_conv_intrinsic_function, gfc_conv_intrinsic_subroutine):
409         Call them.
410         * trans-io.c (transfer_expr): Fix handling of c_ptr/c_funptr.
411         * trans-types.c (gfc_typenode_for_spec,
412         gfc_get_derived_type): Ditto.
413         (gfc_init_c_interop_kinds): Handle NAMED_SUBROUTINE.
414
415 2013-03-18  Tobias Burnus  <burnus@net-b.de>
416
417         * gfortran.h (gfc_option_t): Remove flag_whole_file.
418         * invoke.texi (-fno-whole-file): Remove.
419         * lang.opt (fwhole-file): Change to Ignore.
420         * options.c (gfc_init_options, gfc_post_options,
421         gfc_handle_option): Remove !flag_whole_file handling
422         * parse.c (resolve_all_program_units, translate_all_program_units,
423         gfc_parse_file): Ditto.
424         * resolve.c (resolve_global_procedure): Ditto.
425         * trans-decl.c (gfc_get_symbol_decl, gfc_get_extern_function_decl,
426         gfc_create_module_variable): Ditto.
427         * trans-types.c (gfc_get_derived_type): Ditto.
428
429 2013-03-15  Tobias Burnus  <burnus@net-b.de>
430
431         PR fortran/56615
432         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Pack arrays
433         if they are not simply contiguous.
434
435 2013-03-11  Tobias Burnus  <burnus@net-b.de>
436
437         * gfortran.texi (STRUCTURE and RECORD): State more clearly how
438         to convert them into derived types.
439
440 2013-03-10  Paul Thomas  <pault@gcc.gnu.org>
441
442         PR fortran/56575
443         * expr.c (gfc_default_initializer): Check that a class declared
444         type has any components.
445         * resolve.c (resolve_fl_derived0): On failing the test for C437
446         set the type to BT_UNKNOWN to prevent repeat error messages.
447
448 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
449
450         PR fortran/56477
451         * expr.c (gfc_check_pointer_assign): Avoid NULL pointer dereference.
452
453 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
454
455         PR fortran/54730
456         * array.c (gfc_match_array_constructor): Set a checkpoint before
457         matching a typespec.  Drop it on success, restore it otherwise.
458
459 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
460
461         PR fortran/54730
462         * gfortran.h (struct gfc_undo_change_set): New field 'previous'.
463         (gfc_new_undo_checkpoint, gfc_drop_last_undo_checkpoint,
464         gfc_restore_last_undo_checkpoint): New prototypes.
465         * symbol.c (default_undo_chgset_var): Update initialization.
466         (single_undo_checkpoint_p, gfc_new_undo_checkpoint,
467         free_undo_change_set_data, pop_undo_change_set,
468         gfc_drop_last_undo_checkpoint, enforce_single_undo_checkpoint):
469         New functions.
470         (save_symbol_data): Handle multiple change sets.  Make sure old_symbol
471         field's previous value is not overwritten.  Clear gfc_new field.
472         (restore_old_symbol): Restore previous old_symbol field.
473         (gfc_restore_last_undo_checkpoint): New function, using body renamed
474         from gfc_undo_symbols.  Restore the previous change set as current one.
475         (gfc_undo_symbols): New body.
476         (gfc_commit_symbols, gfc_commit_symbol, gfc_enforce_clean_symbol_state):
477         Call enforce_single_undo_checkpoint.
478         (gfc_symbol_done_2): Ditto.  Free change set data.
479
480 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
481
482         * symbol.c (restore_old_symbol): Fix thinko.
483
484 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
485
486         * symbol.c (gfc_undo_symbols): Move code...
487         (restore_old_symbol): ... here as a new function.
488
489 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
490
491         * Make-lang.in (F95_PARSER_OBJS): Add dependency to vec.h.
492         * gfortran.h: Include vec.h.
493         (gfc_undo_change_set): New struct.
494         * symbol.c (tentative_tbp): Remove struct.
495         (changed_syms, tentative_tbp_list): Remove variables.
496         (default_undo_chgset_var, latest_undo_chgset): New variables.
497         (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
498         gfc_commit_symbols, gfc_commit_symbol,
499         gfc_enforce_clean_symbol_state, gfc_get_typebound_proc):
500         Use latest_undo_chgset instead of changed_syms and tentative_tbp_list.
501
502 2013-03-01  Tobias Burnus  <burnus@net-b.de>
503
504         PR fortran/56491
505         * iresolve.c (resolve_bound): Use gfc_get_string instead of xstrdup.
506         * symbol.c (free_components): Free proc-pointer components.
507
508 2013-03-01  Tobias Burnus  <burnus@net-b.de>
509
510         * trans-decl.c (gfc_trans_deferred_vars): Free expr after use.
511         * trans-io.c (build_dt): Ditto.
512
513 2013-02-24  Joseph Myers  <joseph@codesourcery.com>
514
515         * resolve.c (generate_component_assignments): Don't use UTF-8
516         ligature in diagnostic.
517
518 2013-02-21  Janus Weil  <janus@gcc.gnu.org>
519
520         PR fortran/56385
521         * trans-array.c (structure_alloc_comps): Handle procedure-pointer
522         components with allocatable result.
523
524 2013-02-21  Tobias Burnus  <burnus@net-b.de>
525
526         PR fortran/56416
527         * gfortran.texi (Part II: Language Reference, Extensions,
528         Non-Fortran Main Program): Sort @menu to match actual section order.
529         * intrinsic.texi (Intrinsic Procedures): Ditto.
530         (C_F_POINTER, PRECISION): Move to the alphabetically correct place.
531
532 2013-02-15  Tobias Burnus  <burnus@net-b.de>
533             Mikael Morin  <mikael@gcc.gnu.org>
534
535         PR fortran/56318
536         * simplify.c (gfc_simplify_matmul): Fix result shape
537         and matmul result.
538
539 2013-02-15  Tobias Burnus  <burnus@net-b.de>
540
541         PR fortran/53818
542         * resolve.c (apply_default_init_local): Don't create an
543         initializer for a result variable.
544
545 2013-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
546
547         PR fortran/56224
548         * gfortran.h (gfc_add_include_path):  Add boolean argument
549         for warn.
550         * scanner.c (gfc_add_include_path):  Pass along warn argument
551         to add_path_to_list.
552         * options.c (gfc_post_options):  Add true warn argument to
553         gfc_add_include_path.
554         (gfc_handle_module_path_options):  Likewise.
555         (gfc_handle_option): Also gfc_add_include_path for intrinsic
556         modules, without warning.
557
558 2013-02-14  Paul Thomas  <pault@gcc.gnu.org>
559             Tobias Burnus  <burnus@net-b.de>
560
561         PR testsuite/56138
562         * trans-decl.c (gfc_get_symbol_decl): Fix deferred-length
563         results for functions without extra result variable.
564
565         Revert:
566         2013-01-30  Tobias Burnus  <burnus@net-b.de>
567
568         PR fortran/56138
569         * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
570         results for functions without extra result variable.
571
572 2013-02-12  Janus Weil  <janus@gcc.gnu.org>
573
574         PR fortran/46952
575         * resolve.c (resolve_call): Do not check deferred procedures for
576         recursiveness.
577
578 2013-02-09  Paul Thomas  <pault@gcc.gnu.org>
579
580         PR fortran/55362
581         * check.c (array_check): It is an error if a procedure is
582         passed.
583
584 2013-02-08  Mikael Morin  <mikael@gcc.gnu.org>
585
586         PR fortran/54107
587         * trans-types.c (gfc_get_function_type): Change a NULL backend_decl
588         to error_mark_node on entry.  Detect recursive types.  Build a variadic
589         procedure type if the type is recursive.  Restore the initial
590         backend_decl.
591
592 2013-02-07  Tobias Burnus  <burnus@net-b.de>
593
594         PR fortran/54339
595         * gfortran.texi (Standards): Mention TS29113.
596         (Varying Length Character): Mention deferred-length
597         strings.
598         (Fortran 2003 Status): Add unlimited polymorphic.
599         (TS 29113 Status): Add TYPE(*) and DIMENSION(..).
600         (C Interop): Update the section about TS29113.
601
602 2013-02-06 Paul Thomas  <pault@gcc.gnu.org>
603
604         PR fortran/55789
605         * trans-array.c (trans_array_constructor): Remove condition
606         'dynamic' = true if the loop ubound is a VAR_DECL.
607
608 2013-02-04  Paul Thomas  <pault@gcc.gnu.org>
609
610         PR fortran/56008
611         PR fortran/47517
612         * trans-array.c (gfc_alloc_allocatable_for_assignment): Save
613         the lhs descriptor before it is modified for reallocation. Use
614         it to deallocate allocatable components in the reallocation
615         block.  Nullify allocatable components for newly (re)allocated
616         arrays.
617
618 2013-02-04  Mikael Morin  <mikael@gcc.gnu.org>
619
620         PR fortran/54195
621         * resolve.c (resolve_typebound_procedures): Recurse through
622         resolve_symbol.
623
624 2013-02-04  Mikael Morin  <mikael@gcc.gnu.org>
625
626         PR fortran/54107
627         PR fortran/54195
628         * gfortran.h (struct gfc_symbol): New field 'resolved'.
629         * resolve.c (resolve_fl_var_and_proc): Don't skip result symbols.
630         (resolve_symbol): Skip duplicate calls.  Don't check the current
631         namespace.
632
633 2013-02-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
634
635         PR fortran/50627
636         PR fortran/56054
637         * decl.c (gfc_match_end):  Remove half-ready namespace
638         from parent if the end of a block is missing.
639         * parse.c (parse_module):  Do not put namespace into
640         gsymbol on error.
641
642 2013-01-30  Tobias Burnus  <burnus@net-b.de>
643
644         PR fortran/56138
645         * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
646         results for functions without extra result variable.
647
648 2013-01-29  Janus Weil  <janus@gcc.gnu.org>
649             Mikael Morin  <mikael@gcc.gnu.org>
650
651         PR fortran/54107
652         * gfortran.h (gfc_component): Delete members 'formal' and 'formal_ns'.
653         (gfc_copy_formal_args,gfc_copy_formal_args_ppc,gfc_expr_replace_symbols,
654         gfc_expr_replace_comp): Delete.
655         (gfc_sym_get_dummy_args): New prototype.
656         * dependency.c (gfc_check_fncall_dependency): Use
657         'gfc_sym_get_dummy_args'.
658         * expr.c (gfc_is_constant_expr): Ditto.
659         (replace_symbol,gfc_expr_replace_symbols,replace_comp,
660         gfc_expr_replace_comp): Deleted.
661         * frontend-passes.c (doloop_code,do_function): Use
662         'gfc_sym_get_dummy_args'.
663         * interface.c (gfc_check_operator_interface,gfc_compare_interfaces,
664         gfc_procedure_use,gfc_ppc_use,gfc_arglist_matches_symbol,
665         gfc_check_typebound_override): Ditto.
666         * module.c (MOD_VERSION): Bump module version.
667         (mio_component): Do not read/write 'formal' and 'formal_ns'.
668         * resolve.c (resolve_procedure_interface,resolve_fl_derived0): Do not
669         copy formal args, but just keep a pointer to the interface.
670         (resolve_function,resolve_call,resolve_typebound_generic_call,
671         resolve_ppc_call,resolve_expr_ppc,generate_component_assignments,
672         resolve_fl_procedure,gfc_resolve_finalizers,check_generic_tbp_ambiguity,
673         resolve_typebound_procedure,check_uop_procedure): Use
674         'gfc_sym_get_dummy_args'.
675         * symbol.c (free_components): Do not free 'formal' and 'formal_ns'.
676         (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Deleted.
677         (gfc_sym_get_dummy_args): New function.
678         * trans-array.c (get_array_charlen,gfc_walk_elemental_function_args):
679         Use 'gfc_sym_get_dummy_args'.
680         * trans-decl.c (build_function_decl,create_function_arglist,
681         build_entry_thunks,init_intent_out_dt,gfc_trans_deferred_vars,
682         add_argument_checking): Ditto.
683         * trans-expr.c (gfc_map_fcn_formal_to_actual,gfc_conv_procedure_call,
684         gfc_conv_statement_function): Ditto.
685         * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
686         * trans-types.c (create_fn_spec,gfc_get_function_type): Ditto.
687
688 2013-01-28  Tobias Burnus  <burnus@net-b.de>
689             Mikael Morin  <mikael@gcc.gnu.org>
690
691         PR fortran/53537
692         * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
693         interface block.
694         (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
695         * decl.c (gfc_match_data_decl): Ditto.
696         (variable_decl): Remove undeclared type error.
697         (gfc_match_import): Use renamed instead of original name.
698
699 2013-01-27 Paul Thomas  <pault@gcc.gnu.org>
700
701         PR fortran/55984
702         PR fortran/56047
703         * gfortran.h : Add associate_var to symbol_attr.
704         * resolve.c (resolve_assoc_var): Set associate_var attribute.
705         If the target class_ok is set, set it for the associate
706         variable.
707         * check.c (allocatable_check): Associate variables should not
708         have the allocatable attribute even if their symbols do.
709         * class.c (gfc_build_class_symbol): Symbols with associate_var
710         set will always have a good class container.
711
712 2013-01-23  Janus Weil  <janus@gcc.gnu.org>
713
714         PR fortran/56081
715         * resolve.c (resolve_select): Add argument 'select_type', reject
716         non-scalar expressions.
717         (resolve_select_type,resolve_code): Pass new argument to
718         'resolve_select'.
719
720 2013-01-23  Jakub Jelinek  <jakub@redhat.com>
721
722         PR fortran/56052
723         * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
724         and DECL_IGNORED_P on select_type_temporary and don't set
725         DECL_BY_REFERENCE.
726
727 2013-01-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
728
729         PR fortran/55919
730         * scanner.c (add_path_to_list): Copy path to temporary and strip
731         trailing directory separators before calling stat().
732
733 2013-01-17  Richard Biener  <rguenther@suse.de>
734
735         * trans-stmt.c (gfc_trans_do): Conditionally compute countm1
736         dependent on sign of step, avoids repeated evaluation of
737         step sign test.  Avoid undefined overflow issues by using unsigned
738         arithmetic.
739
740 2013-01-16  Janus Weil  <janus@gcc.gnu.org>
741
742         PR fortran/55983
743         * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
744         asserting it.
745
746 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
747             Tobias Burnus  <burnus@net-b.de>
748
749         PR driver/55884
750         * lang.opt (fintrinsic-modules-path): Don't accept Joined.
751         (fintrinsic-modules-path=): New.
752         * options.c (gfc_handle_option, gfc_get_option_string,
753         gfc_get_option_string): Handle the latter.
754
755 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
756
757         PR fortran/52865
758         * trans-stmt.c (gfc_trans_do): Put countm1-- before conditional
759         and use value of countm1 before the decrement in the condition.
760
761 2013-01-15  Paul Thomas  <pault@gcc.gnu.org>
762
763         PR fortran/54286
764         * expr.c (gfc_check_pointer_assign): Check for presence of
765         's2' before using it.
766
767 2013-01-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
768
769         PR fortran/55806
770         * frontend-passes.c (optimize_reduction):  New function,
771         including prototype.
772         (callback_reduction):  Likewise.
773         (gfc_run_passes):  Also run optimize_reduction.
774         (copy_walk_reduction_arg):  New function.
775         (dummy_code_callback):  New function.
776
777 2013-01-13  Jakub Jelinek  <jakub@redhat.com>
778
779         PR fortran/55935
780         * trans-expr.c (gfc_conv_structure): Call
781         unshare_expr_without_location on the ctor elements.
782
783 2013-01-13  Paul Thomas  <pault@gcc.gnu.org>
784
785         PR fortran/54286
786         * expr.c (gfc_check_pointer_assign): Ensure that both lvalue
787         and rvalue interfaces are presented to gfc_compare_interfaces.
788         Simplify references to interface names by using the symbols
789         themselves. Call gfc_compare_interfaces with s1 and s2 inter-
790         changed to overcome the asymmetry of this function. Do not
791         repeat the check for the presence of s1 and s2.
792
793 2013-01-12  Janus Weil  <janus@gcc.gnu.org>
794
795         PR fortran/55072
796         * trans-array.c (gfc_conv_array_parameter): No packing was done for
797         full arrays of derived type.
798
799 2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
800
801         PR fortran/55868
802         * class.c (get_unique_type_string): Change $tar to STAR and
803         replace sprintf by strcpy where there is no formatting.
804         * decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
805
806 2013-01-09  Mikael Morin  <mikael@gcc.gnu.org>
807
808         PR fortran/47203
809         * module.c (check_for_ambiguous): Get the current program unit using
810         gfc_current_ns.
811
812 2013-01-09  Tobias Burnus  <burnus@net-b.de>
813
814         PR fortran/55758
815         * resolve.c (resolve_symbol): Reject non-C_Bool logicals
816         in BIND(C) procedures with -std=f*.
817
818 2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
819
820         PR fortran/55618
821         * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
822         character function arguments to elemental procedures in
823         scalarization loops.
824
825 2013-01-07  Tobias Burnus  <burnus@net-b.de>
826
827         PR fortran/55763
828         * gfortran.h (gfc_check_assign_symbol): Update prototype.
829         * decl.c (add_init_expr_to_sym, do_parm): Update call.
830         * expr.c (gfc_check_assign_symbol): Handle BT_CLASS and
831         improve error location; support components.
832         (gfc_check_pointer_assign): Handle component assignments.
833         * resolve.c (resolve_fl_derived0): Call gfc_check_assign_symbol.
834         (resolve_values): Update call.
835         (resolve_structure_cons): Avoid double diagnostic.
836
837 2013-01-07  Tobias Burnus  <burnus@net-b.de>
838             Thomas Koenig  <tkoenig@gcc.gnu.org>
839
840         PR fortran/55852
841         * expr.c (gfc_build_intrinsic_call): Avoid clashes
842         with user's procedures.
843         * gfortran.h (gfc_build_intrinsic_call): Update prototype.
844         * simplify.c (gfc_simplify_size): Update call.
845         * class.c (finalization_scalarizer, finalization_get_offset,
846         finalizer_insert_packed_call, generate_finalization_wrapper):
847         Clean up by using gfc_build_intrinsic_call.
848
849 2013-01-07  Tobias Burnus  <burnus@net-b.de>
850
851         PR fortran/55763
852         * resolve.c (resolve_select_type): Reject intrinsic types for
853         a non-unlimited-polymorphic selector.
854
855 2013-01-06  Paul Thomas  <pault@gcc.gnu.org>
856
857         PR fortran/53876
858         PR fortran/54990
859         PR fortran/54992
860         * trans-array.c (build_array_ref): Check the TYPE_CANONICAL
861         to see if it is GFC_CLASS_TYPE_P.
862         * trans-expr.c (gfc_get_vptr_from_expr): The same.
863         (gfc_conv_class_to_class): If the types are not the same,
864         cast parmese->expr to the type of ctree.
865         * trans-types.c (gfc_get_derived_type): GFC_CLASS_TYPE_P of
866         CLASS components must be set.
867
868 2013-01-06  Mikael Morin  <mikael@gcc.gnu.org>
869
870         PR fortran/42769
871         PR fortran/45836
872         PR fortran/45900
873         * module.c (read_module): Don't reuse local symtree if the associated
874         symbol isn't exactly the one wanted.  Don't reuse local symtree if it is
875         ambiguous.
876         * resolve.c (resolve_call): Use symtree's name instead of symbol's to
877         lookup the symtree.
878
879 2013-01-05  Steven G. Kargl  <kargl@gcc.gnu.org>
880             Mikael Morin  <mikael@gcc.gnu.org>
881
882         PR fortran/55827
883         * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
884         e->symtree == NULL.
885         * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
886
887 2013-01-05  Tobias Burnus  <burnus@net-b.de>
888
889         * class.c (finalize_component): Used passed offset expr.
890         (finalization_get_offset): New static function.
891         (finalizer_insert_packed_call, generate_finalization_wrapper): Use it
892         to handle noncontiguous arrays.
893
894 2013-01-04  Tobias Burnus  <burnus@net-b.de>
895
896         * trans.c (gfc_build_final_call): New function.
897         * trans.h (gfc_build_final_call, gfc_conv_scalar_to_descriptor):
898         New function prototypes.
899         * trans-expr.c (gfc_conv_scalar_to_descriptor): Renamed from
900         conv_scalar_to_descriptor, removed static attribute.
901         (gfc_conv_procedure_call): Honor renaming.
902
903 2013-01-04  Tobias Burnus  <burnus@net-b.de>
904
905         * intrinsic.c (add_functions): New internal intrinsic
906         function GFC_PREFIX ("stride").
907         * gfortran.h (gfc_isym_id): Add GFC_ISYM_STRIDE.
908         * intrinsic.h (gfc_resolve_stride): New prototypes.
909         * iresolve.c (gfc_resolve_stride): New function.
910         * trans-intrinsic.c (conv_intrinsic_stride): New static
911         function.
912         (gfc_conv_intrinsic_function): Use it.
913
914 2013-01-04  Tobias Burnus  <burnus@net-b.de>
915
916         * class.c (gfc_find_intrinsic_vtab): Add _final
917         component.
918         * decl.c (gfc_match_null): Remove superfluous
919         variadic argument to gfc_match.
920
921 2013-01-04  Paul Thomas  <pault@gcc.gnu.org>
922
923         PR fortran/55172
924         * match.c (copy_ts_from_selector_to_associate): Remove call to
925         gfc_resolve_expr and replace it with explicit setting of the
926         array reference type.
927         * resolve.c (resolve_select_type): It is an error if the
928         selector is coindexed.
929
930 2013-01-04  Tobias Burnus  <burnus@net-b.de>
931
932         PR fortran/55763
933         * decl.c (gfc_match_null): Parse and reject MOLD.
934
935 2013-01-04  Tobias Burnus  <burnus@net-b.de>
936
937         PR fortran/55854
938         PR fortran/55763
939         * class.c (gfc_class_null_initializer): Fix finding the vtab.
940         (gfc_find_intrinsic_vtab): Use BT_VOID for some components.
941
942 2013-01-03  Janus Weil  <janus@gcc.gnu.org>
943
944         PR fortran/55855
945         * expr.c (gfc_check_assign): Use 'gfc_expr_attr' to evaluate attributes
946         of rvalue. Correct hyphenation in error message.
947
948 2013-01-03  Jakub Jelinek  <jakub@redhat.com>
949
950         * gfortranspec.c (lang_specific_driver): Update copyright notice
951         dates.
952 \f
953 Copyright (C) 2013 Free Software Foundation, Inc.
954
955 Copying and distribution of this file, with or without modification,
956 are permitted in any medium without royalty provided the copyright
957 notice and this notice are preserved.