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