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