2013-02-21 Janus Weil <janus@gcc.gnu.org>
[official-gcc.git] / gcc / fortran / ChangeLog
blob8aeded26d169f9f27e6d61f5d827d713b75550bb
1 2013-02-21  Janus Weil  <janus@gcc.gnu.org>
3         PR fortran/56385
4         * trans-array.c (structure_alloc_comps): Handle procedure-pointer
5         components with allocatable result.
7 2012-02-21  Tobias Burnus  <burnus@net-b.de>
9         PR fortran/56416
10         * gfortran.texi (Part II: Language Reference, Extensions,
11         Non-Fortran Main Program): Sort @menu to match actual section order.
12         * intrinsic.texi (Intrinsic Procedures): Ditto.
13         (C_F_POINTER, PRECISION): Move to the alphabetically correct place.
15 2013-02-15  Tobias Burnus  <burnus@net-b.de>
16             Mikael Morin  <mikael@gcc.gnu.org>
18         PR fortran/56318
19         * simplify.c (gfc_simplify_matmul): Fix result shape
20         and matmul result.
22 2013-02-15  Tobias Burnus  <burnus@net-b.de>
24         PR fortran/53818
25         * resolve.c (apply_default_init_local): Don't create an
26         initializer for a result variable.
28 2013-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
30         PR fortran/56224
31         * gfortran.h (gfc_add_include_path):  Add boolean argument
32         for warn.
33         * scanner.c (gfc_add_include_path):  Pass along warn argument
34         to add_path_to_list.
35         * options.c (gfc_post_options):  Add true warn argument to
36         gfc_add_include_path.
37         (gfc_handle_module_path_options):  Likewise.
38         (gfc_handle_option): Also gfc_add_include_path for intrinsic
39         modules, without warning.
41 2013-02-14  Paul Thomas  <pault@gcc.gnu.org>
42             Tobias Burnus  <burnus@net-b.de>
44         PR testsuite/56138
45         * trans-decl.c (gfc_get_symbol_decl): Fix deferred-length
46         results for functions without extra result variable.
48         Revert:
49         2013-01-30  Tobias Burnus  <burnus@net-b.de>
51         PR fortran/56138
52         * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
53         results for functions without extra result variable.
55 2013-02-12  Janus Weil  <janus@gcc.gnu.org>
57         PR fortran/46952
58         * resolve.c (resolve_call): Do not check deferred procedures for
59         recursiveness.
61 2013-02-09  Paul Thomas  <pault@gcc.gnu.org>
63         PR fortran/55362
64         * check.c (array_check): It is an error if a procedure is
65         passed.
67 2013-02-08  Mikael Morin  <mikael@gcc.gnu.org>
69         PR fortran/54107
70         * trans-types.c (gfc_get_function_type): Change a NULL backend_decl
71         to error_mark_node on entry.  Detect recursive types.  Build a variadic
72         procedure type if the type is recursive.  Restore the initial
73         backend_decl.
75 2013-02-07  Tobias Burnus  <burnus@net-b.de>
77         PR fortran/54339
78         * gfortran.texi (Standards): Mention TS29113.
79         (Varying Length Character): Mention deferred-length
80         strings.
81         (Fortran 2003 Status): Add unlimited polymorphic.
82         (TS 29113 Status): Add TYPE(*) and DIMENSION(..).
83         (C Interop): Update the section about TS29113.
85 2013-02-06 Paul Thomas  <pault@gcc.gnu.org>
87         PR fortran/55789
88         * trans-array.c (trans_array_constructor): Remove condition
89         'dynamic' = true if the loop ubound is a VAR_DECL.
91 2013-02-04  Paul Thomas  <pault@gcc.gnu.org>
93         PR fortran/56008
94         PR fortran/47517
95         * trans-array.c (gfc_alloc_allocatable_for_assignment): Save
96         the lhs descriptor before it is modified for reallocation. Use
97         it to deallocate allocatable components in the reallocation
98         block.  Nullify allocatable components for newly (re)allocated
99         arrays.
101 2013-02-04  Mikael Morin  <mikael@gcc.gnu.org>
103         PR fortran/54195
104         * resolve.c (resolve_typebound_procedures): Recurse through
105         resolve_symbol.
107 2013-02-04  Mikael Morin  <mikael@gcc.gnu.org>
109         PR fortran/54107
110         PR fortran/54195
111         * gfortran.h (struct gfc_symbol): New field 'resolved'.
112         * resolve.c (resolve_fl_var_and_proc): Don't skip result symbols.
113         (resolve_symbol): Skip duplicate calls.  Don't check the current
114         namespace.
116 2013-02-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
118         PR fortran/50627
119         PR fortran/56054
120         * decl.c (gfc_match_end):  Remove half-ready namespace
121         from parent if the end of a block is missing.
122         * parse.c (parse_module):  Do not put namespace into
123         gsymbol on error.
125 2013-01-30  Tobias Burnus  <burnus@net-b.de>
127         PR fortran/56138
128         * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
129         results for functions without extra result variable.
131 2013-01-29  Janus Weil  <janus@gcc.gnu.org>
132             Mikael Morin <mikael@gcc.gnu.org>
134         PR fortran/54107
135         * gfortran.h (gfc_component): Delete members 'formal' and 'formal_ns'.
136         (gfc_copy_formal_args,gfc_copy_formal_args_ppc,gfc_expr_replace_symbols,
137         gfc_expr_replace_comp): Delete.
138         (gfc_sym_get_dummy_args): New prototype.
139         * dependency.c (gfc_check_fncall_dependency): Use
140         'gfc_sym_get_dummy_args'.
141         * expr.c (gfc_is_constant_expr): Ditto.
142         (replace_symbol,gfc_expr_replace_symbols,replace_comp,
143         gfc_expr_replace_comp): Deleted.
144         * frontend-passes.c (doloop_code,do_function): Use
145         'gfc_sym_get_dummy_args'.
146         * interface.c (gfc_check_operator_interface,gfc_compare_interfaces,
147         gfc_procedure_use,gfc_ppc_use,gfc_arglist_matches_symbol,
148         gfc_check_typebound_override): Ditto.
149         * module.c (MOD_VERSION): Bump module version.
150         (mio_component): Do not read/write 'formal' and 'formal_ns'.
151         * resolve.c (resolve_procedure_interface,resolve_fl_derived0): Do not
152         copy formal args, but just keep a pointer to the interface.
153         (resolve_function,resolve_call,resolve_typebound_generic_call,
154         resolve_ppc_call,resolve_expr_ppc,generate_component_assignments,
155         resolve_fl_procedure,gfc_resolve_finalizers,check_generic_tbp_ambiguity,
156         resolve_typebound_procedure,check_uop_procedure): Use
157         'gfc_sym_get_dummy_args'.
158         * symbol.c (free_components): Do not free 'formal' and 'formal_ns'.
159         (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Deleted.
160         (gfc_sym_get_dummy_args): New function.
161         * trans-array.c (get_array_charlen,gfc_walk_elemental_function_args):
162         Use 'gfc_sym_get_dummy_args'.
163         * trans-decl.c (build_function_decl,create_function_arglist,
164         build_entry_thunks,init_intent_out_dt,gfc_trans_deferred_vars,
165         add_argument_checking): Ditto.
166         * trans-expr.c (gfc_map_fcn_formal_to_actual,gfc_conv_procedure_call,
167         gfc_conv_statement_function): Ditto.
168         * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
169         * trans-types.c (create_fn_spec,gfc_get_function_type): Ditto.
171 2013-01-28  Tobias Burnus  <burnus@net-b.de>
172             Mikael Morin  <mikael@gcc.gnu.org>
174         PR fortran/53537
175         * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
176         interface block.
177         (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
178         * decl.c (gfc_match_data_decl): Ditto.
179         (variable_decl): Remove undeclared type error.
180         (gfc_match_import): Use renamed instead of original name.
182 2013-01-27 Paul Thomas  <pault@gcc.gnu.org>
184         PR fortran/55984
185         PR fortran/56047
186         * gfortran.h : Add associate_var to symbol_attr.
187         * resolve.c (resolve_assoc_var): Set associate_var attribute.
188         If the target class_ok is set, set it for the associate
189         variable.
190         * check.c (allocatable_check): Associate variables should not
191         have the allocatable attribute even if their symbols do.
192         * class.c (gfc_build_class_symbol): Symbols with associate_var
193         set will always have a good class container.
195 2013-01-23  Janus Weil  <janus@gcc.gnu.org>
197         PR fortran/56081
198         * resolve.c (resolve_select): Add argument 'select_type', reject
199         non-scalar expressions.
200         (resolve_select_type,resolve_code): Pass new argument to
201         'resolve_select'.
203 2013-01-23  Jakub Jelinek  <jakub@redhat.com>
205         PR fortran/56052
206         * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
207         and DECL_IGNORED_P on select_type_temporary and don't set
208         DECL_BY_REFERENCE.
210 2013-01-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
212         PR fortran/55919
213         * scanner.c (add_path_to_list): Copy path to temporary and strip
214         trailing directory separators before calling stat().
216 2013-01-17  Richard Biener  <rguenther@suse.de>
218         * trans-stmt.c (gfc_trans_do): Conditionally compute countm1
219         dependent on sign of step, avoids repeated evaluation of
220         step sign test.  Avoid undefined overflow issues by using unsigned
221         arithmetic.
223 2013-01-16  Janus Weil  <janus@gcc.gnu.org>
225         PR fortran/55983
226         * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
227         asserting it.
229 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
230             Tobias Burnus  <burnus@net-b.de>
232         PR driver/55884
233         * lang.opt (fintrinsic-modules-path): Don't accept Joined.
234         (fintrinsic-modules-path=): New.
235         * options.c (gfc_handle_option, gfc_get_option_string,
236         gfc_get_option_string): Handle the latter.
238 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
240         PR fortran/52865
241         * trans-stmt.c (gfc_trans_do): Put countm1-- before conditional
242         and use value of countm1 before the decrement in the condition.
244 2013-01-15  Paul Thomas  <pault@gcc.gnu.org>
246         PR fortran/54286
247         * expr.c (gfc_check_pointer_assign): Check for presence of
248         's2' before using it.
250 2013-01-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
252         PR fortran/55806
253         * frontend-passes.c (optimize_reduction):  New function,
254         including prototype.
255         (callback_reduction):  Likewise.
256         (gfc_run_passes):  Also run optimize_reduction.
257         (copy_walk_reduction_arg):  New function.
258         (dummy_code_callback):  New function.
260 2013-01-13  Jakub Jelinek  <jakub@redhat.com>
262         PR fortran/55935
263         * trans-expr.c (gfc_conv_structure): Call
264         unshare_expr_without_location on the ctor elements.
266 2013-01-13  Paul Thomas  <pault@gcc.gnu.org>
268         PR fortran/54286
269         * expr.c (gfc_check_pointer_assign): Ensure that both lvalue
270         and rvalue interfaces are presented to gfc_compare_interfaces.
271         Simplify references to interface names by using the symbols
272         themselves. Call gfc_compare_interfaces with s1 and s2 inter-
273         changed to overcome the asymmetry of this function. Do not
274         repeat the check for the presence of s1 and s2.
276 2013-01-12  Janus Weil  <janus@gcc.gnu.org>
278         PR fortran/55072
279         * trans-array.c (gfc_conv_array_parameter): No packing was done for
280         full arrays of derived type.
282 2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
284         PR fortran/55868
285         * class.c (get_unique_type_string): Change $tar to STAR and
286         replace sprintf by strcpy where there is no formatting.
287         * decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
289 2013-01-09  Mikael Morin  <mikael@gcc.gnu.org>
291         PR fortran/47203
292         * module.c (check_for_ambiguous): Get the current program unit using
293         gfc_current_ns.
295 2013-01-09  Tobias Burnus  <burnus@net-b.de>
297         PR fortran/55758
298         * resolve.c (resolve_symbol): Reject non-C_Bool logicals
299         in BIND(C) procedures with -std=f*.
301 2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
303         PR fortran/55618
304         * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
305         character function arguments to elemental procedures in
306         scalarization loops.
308 2013-01-07  Tobias Burnus  <burnus@net-b.de>
310         PR fortran/55763
311         * gfortran.h (gfc_check_assign_symbol): Update prototype.
312         * decl.c (add_init_expr_to_sym, do_parm): Update call.
313         * expr.c (gfc_check_assign_symbol): Handle BT_CLASS and
314         improve error location; support components.
315         (gfc_check_pointer_assign): Handle component assignments.
316         * resolve.c (resolve_fl_derived0): Call gfc_check_assign_symbol.
317         (resolve_values): Update call.
318         (resolve_structure_cons): Avoid double diagnostic.
320 2013-01-07  Tobias Burnus  <burnus@net-b.de>
321             Thomas Koenig  <tkoenig@gcc.gnu.org>
323         PR fortran/55852
324         * expr.c (gfc_build_intrinsic_call): Avoid clashes
325         with user's procedures.
326         * gfortran.h (gfc_build_intrinsic_call): Update prototype.
327         * simplify.c (gfc_simplify_size): Update call.
328         * class.c (finalization_scalarizer, finalization_get_offset,
329         finalizer_insert_packed_call, generate_finalization_wrapper):
330         Clean up by using gfc_build_intrinsic_call.
332 2013-01-07  Tobias Burnus  <burnus@net-b.de>
334         PR fortran/55763
335         * resolve.c (resolve_select_type): Reject intrinsic types for
336         a non-unlimited-polymorphic selector.
338 2013-01-06  Paul Thomas  <pault@gcc.gnu.org>
340         PR fortran/53876
341         PR fortran/54990
342         PR fortran/54992
343         * trans-array.c (build_array_ref): Check the TYPE_CANONICAL
344         to see if it is GFC_CLASS_TYPE_P.
345         * trans-expr.c (gfc_get_vptr_from_expr): The same.
346         (gfc_conv_class_to_class): If the types are not the same,
347         cast parmese->expr to the type of ctree.
348         * trans-types.c (gfc_get_derived_type): GFC_CLASS_TYPE_P of
349         CLASS components must be set.
351 2013-01-06  Mikael Morin  <mikael@gcc.gnu.org>
353         PR fortran/42769
354         PR fortran/45836
355         PR fortran/45900
356         * module.c (read_module): Don't reuse local symtree if the associated
357         symbol isn't exactly the one wanted.  Don't reuse local symtree if it is
358         ambiguous.
359         * resolve.c (resolve_call): Use symtree's name instead of symbol's to
360         lookup the symtree.
362 2013-01-05  Steven G. Kargl  <kargl@gcc.gnu.org>
363             Mikael Morin  <mikael@gcc.gnu.org>
365         PR fortran/55827
366         * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
367         e->symtree == NULL.
368         * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
370 2013-01-05  Tobias Burnus  <burnus@net-b.de>
372         * class.c (finalize_component): Used passed offset expr.
373         (finalization_get_offset): New static function.
374         (finalizer_insert_packed_call, generate_finalization_wrapper): Use it
375         to handle noncontiguous arrays.
377 2013-01-04  Tobias Burnus  <burnus@net-b.de>
379         * trans.c (gfc_build_final_call): New function.
380         * trans.h (gfc_build_final_call, gfc_conv_scalar_to_descriptor):
381         New function prototypes.
382         * trans-expr.c (gfc_conv_scalar_to_descriptor): Renamed from
383         conv_scalar_to_descriptor, removed static attribute.
384         (gfc_conv_procedure_call): Honor renaming.
386 2013-01-04  Tobias Burnus  <burnus@net-b.de>
388         * intrinsic.c (add_functions): New internal intrinsic
389         function GFC_PREFIX ("stride").
390         * gfortran.h (gfc_isym_id): Add GFC_ISYM_STRIDE.
391         * intrinsic.h (gfc_resolve_stride): New prototypes.
392         * iresolve.c (gfc_resolve_stride): New function.
393         * trans-intrinsic.c (conv_intrinsic_stride): New static
394         function.
395         (gfc_conv_intrinsic_function): Use it.
397 2013-01-04  Tobias Burnus  <burnus@net-b.de>
399         * class.c (gfc_find_intrinsic_vtab): Add _final
400         component.
401         * decl.c (gfc_match_null): Remove superfluous
402         variadic argument to gfc_match.
404 2013-01-04  Paul Thomas  <pault@gcc.gnu.org>
406         PR fortran/55172
407         * match.c (copy_ts_from_selector_to_associate): Remove call to
408         gfc_resolve_expr and replace it with explicit setting of the
409         array reference type.
410         * resolve.c (resolve_select_type): It is an error if the
411         selector is coindexed.
413 2013-01-04  Tobias Burnus  <burnus@net-b.de>
415         PR fortran/55763
416         * decl.c (gfc_match_null): Parse and reject MOLD.
418 2013-01-04  Tobias Burnus  <burnus@net-b.de>
420         PR fortran/55854
421         PR fortran/55763
422         * class.c (gfc_class_null_initializer): Fix finding the vtab.
423         (gfc_find_intrinsic_vtab): Use BT_VOID for some components.
425 2013-01-03  Janus Weil  <janus@gcc.gnu.org>
427         PR fortran/55855
428         * expr.c (gfc_check_assign): Use 'gfc_expr_attr' to evaluate attributes
429         of rvalue. Correct hyphenation in error message.
431 2013-01-03  Jakub Jelinek  <jakub@redhat.com>
433         * gfortranspec.c (lang_specific_driver): Update copyright notice
434         dates.
436 Copyright (C) 2013 Free Software Foundation, Inc.
438 Copying and distribution of this file, with or without modification,
439 are permitted in any medium without royalty provided the copyright
440 notice and this notice are preserved.