re PR fortran/54107 ([F03] Memory hog with abstract interface)
[platform/upstream/gcc.git] / gcc / fortran / ChangeLog
1 2013-01-29  Janus Weil  <janus@gcc.gnu.org>
2             Mikael Morin <mikael@gcc.gnu.org>
3
4         PR fortran/54107
5         * gfortran.h (gfc_component): Delete members 'formal' and 'formal_ns'.
6         (gfc_copy_formal_args,gfc_copy_formal_args_ppc,gfc_expr_replace_symbols,
7         gfc_expr_replace_comp): Delete.
8         (gfc_sym_get_dummy_args): New prototype.
9         * dependency.c (gfc_check_fncall_dependency): Use
10         'gfc_sym_get_dummy_args'.
11         * expr.c (gfc_is_constant_expr): Ditto.
12         (replace_symbol,gfc_expr_replace_symbols,replace_comp,
13         gfc_expr_replace_comp): Deleted.
14         * frontend-passes.c (doloop_code,do_function): Use
15         'gfc_sym_get_dummy_args'.
16         * interface.c (gfc_check_operator_interface,gfc_compare_interfaces,
17         gfc_procedure_use,gfc_ppc_use,gfc_arglist_matches_symbol,
18         gfc_check_typebound_override): Ditto.
19         * module.c (MOD_VERSION): Bump module version.
20         (mio_component): Do not read/write 'formal' and 'formal_ns'.
21         * resolve.c (resolve_procedure_interface,resolve_fl_derived0): Do not
22         copy formal args, but just keep a pointer to the interface.
23         (resolve_function,resolve_call,resolve_typebound_generic_call,
24         resolve_ppc_call,resolve_expr_ppc,generate_component_assignments,
25         resolve_fl_procedure,gfc_resolve_finalizers,check_generic_tbp_ambiguity,
26         resolve_typebound_procedure,check_uop_procedure): Use
27         'gfc_sym_get_dummy_args'.
28         * symbol.c (free_components): Do not free 'formal' and 'formal_ns'.
29         (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Deleted.
30         (gfc_sym_get_dummy_args): New function.
31         * trans-array.c (get_array_charlen,gfc_walk_elemental_function_args):
32         Use 'gfc_sym_get_dummy_args'.
33         * trans-decl.c (build_function_decl,create_function_arglist,
34         build_entry_thunks,init_intent_out_dt,gfc_trans_deferred_vars,
35         add_argument_checking): Ditto.
36         * trans-expr.c (gfc_map_fcn_formal_to_actual,gfc_conv_procedure_call,
37         gfc_conv_statement_function): Ditto.
38         * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
39         * trans-types.c (create_fn_spec,gfc_get_function_type): Ditto.
40
41 2013-01-28  Tobias Burnus  <burnus@net-b.de>
42             Mikael Morin  <mikael@gcc.gnu.org>
43
44         PR fortran/53537
45         * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
46         interface block.
47         (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
48         * decl.c (gfc_match_data_decl): Ditto.
49         (variable_decl): Remove undeclared type error.
50         (gfc_match_import): Use renamed instead of original name.
51
52 2013-01-27 Paul Thomas  <pault@gcc.gnu.org>
53
54         PR fortran/55984
55         PR fortran/56047
56         * gfortran.h : Add associate_var to symbol_attr.
57         * resolve.c (resolve_assoc_var): Set associate_var attribute.
58         If the target class_ok is set, set it for the associate
59         variable.
60         * check.c (allocatable_check): Associate variables should not
61         have the allocatable attribute even if their symbols do.
62         * class.c (gfc_build_class_symbol): Symbols with associate_var
63         set will always have a good class container.
64
65 2013-01-23  Janus Weil  <janus@gcc.gnu.org>
66
67         PR fortran/56081
68         * resolve.c (resolve_select): Add argument 'select_type', reject
69         non-scalar expressions.
70         (resolve_select_type,resolve_code): Pass new argument to
71         'resolve_select'.
72
73 2013-01-23  Jakub Jelinek  <jakub@redhat.com>
74
75         PR fortran/56052
76         * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
77         and DECL_IGNORED_P on select_type_temporary and don't set
78         DECL_BY_REFERENCE.
79
80 2013-01-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
81
82         PR fortran/55919
83         * scanner.c (add_path_to_list): Copy path to temporary and strip
84         trailing directory separators before calling stat().
85
86 2013-01-17  Richard Biener  <rguenther@suse.de>
87
88         * trans-stmt.c (gfc_trans_do): Conditionally compute countm1
89         dependent on sign of step, avoids repeated evaluation of
90         step sign test.  Avoid undefined overflow issues by using unsigned
91         arithmetic.
92
93 2013-01-16  Janus Weil  <janus@gcc.gnu.org>
94
95         PR fortran/55983
96         * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
97         asserting it.
98
99 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
100             Tobias Burnus  <burnus@net-b.de>
101
102         PR driver/55884
103         * lang.opt (fintrinsic-modules-path): Don't accept Joined.
104         (fintrinsic-modules-path=): New.
105         * options.c (gfc_handle_option, gfc_get_option_string,
106         gfc_get_option_string): Handle the latter.
107
108 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
109
110         PR fortran/52865
111         * trans-stmt.c (gfc_trans_do): Put countm1-- before conditional
112         and use value of countm1 before the decrement in the condition.
113
114 2013-01-15  Paul Thomas  <pault@gcc.gnu.org>
115
116         PR fortran/54286
117         * expr.c (gfc_check_pointer_assign): Check for presence of
118         's2' before using it.
119
120 2013-01-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
121
122         PR fortran/55806
123         * frontend-passes.c (optimize_reduction):  New function,
124         including prototype.
125         (callback_reduction):  Likewise.
126         (gfc_run_passes):  Also run optimize_reduction.
127         (copy_walk_reduction_arg):  New function.
128         (dummy_code_callback):  New function.
129
130 2013-01-13  Jakub Jelinek  <jakub@redhat.com>
131
132         PR fortran/55935
133         * trans-expr.c (gfc_conv_structure): Call
134         unshare_expr_without_location on the ctor elements.
135
136 2013-01-13  Paul Thomas  <pault@gcc.gnu.org>
137
138         PR fortran/54286
139         * expr.c (gfc_check_pointer_assign): Ensure that both lvalue
140         and rvalue interfaces are presented to gfc_compare_interfaces.
141         Simplify references to interface names by using the symbols
142         themselves. Call gfc_compare_interfaces with s1 and s2 inter-
143         changed to overcome the asymmetry of this function. Do not
144         repeat the check for the presence of s1 and s2.
145
146 2013-01-12  Janus Weil  <janus@gcc.gnu.org>
147
148         PR fortran/55072
149         * trans-array.c (gfc_conv_array_parameter): No packing was done for
150         full arrays of derived type.
151
152 2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
153
154         PR fortran/55868
155         * class.c (get_unique_type_string): Change $tar to STAR and
156         replace sprintf by strcpy where there is no formatting.
157         * decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
158
159 2013-01-09  Mikael Morin  <mikael@gcc.gnu.org>
160
161         PR fortran/47203
162         * module.c (check_for_ambiguous): Get the current program unit using
163         gfc_current_ns.
164
165 2013-01-09  Tobias Burnus  <burnus@net-b.de>
166
167         PR fortran/55758
168         * resolve.c (resolve_symbol): Reject non-C_Bool logicals
169         in BIND(C) procedures with -std=f*.
170
171 2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
172
173         PR fortran/55618
174         * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
175         character function arguments to elemental procedures in
176         scalarization loops.
177
178 2013-01-07  Tobias Burnus  <burnus@net-b.de>
179
180         PR fortran/55763
181         * gfortran.h (gfc_check_assign_symbol): Update prototype.
182         * decl.c (add_init_expr_to_sym, do_parm): Update call.
183         * expr.c (gfc_check_assign_symbol): Handle BT_CLASS and
184         improve error location; support components.
185         (gfc_check_pointer_assign): Handle component assignments.
186         * resolve.c (resolve_fl_derived0): Call gfc_check_assign_symbol.
187         (resolve_values): Update call.
188         (resolve_structure_cons): Avoid double diagnostic.
189
190 2013-01-07  Tobias Burnus  <burnus@net-b.de>
191             Thomas Koenig  <tkoenig@gcc.gnu.org>
192
193         PR fortran/55852
194         * expr.c (gfc_build_intrinsic_call): Avoid clashes
195         with user's procedures.
196         * gfortran.h (gfc_build_intrinsic_call): Update prototype.
197         * simplify.c (gfc_simplify_size): Update call.
198         * class.c (finalization_scalarizer, finalization_get_offset,
199         finalizer_insert_packed_call, generate_finalization_wrapper):
200         Clean up by using gfc_build_intrinsic_call.
201
202 2012-01-07  Tobias Burnus  <burnus@net-b.de>
203
204         PR fortran/55763
205         * resolve.c (resolve_select_type): Reject intrinsic types for
206         a non-unlimited-polymorphic selector.
207
208 2013-01-06  Paul Thomas  <pault@gcc.gnu.org>
209
210         PR fortran/53876
211         PR fortran/54990
212         PR fortran/54992
213         * trans-array.c (build_array_ref): Check the TYPE_CANONICAL
214         to see if it is GFC_CLASS_TYPE_P.
215         * trans-expr.c (gfc_get_vptr_from_expr): The same.
216         (gfc_conv_class_to_class): If the types are not the same,
217         cast parmese->expr to the type of ctree.
218         * trans-types.c (gfc_get_derived_type): GFC_CLASS_TYPE_P of
219         CLASS components must be set.
220
221 2013-01-06  Mikael Morin  <mikael@gcc.gnu.org>
222
223         PR fortran/42769
224         PR fortran/45836
225         PR fortran/45900
226         * module.c (read_module): Don't reuse local symtree if the associated
227         symbol isn't exactly the one wanted.  Don't reuse local symtree if it is
228         ambiguous.
229         * resolve.c (resolve_call): Use symtree's name instead of symbol's to
230         lookup the symtree.
231
232 2013-01-05  Steven G. Kargl  <kargl@gcc.gnu.org>
233             Mikael Morin  <mikael@gcc.gnu.org>
234
235         PR fortran/55827
236         * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
237         e->symtree == NULL.
238         * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
239
240 2013-01-05  Tobias Burnus  <burnus@net-b.de>
241
242         * class.c (finalize_component): Used passed offset expr.
243         (finalization_get_offset): New static function.
244         (finalizer_insert_packed_call, generate_finalization_wrapper): Use it
245         to handle noncontiguous arrays.
246
247 2013-01-04  Tobias Burnus  <burnus@net-b.de>
248
249         * trans.c (gfc_build_final_call): New function.
250         * trans.h (gfc_build_final_call, gfc_conv_scalar_to_descriptor):
251         New function prototypes.
252         * trans-expr.c (gfc_conv_scalar_to_descriptor): Renamed from
253         conv_scalar_to_descriptor, removed static attribute.
254         (gfc_conv_procedure_call): Honor renaming.
255
256 2013-01-04  Tobias Burnus  <burnus@net-b.de>
257
258         * intrinsic.c (add_functions): New internal intrinsic
259         function GFC_PREFIX ("stride").
260         * gfortran.h (gfc_isym_id): Add GFC_ISYM_STRIDE.
261         * intrinsic.h (gfc_resolve_stride): New prototypes.
262         * iresolve.c (gfc_resolve_stride): New function.
263         * trans-intrinsic.c (conv_intrinsic_stride): New static
264         function.
265         (gfc_conv_intrinsic_function): Use it.
266
267 2013-01-04  Tobias Burnus  <burnus@net-b.de>
268
269         * class.c (gfc_find_intrinsic_vtab): Add _final
270         component.
271         * decl.c (gfc_match_null): Remove superfluous
272         variadic argument to gfc_match.
273
274 2013-01-04  Paul Thomas  <pault@gcc.gnu.org>
275
276         PR fortran/55172
277         * match.c (copy_ts_from_selector_to_associate): Remove call to
278         gfc_resolve_expr and replace it with explicit setting of the
279         array reference type.
280         * resolve.c (resolve_select_type): It is an error if the
281         selector is coindexed.
282
283 2013-01-04  Tobias Burnus  <burnus@net-b.de>
284
285         PR fortran/55763
286         * decl.c (gfc_match_null): Parse and reject MOLD.
287
288 2013-01-04  Tobias Burnus  <burnus@net-b.de>
289
290         PR fortran/55854
291         PR fortran/55763
292         * class.c (gfc_class_null_initializer): Fix finding the vtab.
293         (gfc_find_intrinsic_vtab): Use BT_VOID for some components.
294
295 2013-01-03  Janus Weil  <janus@gcc.gnu.org>
296
297         PR fortran/55855
298         * expr.c (gfc_check_assign): Use 'gfc_expr_attr' to evaluate attributes
299         of rvalue. Correct hyphenation in error message.
300
301 2013-01-03  Jakub Jelinek  <jakub@redhat.com>
302
303         * gfortranspec.c (lang_specific_driver): Update copyright notice
304         dates.
305 \f
306 Copyright (C) 2013 Free Software Foundation, Inc.
307
308 Copying and distribution of this file, with or without modification,
309 are permitted in any medium without royalty provided the copyright
310 notice and this notice are preserved.