trans-stmt.c (gfc_trans_do): Conditionally compute countm1 dependent on sign of step...
[platform/upstream/gcc.git] / gcc / fortran / ChangeLog
1 2013-01-17  Richard Biener  <rguenther@suse.de>
2
3         * trans-stmt.c (gfc_trans_do): Conditionally compute countm1
4         dependent on sign of step, avoids repeated evaluation of
5         step sign test.  Avoid undefined overflow issues by using unsigned
6         arithmetic.
7
8 2013-01-16  Janus Weil  <janus@gcc.gnu.org>
9
10         PR fortran/55983
11         * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
12         asserting it.
13
14 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
15             Tobias Burnus  <burnus@net-b.de>
16
17         PR driver/55884
18         * lang.opt (fintrinsic-modules-path): Don't accept Joined.
19         (fintrinsic-modules-path=): New.
20         * options.c (gfc_handle_option, gfc_get_option_string,
21         gfc_get_option_string): Handle the latter.
22
23 2013-01-16  Jakub Jelinek  <jakub@redhat.com>
24
25         PR fortran/52865
26         * trans-stmt.c (gfc_trans_do): Put countm1-- before conditional
27         and use value of countm1 before the decrement in the condition.
28
29 2013-01-15  Paul Thomas  <pault@gcc.gnu.org>
30
31         PR fortran/54286
32         * expr.c (gfc_check_pointer_assign): Check for presence of
33         's2' before using it.
34
35 2013-01-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
36
37         PR fortran/55806
38         * frontend-passes.c (optimize_reduction):  New function,
39         including prototype.
40         (callback_reduction):  Likewise.
41         (gfc_run_passes):  Also run optimize_reduction.
42         (copy_walk_reduction_arg):  New function.
43         (dummy_code_callback):  New function.
44
45 2013-01-13  Jakub Jelinek  <jakub@redhat.com>
46
47         PR fortran/55935
48         * trans-expr.c (gfc_conv_structure): Call
49         unshare_expr_without_location on the ctor elements.
50
51 2013-01-13  Paul Thomas  <pault@gcc.gnu.org>
52
53         PR fortran/54286
54         * expr.c (gfc_check_pointer_assign): Ensure that both lvalue
55         and rvalue interfaces are presented to gfc_compare_interfaces.
56         Simplify references to interface names by using the symbols
57         themselves. Call gfc_compare_interfaces with s1 and s2 inter-
58         changed to overcome the asymmetry of this function. Do not
59         repeat the check for the presence of s1 and s2.
60
61 2013-01-12  Janus Weil  <janus@gcc.gnu.org>
62
63         PR fortran/55072
64         * trans-array.c (gfc_conv_array_parameter): No packing was done for
65         full arrays of derived type.
66
67 2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
68
69         PR fortran/55868
70         * class.c (get_unique_type_string): Change $tar to STAR and
71         replace sprintf by strcpy where there is no formatting.
72         * decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
73
74 2013-01-09  Mikael Morin  <mikael@gcc.gnu.org>
75
76         PR fortran/47203
77         * module.c (check_for_ambiguous): Get the current program unit using
78         gfc_current_ns.
79
80 2013-01-09  Tobias Burnus  <burnus@net-b.de>
81
82         PR fortran/55758
83         * resolve.c (resolve_symbol): Reject non-C_Bool logicals
84         in BIND(C) procedures with -std=f*.
85
86 2013-01-08  Paul Thomas  <pault@gcc.gnu.org>
87
88         PR fortran/55618
89         * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
90         character function arguments to elemental procedures in
91         scalarization loops.
92
93 2013-01-07  Tobias Burnus  <burnus@net-b.de>
94
95         PR fortran/55763
96         * gfortran.h (gfc_check_assign_symbol): Update prototype.
97         * decl.c (add_init_expr_to_sym, do_parm): Update call.
98         * expr.c (gfc_check_assign_symbol): Handle BT_CLASS and
99         improve error location; support components.
100         (gfc_check_pointer_assign): Handle component assignments.
101         * resolve.c (resolve_fl_derived0): Call gfc_check_assign_symbol.
102         (resolve_values): Update call.
103         (resolve_structure_cons): Avoid double diagnostic.
104
105 2013-01-07  Tobias Burnus  <burnus@net-b.de>
106             Thomas Koenig  <tkoenig@gcc.gnu.org>
107
108         PR fortran/55852
109         * expr.c (gfc_build_intrinsic_call): Avoid clashes
110         with user's procedures.
111         * gfortran.h (gfc_build_intrinsic_call): Update prototype.
112         * simplify.c (gfc_simplify_size): Update call.
113         * class.c (finalization_scalarizer, finalization_get_offset,
114         finalizer_insert_packed_call, generate_finalization_wrapper):
115         Clean up by using gfc_build_intrinsic_call.
116
117 2012-01-07  Tobias Burnus  <burnus@net-b.de>
118
119         PR fortran/55763
120         * resolve.c (resolve_select_type): Reject intrinsic types for
121         a non-unlimited-polymorphic selector.
122
123 2013-01-06  Paul Thomas  <pault@gcc.gnu.org>
124
125         PR fortran/53876
126         PR fortran/54990
127         PR fortran/54992
128         * trans-array.c (build_array_ref): Check the TYPE_CANONICAL
129         to see if it is GFC_CLASS_TYPE_P.
130         * trans-expr.c (gfc_get_vptr_from_expr): The same.
131         (gfc_conv_class_to_class): If the types are not the same,
132         cast parmese->expr to the type of ctree.
133         * trans-types.c (gfc_get_derived_type): GFC_CLASS_TYPE_P of
134         CLASS components must be set.
135
136 2013-01-06  Mikael Morin  <mikael@gcc.gnu.org>
137
138         PR fortran/42769
139         PR fortran/45836
140         PR fortran/45900
141         * module.c (read_module): Don't reuse local symtree if the associated
142         symbol isn't exactly the one wanted.  Don't reuse local symtree if it is
143         ambiguous.
144         * resolve.c (resolve_call): Use symtree's name instead of symbol's to
145         lookup the symtree.
146
147 2013-01-05  Steven G. Kargl  <kargl@gcc.gnu.org>
148             Mikael Morin  <mikael@gcc.gnu.org>
149
150         PR fortran/55827
151         * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
152         e->symtree == NULL.
153         * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
154
155 2013-01-05  Tobias Burnus  <burnus@net-b.de>
156
157         * class.c (finalize_component): Used passed offset expr.
158         (finalization_get_offset): New static function.
159         (finalizer_insert_packed_call, generate_finalization_wrapper): Use it
160         to handle noncontiguous arrays.
161
162 2013-01-04  Tobias Burnus  <burnus@net-b.de>
163
164         * trans.c (gfc_build_final_call): New function.
165         * trans.h (gfc_build_final_call, gfc_conv_scalar_to_descriptor):
166         New function prototypes.
167         * trans-expr.c (gfc_conv_scalar_to_descriptor): Renamed from
168         conv_scalar_to_descriptor, removed static attribute.
169         (gfc_conv_procedure_call): Honor renaming.
170
171 2013-01-04  Tobias Burnus  <burnus@net-b.de>
172
173         * intrinsic.c (add_functions): New internal intrinsic
174         function GFC_PREFIX ("stride").
175         * gfortran.h (gfc_isym_id): Add GFC_ISYM_STRIDE.
176         * intrinsic.h (gfc_resolve_stride): New prototypes.
177         * iresolve.c (gfc_resolve_stride): New function.
178         * trans-intrinsic.c (conv_intrinsic_stride): New static
179         function.
180         (gfc_conv_intrinsic_function): Use it.
181
182 2013-01-04  Tobias Burnus  <burnus@net-b.de>
183
184         * class.c (gfc_find_intrinsic_vtab): Add _final
185         component.
186         * decl.c (gfc_match_null): Remove superfluous
187         variadic argument to gfc_match.
188
189 2013-01-04  Paul Thomas  <pault@gcc.gnu.org>
190
191         PR fortran/55172
192         * match.c (copy_ts_from_selector_to_associate): Remove call to
193         gfc_resolve_expr and replace it with explicit setting of the
194         array reference type.
195         * resolve.c (resolve_select_type): It is an error if the
196         selector is coindexed.
197
198 2013-01-04  Tobias Burnus  <burnus@net-b.de>
199
200         PR fortran/55763
201         * decl.c (gfc_match_null): Parse and reject MOLD.
202
203 2013-01-04  Tobias Burnus  <burnus@net-b.de>
204
205         PR fortran/55854
206         PR fortran/55763
207         * class.c (gfc_class_null_initializer): Fix finding the vtab.
208         (gfc_find_intrinsic_vtab): Use BT_VOID for some components.
209
210 2013-01-03  Janus Weil  <janus@gcc.gnu.org>
211
212         PR fortran/55855
213         * expr.c (gfc_check_assign): Use 'gfc_expr_attr' to evaluate attributes
214         of rvalue. Correct hyphenation in error message.
215
216 2013-01-03  Jakub Jelinek  <jakub@redhat.com>
217
218         * gfortranspec.c (lang_specific_driver): Update copyright notice
219         dates.
220 \f
221 Copyright (C) 2013 Free Software Foundation, Inc.
222
223 Copying and distribution of this file, with or without modification,
224 are permitted in any medium without royalty provided the copyright
225 notice and this notice are preserved.