Merge branches/gcc-4_8-branch rev 208968.
[official-gcc.git] / gcc-4_8-branch / gcc / fortran / ChangeLog
blob3c37c6b7a9a04723ca2542eeb30fcde0bec50c2b
1 2014-03-29  Mikael Morin  <mikael@gcc.gnu.org>
3         PR fortran/60677
4         * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Enlarge argument
5         list buffer.
7 2014-03-28  Mikael Morin  <mikael@gcc.gnu.org>
8             Tobias Burnus  <burnus@net-b.de>
10         PR fortran/60576
11         * trans-expr.c (gfc_conv_derived_to_class): Avoid
12         generation of out-of-bounds range expr.
14 2014-03-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
16         PR fortran/60522
17         * frontend-passes.c (cfe_code):  Do not walk subtrees
18         for WHERE.
20 2014-03-20  Tobias Burnus  <burnus@net-b.de>
22         PR fortran/60543
23         PR fortran/60283
24         * gfortran.h (gfc_unset_implicit_pure): New prototype.
25         * resolve.c (gfc_unset_implicit_pure): New.
26         (resolve_structure_cons, resolve_function,
27         pure_subroutine, resolve_ordinary_assign): Use it.
28         * decl.c (match_old_style_init, gfc_match_data,
29         match_pointer_init, variable_decl): Ditto.
30         * expr.c (gfc_check_pointer_assign): Ditto.
31         * intrinsic.c (gfc_intrinsic_sub_interface): Ditto.
32         * io.c (match_vtag, gfc_match_open, gfc_match_close,
33         match_filepos, gfc_match_inquire, gfc_match_print,
34         gfc_match_wait, check_io_constraints): Ditto.
35         * match.c (gfc_match_critical, gfc_match_stopcode,
36         lock_unlock_statement, sync_statement, gfc_match_allocate,
37         gfc_match_deallocate): Ditto.
38         * parse.c (decode_omp_directive): Ditto.
39         * symbol.c (gfc_add_save): Ditto.
41 2014-03-08  Janus Weil  <janus@gcc.gnu.org>
43         PR fortran/60450
44         * simplify.c (gfc_simplify_shape): Only clear shape if it was really
45         created successfully.
47 2014-03-06  Jakub Jelinek  <jakub@redhat.com>
49         Backport from mainline
50         2014-02-11  Jakub Jelinek  <jakub@redhat.com>
52         PR fortran/52370
53         * trans-decl.c (gfc_build_dummy_array_decl): Set TREE_NO_WARNING
54         on decl if sym->attr.optional.
56 2014-03-02  Mikael Morin  <mikael@gcc.gnu.org>
58         PR fortran/60341
59         * frontend-passes.c (optimize_comparison): Guard two union accesses
60         with the corresponding tag checks.
62 2014-02-22  Mikael Morin  <mikael@gcc.gnu.org>
64         PR fortran/59599
65         * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Calculate the
66         number of arguments.
68 2014-02-19  Tobias Burnus  <burnus@net-b.de>
70         PR fortran/49397
71         * expr.c (gfc_check_pointer_assign): Add check for
72         F2008Cor2, C729.
73         * trans-decl.c (gfc_get_symbol_decl): Correctly generate
74         external decl in a corner case.
76 2014-02-19  Janus Weil  <janus@gcc.gnu.org>
78         Backports from mainline:
79         2014-02-17  Janus Weil  <janus@gcc.gnu.org>
81         PR fortran/55907
82         * resolve.c (build_default_init_expr): Don't initialize character
83         variable if -fno-automatic is given.
85         2014-02-18  Janus Weil  <janus@gcc.gnu.org>
87         PR fortran/60231
88         * resolve.c (check_generic_tbp_ambiguity): Check for presence of dummy
89         arguments to prevent ICE.
91 2014-02-09  Janus Weil  <janus@gcc.gnu.org>
93         Backport from mainline
94         2013-10-21  Tobias Burnus  <burnus@net-b.de>
96         PR fortran/58803
97         PR fortran/59395
98         * decl.c (match_ppc_decl): Prevent later double free.
100 2014-02-08  Mikael Morin  <mikael@gcc.gnu.org>
102         PR fortran/57033
103         * primary.c (gfc_convert_to_structure_constructor): Avoid null pointer
104         dereference.
106 2014-02-07  Paul Thomas  <pault@gcc.gnu.org>
108         PR fortran/59906
109         * trans-stmt.c (gfc_add_loop_ss_code): In the case of character
110         SS_REFERENCE, use gfc_conv_string_parameter to ensure that a
111         pointer to the string is stored.
112         * trans-expr.c (gfc_conv_expr_reference): Likewise, use
113         gfc_conv_string_parameter to ensure that a pointer to is passed
114         to the elemental function.
116 2014-02-01  Paul Thomas  <pault@gcc.gnu.org>
118         PR fortran/59414
119         * trans-stmt.c (gfc_trans_allocate): Before the pointer
120         assignment to transfer the source _vptr to a class allocate
121         expression, the final class reference should be exposed. The
122         tail that includes the _data and array references is stored.
123         This reduced expression is transferred to 'lhs' and the _vptr
124         added. Then the tail is restored to the allocate expression.
126 2014-01-26  Mikael Morin  <mikael@gcc.gnu.org>
128         PR fortran/58007
129         * module.c
130         (fp2, find_pointer2): Remove.
131         (mio_component_ref): Don't forcedfully set the containing derived type
132         symbol for loading.  Remove unused argument.
133         (mio_ref): Update caller
134         (skip_list): New argument nest_level.  Initialize level with the new
135         argument.
136         (read_module): Add forced pointer components association for derived
137         type symbols.
139 2014-01-19  Paul Thomas  <pault@gcc.gnu.org>
141         Backport from mainline
142         2013-12-01  Paul Thomas  <pault@gcc.gnu.org>
144         PR fortran/58410
145         * trans-array.c (gfc_alloc_allocatable_for_assignment): Do not
146         use the array bounds of an unallocated array but set its size
147         to zero instead.
149 2014-01-19  Paul Thomas  <pault@gcc.gnu.org>
151         Backport from mainline
152         2013-12-01  Paul Thomas  <pault@gcc.gnu.org>
154         PR fortran/34547
155         * resolve.c (resolve_transfer): EXPR_NULL is always in an
156         invalid context in a transfer statement.
158 2014-01-11  Janus Weil  <janus@gcc.gnu.org>
160         Backport from mainline
161         2013-12-29  Janus Weil  <janus@gcc.gnu.org>
163         PR fortran/59612
164         PR fortran/57042
165         * dump-parse-tree.c (show_typespec): Check for charlen.
166         * invoke.texi: Fix documentation of -fdump-fortran-optimized and
167         -fdump-parse-tree.
169 2014-01-04  Janus Weil  <janus@gcc.gnu.org>
171         Backport from mainline
172         2014-01-02  Janus Weil  <janus@gcc.gnu.org>
174         PR fortran/59654
175         * resolve.c (resolve_typebound_procedures): No need to create the vtab
176         here.
178 2013-12-31  Janus Weil  <janus@gcc.gnu.org>
180         Backport from mainline
181         2013-12-30  Janus Weil  <janus@gcc.gnu.org>
183         PR fortran/58998
184         * resolve.c (resolve_symbol): Check that symbol is not only flavorless
185         but also untyped.
187 2013-12-18  Janus Weil  <janus@gcc.gnu.org>
189         Backport from mainline
190         2013-12-15  Janus Weil  <janus@gcc.gnu.org>
192         PR fortran/59493
193         * class.c (gfc_find_intrinsic_vtab): Handle BT_CLASS.
195 2013-11-30  Paul Thomas  <pault@gcc.gnu.org>
197         Backport from mainline
198         2013-11-04  Paul Thomas  <pault@gcc.gnu.org>
200         PR fortran/57445
201         * trans-expr.c (gfc_conv_class_to_class): Remove spurious
202         assert.
204 2013-11-17  Janus Weil  <janus@gcc.gnu.org>
206         Backport from mainline
207         2013-11-07  Janus Weil  <janus@gcc.gnu.org>
209         PR fortran/58471
210         * primary.c (gfc_expr_attr): Check for result symbol.
212 2013-11-16  Janus Weil  <janus@gcc.gnu.org>
214         Backport from mainline
215         2013-09-20  Janus Weil  <janus@gcc.gnu.org>
217         PR fortran/58099
218         * expr.c (gfc_check_pointer_assign): Remove second call to
219         'gfc_compare_interfaces' with swapped arguments.
220         * interface.c (gfc_compare_interfaces): Symmetrize the call to
221         'check_result_characteristics' by calling it with swapped arguments.
223 2013-11-16  Paul Thomas  <pault@gcc.gnu.org>
225         PR fortran/58771
226         * trans-io.c (transfer_expr): If the backend_decl for a derived
227         type is missing, build it with gfc_typenode_for_spec.
229 2013-11-05  Steven G. Kargl <kargl@gcc.gnu.org>
231         PR fortran/58989
232         * check.c (gfc_check_reshape): ensure that shape is a constant
233         expression.
235 2013-11-02  Janus Weil  <janus@gcc.gnu.org>
237         Backport from mainline
238         2013-09-23  Janus Weil  <janus@gcc.gnu.org>
240         PR fortran/58355
241         * decl.c (check_extended_derived_type): Prevent segfault, modify error
242         message.
244 2013-10-16  Release Manager
246         * GCC 4.8.2 released.
248 2013-10-04  Tobias Burnus  <burnus@net-b.de>
250         Backport from mainline
251         2013-09-25  Tobias Burnus  <burnus@net-b.de>
253         PR fortran/57697
254         PR fortran/58469
255         * resolve.c (generate_component_assignments): Avoid double free
256         at runtime and freeing a still-being used expr.
258 2013-08-24  Mikael Morin  <mikael@gcc.gnu.org>
260         PR fortran/57798
261         * trans-array.c (gfc_conv_ss_startstride, set_loop_bounds,
262         gfc_set_delta): Generate preliminary code before the outermost loop.
264 2013-08-24  Mikael Morin  <mikael@gcc.gnu.org>
266         * trans-array.c (gfc_conv_section_startstride): Move &loop->pre access
267         to the callers.
268         (gfc_conv_ss_startstride, gfc_conv_expr_descriptor): Update callers.
270 2013-08-24  Janus Weil  <janus@gcc.gnu.org>
272         Backport from trunk:
273         2013-08-22  Janus Weil  <janus@gcc.gnu.org>
275         PR fortran/58185
276         * match.c (copy_ts_from_selector_to_associate): Only build class
277         container for polymorphic selector. Some cleanup.
279 2013-08-11  Janus Weil  <janus@gcc.gnu.org>
281         Backport from trunk:
282         2013-08-09  Janus Weil  <janus@gcc.gnu.org>
284         PR fortran/58058
285         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Free the temporary
286         string, if necessary.
288 2013-07-28  Tobias Burnus  <burnus@net-b.de>
290         Backport from mainline
291         2013-05-28  Dominique d'Humieres  <dominiq@lps.ens.fr>
293         PR fortran/57435
294         * module.c (check_for_ambiguous): Avoid null pointer deref.
296 2013-07-08  Tobias Burnus  <burnus@net-b.de>
298         PR fortran/57785
299         * simplify.c (compute_dot_product): Complex conjugate for
300         dot_product.
301         (gfc_simplify_dot_product, gfc_simplify_matmul): Update call.
303 2013-06-11  Tobias Burnus  <burnus@net-b.de>
305         PR fortran/57508
306         * resolve.c (get_temp_from_expr): Don't copy function
307         result attributes to temporary.
309 2013-06-04  Tobias Burnus  <burnus@net-b.de>
311         Backport from mainline
312         2013-05-22  Tobias Burnus  <burnus@net-b.de>
314         PR fortran/57364
315         * resolve.c (get_temp_from_expr): Commit created sym.
317 2013-05-31  Janus Weil  <janus@gcc.gnu.org>
318             Tobias Burnus  <burnus@net-b.de>
320         PR fortran/57217
321         * interface.c (check_dummy_characteristics): Symmetrize type check.
323 2013-05-31  Release Manager
325         * GCC 4.8.1 released.
327 2013-05-22  Janne Blomqvist  <jb@gcc.gnu.org>
329         * intrinsic.texi (RANDOM_SEED): Improve example.
331 2013-05-07  Tobias Burnus  <burnus@net-b.de>
333         Backport from mainline
334         2013-05-02  Tobias Burnus  <burnus@net-b.de>
336         PR fortran/57142
337         * simplify.c (gfc_simplify_size): Renamed from
338         simplify_size; fix kind=8 handling.
339         (gfc_simplify_size): New function.
340         (gfc_simplify_shape): Add range check.
341         * resolve.c (resolve_function): Fix handling
342         for ISYM_SIZE.
344 2013-04-26  Janus Weil  <janus@gcc.gnu.org>
346         Backports from trunk:
348         PR fortran/56814
349         * interface.c (check_result_characteristics): Get result from interface
350         if present.
352         PR fortran/56968
353         * expr.c (gfc_check_pointer_assign): Handle generic functions returning
354         procedure pointers.
356         PR fortran/53685
357         PR fortran/57022
358         * check.c (gfc_calculate_transfer_sizes): Fix for array-valued SOURCE
359         expressions.
360         * target-memory.h (gfc_element_size): New prototype.
361         * target-memory.c (size_array): Remove.
362         (gfc_element_size): New function.
363         (gfc_target_expr_size): Modified to always return the full size of the
364         expression.
366 2013-04-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
367             Mikael Morin  <mikael@gcc.gnu.org>
369         PR fortran/56872
370         * frontend-passes.c (copy_walk_reduction_arg): Change argument type
371         to gfc_constructor.  If it has an iterator, wrap the copy of its
372         expression in an array constructor with that iterator.  Don't special
373         case function expressions.
374         (callback_reduction): Update caller.  Don't return early if there is
375         an iterator.
377 2013-04-18  Mikael Morin  <mikael@gcc.gnu.org>
379         PR fortran/56816
380         * match.c (gfc_match_select_type): Add syntax error. Move namespace
381         allocation and cleanup...
382         * parse.c (decode_statement): ... here.
384 2013-04-18  Tobias Burnus  <burnus@net-b.de>
386         PR fortran/56994
387         * invoke.texi (NEAREST): S argument is not optional.
389 2013-04-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
391         PR fortran/56782
392         Backport fron trunk.
393         * frontend-passes.c (callback_reduction):  Dont't do
394         any simplification if there is only a single element
395         which has an iterator.
397 2013-03-22  Release Manager
399         * GCC 4.8.0 released.
401 2013-03-15  Tobias Burnus  <burnus@net-b.de>
403         PR fortran/56615
404         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Pack arrays
405         if they are not simply contiguous.
407 2013-03-11  Tobias Burnus  <burnus@net-b.de>
409         * gfortran.texi (STRUCTURE and RECORD): State more clearly how
410         to convert them into derived types.
412 2013-03-10  Paul Thomas  <pault@gcc.gnu.org>
414         PR fortran/56575
415         * expr.c (gfc_default_initializer): Check that a class declared
416         type has any components.
417         * resolve.c (resolve_fl_derived0): On failing the test for C437
418         set the type to BT_UNKNOWN to prevent repeat error messages.
420 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
422         PR fortran/56477
423         * expr.c (gfc_check_pointer_assign): Avoid NULL pointer dereference.
425 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
427         PR fortran/54730
428         * array.c (gfc_match_array_constructor): Set a checkpoint before
429         matching a typespec.  Drop it on success, restore it otherwise.
431 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
433         PR fortran/54730
434         * gfortran.h (struct gfc_undo_change_set): New field 'previous'.
435         (gfc_new_undo_checkpoint, gfc_drop_last_undo_checkpoint,
436         gfc_restore_last_undo_checkpoint): New prototypes.
437         * symbol.c (default_undo_chgset_var): Update initialization.
438         (single_undo_checkpoint_p, gfc_new_undo_checkpoint,
439         free_undo_change_set_data, pop_undo_change_set,
440         gfc_drop_last_undo_checkpoint, enforce_single_undo_checkpoint):
441         New functions.
442         (save_symbol_data): Handle multiple change sets.  Make sure old_symbol
443         field's previous value is not overwritten.  Clear gfc_new field.
444         (restore_old_symbol): Restore previous old_symbol field.
445         (gfc_restore_last_undo_checkpoint): New function, using body renamed
446         from gfc_undo_symbols.  Restore the previous change set as current one.
447         (gfc_undo_symbols): New body.
448         (gfc_commit_symbols, gfc_commit_symbol, gfc_enforce_clean_symbol_state):
449         Call enforce_single_undo_checkpoint.
450         (gfc_symbol_done_2): Ditto.  Free change set data.
452 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
454         * symbol.c (restore_old_symbol): Fix thinko.
456 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
458         * symbol.c (gfc_undo_symbols): Move code...
459         (restore_old_symbol): ... here as a new function.
461 2013-03-03  Mikael Morin  <mikael@gcc.gnu.org>
463         * Make-lang.in (F95_PARSER_OBJS): Add dependency to vec.h.
464         * gfortran.h: Include vec.h.
465         (gfc_undo_change_set): New struct.
466         * symbol.c (tentative_tbp): Remove struct.
467         (changed_syms, tentative_tbp_list): Remove variables.
468         (default_undo_chgset_var, latest_undo_chgset): New variables.
469         (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
470         gfc_commit_symbols, gfc_commit_symbol,
471         gfc_enforce_clean_symbol_state, gfc_get_typebound_proc):
472         Use latest_undo_chgset instead of changed_syms and tentative_tbp_list.
474 2013-03-01  Tobias Burnus  <burnus@net-b.de>
476         PR fortran/56491
477         * iresolve.c (resolve_bound): Use gfc_get_string instead of xstrdup.
478         * symbol.c (free_components): Free proc-pointer components.
480 2013-03-01  Tobias Burnus  <burnus@net-b.de>
482         * trans-decl.c (gfc_trans_deferred_vars): Free expr after use.
483         * trans-io.c (build_dt): Ditto.
485 2013-02-24  Joseph Myers  <joseph@codesourcery.com>
487         * resolve.c (generate_component_assignments): Don't use UTF-8
488         ligature in diagnostic.
490 2013-02-21  Janus Weil  <janus@gcc.gnu.org>
492         PR fortran/56385
493         * trans-array.c (structure_alloc_comps): Handle procedure-pointer
494         components with allocatable result.
496 2012-02-21  Tobias Burnus  <burnus@net-b.de>
498         PR fortran/56416
499         * gfortran.texi (Part II: Language Reference, Extensions,
500         Non-Fortran Main Program): Sort @menu to match actual section order.
501         * intrinsic.texi (Intrinsic Procedures): Ditto.
502         (C_F_POINTER, PRECISION): Move to the alphabetically correct place.
504 2013-02-15  Tobias Burnus  <burnus@net-b.de>
505             Mikael Morin  <mikael@gcc.gnu.org>
507         PR fortran/56318
508         * simplify.c (gfc_simplify_matmul): Fix result shape
509         and matmul result.
511 2013-02-15  Tobias Burnus  <burnus@net-b.de>
513         PR fortran/53818
514         * resolve.c (apply_default_init_local): Don't create an
515         initializer for a result variable.
517 2013-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
519         PR fortran/56224
520         * gfortran.h (gfc_add_include_path):  Add boolean argument
521         for warn.
522         * scanner.c (gfc_add_include_path):  Pass along warn argument
523         to add_path_to_list.
524         * options.c (gfc_post_options):  Add true warn argument to
525         gfc_add_include_path.
526         (gfc_handle_module_path_options):  Likewise.
527         (gfc_handle_option): Also gfc_add_include_path for intrinsic
528         modules, without warning.
530 2013-02-14  Paul Thomas  <pault@gcc.gnu.org>
531             Tobias Burnus  <burnus@net-b.de>
533         PR testsuite/56138
534         * trans-decl.c (gfc_get_symbol_decl): Fix deferred-length
535         results for functions without extra result variable.
537         Revert:
538         2013-01-30  Tobias Burnus  <burnus@net-b.de>
540         PR fortran/56138
541         * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
542         results for functions without extra result variable.
544 2013-02-12  Janus Weil  <janus@gcc.gnu.org>
546         PR fortran/46952
547         * resolve.c (resolve_call): Do not check deferred procedures for
548         recursiveness.
550 2013-02-09  Paul Thomas  <pault@gcc.gnu.org>
552         PR fortran/55362
553         * check.c (array_check): It is an error if a procedure is
554         passed.
556 2013-02-08  Mikael Morin  <mikael@gcc.gnu.org>
558         PR fortran/54107
559         * trans-types.c (gfc_get_function_type): Change a NULL backend_decl
560         to error_mark_node on entry.  Detect recursive types.  Build a variadic
561         procedure type if the type is recursive.  Restore the initial
562         backend_decl.
564 2013-02-07  Tobias Burnus  <burnus@net-b.de>
566         PR fortran/54339
567         * gfortran.texi (Standards): Mention TS29113.
568         (Varying Length Character): Mention deferred-length
569         strings.
570         (Fortran 2003 Status): Add unlimited polymorphic.
571         (TS 29113 Status): Add TYPE(*) and DIMENSION(..).
572         (C Interop): Update the section about TS29113.
574 2013-02-06 Paul Thomas  <pault@gcc.gnu.org>
576         PR fortran/55789
577         * trans-array.c (trans_array_constructor): Remove condition
578         'dynamic' = true if the loop ubound is a VAR_DECL.
580 2013-02-04  Paul Thomas  <pault@gcc.gnu.org>
582         PR fortran/56008
583         PR fortran/47517
584         * trans-array.c (gfc_alloc_allocatable_for_assignment): Save
585         the lhs descriptor before it is modified for reallocation. Use
586         it to deallocate allocatable components in the reallocation
587         block.  Nullify allocatable components for newly (re)allocated
588         arrays.
590 2013-02-04  Mikael Morin  <mikael@gcc.gnu.org>
592         PR fortran/54195
593         * resolve.c (resolve_typebound_procedures): Recurse through
594         resolve_symbol.
596 2013-02-04  Mikael Morin  <mikael@gcc.gnu.org>
598         PR fortran/54107
599         PR fortran/54195
600         * gfortran.h (struct gfc_symbol): New field 'resolved'.
601         * resolve.c (resolve_fl_var_and_proc): Don't skip result symbols.
602         (resolve_symbol): Skip duplicate calls.  Don't check the current
603         namespace.
605 2013-02-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
607         PR fortran/50627
608         PR fortran/56054
609         * decl.c (gfc_match_end):  Remove half-ready namespace
610         from parent if the end of a block is missing.
611         * parse.c (parse_module):  Do not put namespace into
612         gsymbol on error.
614 2013-01-30  Tobias Burnus  <burnus@net-b.de>
616         PR fortran/56138
617         * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
618         results for functions without extra result variable.
620 2013-01-29  Janus Weil  <janus@gcc.gnu.org>
621             Mikael Morin <mikael@gcc.gnu.org>
623         PR fortran/54107
624         * gfortran.h (gfc_component): Delete members 'formal' and 'formal_ns'.
625         (gfc_copy_formal_args,gfc_copy_formal_args_ppc,gfc_expr_replace_symbols,
626         gfc_expr_replace_comp): Delete.
627         (gfc_sym_get_dummy_args): New prototype.
628         * dependency.c (gfc_check_fncall_dependency): Use
629         'gfc_sym_get_dummy_args'.
630         * expr.c (gfc_is_constant_expr): Ditto.
631         (replace_symbol,gfc_expr_replace_symbols,replace_comp,
632         gfc_expr_replace_comp): Deleted.
633         * frontend-passes.c (doloop_code,do_function): Use
634         'gfc_sym_get_dummy_args'.
635         * interface.c (gfc_check_operator_interface,gfc_compare_interfaces,
636         gfc_procedure_use,gfc_ppc_use,gfc_arglist_matches_symbol,
637         gfc_check_typebound_override): Ditto.
638         * module.c (MOD_VERSION): Bump module version.
639         (mio_component): Do not read/write 'formal' and 'formal_ns'.
640         * resolve.c (resolve_procedure_interface,resolve_fl_derived0): Do not
641         copy formal args, but just keep a pointer to the interface.
642         (resolve_function,resolve_call,resolve_typebound_generic_call,
643         resolve_ppc_call,resolve_expr_ppc,generate_component_assignments,
644         resolve_fl_procedure,gfc_resolve_finalizers,check_generic_tbp_ambiguity,
645         resolve_typebound_procedure,check_uop_procedure): Use
646         'gfc_sym_get_dummy_args'.
647         * symbol.c (free_components): Do not free 'formal' and 'formal_ns'.
648         (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Deleted.
649         (gfc_sym_get_dummy_args): New function.
650         * trans-array.c (get_array_charlen,gfc_walk_elemental_function_args):
651         Use 'gfc_sym_get_dummy_args'.
652         * trans-decl.c (build_function_decl,create_function_arglist,
653         build_entry_thunks,init_intent_out_dt,gfc_trans_deferred_vars,
654         add_argument_checking): Ditto.
655         * trans-expr.c (gfc_map_fcn_formal_to_actual,gfc_conv_procedure_call,
656         gfc_conv_statement_function): Ditto.
657         * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
658         * trans-types.c (create_fn_spec,gfc_get_function_type): Ditto.
660 2013-01-28  Tobias Burnus  <burnus@net-b.de>
661             Mikael Morin  <mikael@gcc.gnu.org>
663         PR fortran/53537
664         * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
665         interface block.
666         (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
667         * decl.c (gfc_match_data_decl): Ditto.
668         (variable_decl): Remove undeclared type error.
669         (gfc_match_import): Use renamed instead of original name.
671 2013-01-27 Paul Thomas  <pault@gcc.gnu.org>
673         PR fortran/55984
674         PR fortran/56047
675         * gfortran.h : Add associate_var to symbol_attr.
676         * resolve.c (resolve_assoc_var): Set associate_var attribute.
677         If the target class_ok is set, set it for the associate
678         variable.
679         * check.c (allocatable_check): Associate variables should not
680         have the allocatable attribute even if their symbols do.
681         * class.c (gfc_build_class_symbol): Symbols with associate_var
682         set will always have a good class container.
684 2013-01-23  Janus Weil  <janus@gcc.gnu.org>
686         PR fortran/56081
687         * resolve.c (resolve_select): Add argument 'select_type', reject
688         non-scalar expressions.
689         (resolve_select_type,resolve_code): Pass new argument to
690         'resolve_select'.
692 2013-01-23  Jakub Jelinek  <jakub@redhat.com>
694         PR fortran/56052
695         * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
696         and DECL_IGNORED_P on select_type_temporary and don't set
697         DECL_BY_REFERENCE.
699 2013-01-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
701         PR fortran/55919
702         * scanner.c (add_path_to_list): Copy path to temporary and strip
703         trailing directory separators before calling stat().
705 2013-01-17  Richard Biener  <rguenther@suse.de>
707         * trans-stmt.c (gfc_trans_do): Conditionally compute countm1
708         dependent on sign of step, avoids repeated evaluation of
709         step sign test.  Avoid undefined overflow issues by using unsigned
710         arithmetic.
712 2013-01-16  Janus Weil  <janus@gcc.gnu.org>
714         PR fortran/55983
715         * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
716         asserting it.
718 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
719             Tobias Burnus  <burnus@net-b.de>
721         PR driver/55884
722         * lang.opt (fintrinsic-modules-path): Don't accept Joined.
723         (fintrinsic-modules-path=): New.
724         * options.c (gfc_handle_option, gfc_get_option_string,
725         gfc_get_option_string): Handle the latter.
727 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
729         PR fortran/52865
730         * trans-stmt.c (gfc_trans_do): Put countm1-- before conditional
731         and use value of countm1 before the decrement in the condition.
733 2013-01-15  Paul Thomas  <pault@gcc.gnu.org>
735         PR fortran/54286
736         * expr.c (gfc_check_pointer_assign): Check for presence of
737         's2' before using it.
739 2013-01-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
741         PR fortran/55806
742         * frontend-passes.c (optimize_reduction):  New function,
743         including prototype.
744         (callback_reduction):  Likewise.
745         (gfc_run_passes):  Also run optimize_reduction.
746         (copy_walk_reduction_arg):  New function.
747         (dummy_code_callback):  New function.
749 2013-01-13  Jakub Jelinek  <jakub@redhat.com>
751         PR fortran/55935
752         * trans-expr.c (gfc_conv_structure): Call
753         unshare_expr_without_location on the ctor elements.
755 2013-01-13  Paul Thomas  <pault@gcc.gnu.org>
757         PR fortran/54286
758         * expr.c (gfc_check_pointer_assign): Ensure that both lvalue
759         and rvalue interfaces are presented to gfc_compare_interfaces.
760         Simplify references to interface names by using the symbols
761         themselves. Call gfc_compare_interfaces with s1 and s2 inter-
762         changed to overcome the asymmetry of this function. Do not
763         repeat the check for the presence of s1 and s2.
765 2013-01-12  Janus Weil  <janus@gcc.gnu.org>
767         PR fortran/55072
768         * trans-array.c (gfc_conv_array_parameter): No packing was done for
769         full arrays of derived type.
771 2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
773         PR fortran/55868
774         * class.c (get_unique_type_string): Change $tar to STAR and
775         replace sprintf by strcpy where there is no formatting.
776         * decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
778 2013-01-09  Mikael Morin  <mikael@gcc.gnu.org>
780         PR fortran/47203
781         * module.c (check_for_ambiguous): Get the current program unit using
782         gfc_current_ns.
784 2013-01-09  Tobias Burnus  <burnus@net-b.de>
786         PR fortran/55758
787         * resolve.c (resolve_symbol): Reject non-C_Bool logicals
788         in BIND(C) procedures with -std=f*.
790 2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
792         PR fortran/55618
793         * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
794         character function arguments to elemental procedures in
795         scalarization loops.
797 2013-01-07  Tobias Burnus  <burnus@net-b.de>
799         PR fortran/55763
800         * gfortran.h (gfc_check_assign_symbol): Update prototype.
801         * decl.c (add_init_expr_to_sym, do_parm): Update call.
802         * expr.c (gfc_check_assign_symbol): Handle BT_CLASS and
803         improve error location; support components.
804         (gfc_check_pointer_assign): Handle component assignments.
805         * resolve.c (resolve_fl_derived0): Call gfc_check_assign_symbol.
806         (resolve_values): Update call.
807         (resolve_structure_cons): Avoid double diagnostic.
809 2013-01-07  Tobias Burnus  <burnus@net-b.de>
810             Thomas Koenig  <tkoenig@gcc.gnu.org>
812         PR fortran/55852
813         * expr.c (gfc_build_intrinsic_call): Avoid clashes
814         with user's procedures.
815         * gfortran.h (gfc_build_intrinsic_call): Update prototype.
816         * simplify.c (gfc_simplify_size): Update call.
817         * class.c (finalization_scalarizer, finalization_get_offset,
818         finalizer_insert_packed_call, generate_finalization_wrapper):
819         Clean up by using gfc_build_intrinsic_call.
821 2013-01-07  Tobias Burnus  <burnus@net-b.de>
823         PR fortran/55763
824         * resolve.c (resolve_select_type): Reject intrinsic types for
825         a non-unlimited-polymorphic selector.
827 2013-01-06  Paul Thomas  <pault@gcc.gnu.org>
829         PR fortran/53876
830         PR fortran/54990
831         PR fortran/54992
832         * trans-array.c (build_array_ref): Check the TYPE_CANONICAL
833         to see if it is GFC_CLASS_TYPE_P.
834         * trans-expr.c (gfc_get_vptr_from_expr): The same.
835         (gfc_conv_class_to_class): If the types are not the same,
836         cast parmese->expr to the type of ctree.
837         * trans-types.c (gfc_get_derived_type): GFC_CLASS_TYPE_P of
838         CLASS components must be set.
840 2013-01-06  Mikael Morin  <mikael@gcc.gnu.org>
842         PR fortran/42769
843         PR fortran/45836
844         PR fortran/45900
845         * module.c (read_module): Don't reuse local symtree if the associated
846         symbol isn't exactly the one wanted.  Don't reuse local symtree if it is
847         ambiguous.
848         * resolve.c (resolve_call): Use symtree's name instead of symbol's to
849         lookup the symtree.
851 2013-01-05  Steven G. Kargl  <kargl@gcc.gnu.org>
852             Mikael Morin  <mikael@gcc.gnu.org>
854         PR fortran/55827
855         * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
856         e->symtree == NULL.
857         * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
859 2013-01-05  Tobias Burnus  <burnus@net-b.de>
861         * class.c (finalize_component): Used passed offset expr.
862         (finalization_get_offset): New static function.
863         (finalizer_insert_packed_call, generate_finalization_wrapper): Use it
864         to handle noncontiguous arrays.
866 2013-01-04  Tobias Burnus  <burnus@net-b.de>
868         * trans.c (gfc_build_final_call): New function.
869         * trans.h (gfc_build_final_call, gfc_conv_scalar_to_descriptor):
870         New function prototypes.
871         * trans-expr.c (gfc_conv_scalar_to_descriptor): Renamed from
872         conv_scalar_to_descriptor, removed static attribute.
873         (gfc_conv_procedure_call): Honor renaming.
875 2013-01-04  Tobias Burnus  <burnus@net-b.de>
877         * intrinsic.c (add_functions): New internal intrinsic
878         function GFC_PREFIX ("stride").
879         * gfortran.h (gfc_isym_id): Add GFC_ISYM_STRIDE.
880         * intrinsic.h (gfc_resolve_stride): New prototypes.
881         * iresolve.c (gfc_resolve_stride): New function.
882         * trans-intrinsic.c (conv_intrinsic_stride): New static
883         function.
884         (gfc_conv_intrinsic_function): Use it.
886 2013-01-04  Tobias Burnus  <burnus@net-b.de>
888         * class.c (gfc_find_intrinsic_vtab): Add _final
889         component.
890         * decl.c (gfc_match_null): Remove superfluous
891         variadic argument to gfc_match.
893 2013-01-04  Paul Thomas  <pault@gcc.gnu.org>
895         PR fortran/55172
896         * match.c (copy_ts_from_selector_to_associate): Remove call to
897         gfc_resolve_expr and replace it with explicit setting of the
898         array reference type.
899         * resolve.c (resolve_select_type): It is an error if the
900         selector is coindexed.
902 2013-01-04  Tobias Burnus  <burnus@net-b.de>
904         PR fortran/55763
905         * decl.c (gfc_match_null): Parse and reject MOLD.
907 2013-01-04  Tobias Burnus  <burnus@net-b.de>
909         PR fortran/55854
910         PR fortran/55763
911         * class.c (gfc_class_null_initializer): Fix finding the vtab.
912         (gfc_find_intrinsic_vtab): Use BT_VOID for some components.
914 2013-01-03  Janus Weil  <janus@gcc.gnu.org>
916         PR fortran/55855
917         * expr.c (gfc_check_assign): Use 'gfc_expr_attr' to evaluate attributes
918         of rvalue. Correct hyphenation in error message.
920 2013-01-03  Jakub Jelinek  <jakub@redhat.com>
922         * gfortranspec.c (lang_specific_driver): Update copyright notice
923         dates.
925 Copyright (C) 2013 Free Software Foundation, Inc.
927 Copying and distribution of this file, with or without modification,
928 are permitted in any medium without royalty provided the copyright
929 notice and this notice are preserved.