Merged revisions 209304,209307,209332,209338-209339,209343,209346,209351,209354,20936...
[official-gcc.git] / gcc-4_9 / gcc / fortran / ChangeLog
blob42f0321c5e8924f1badb4aa064dc2387b07fcd01
1 2014-04-22  Tobias Burnus  <burnus@net-b.de>
3         Backport from mainline
4         2014-04-11  Tobias Burnus  <burnus@net-b.de>
6         PR fortran/58880
7         PR fortran/60495
8         * resolve.c (gfc_resolve_finalizers): Ensure that vtables
9         and finalization wrappers are generated.
11 2014-04-22  Release Manager
13         * GCC 4.9.0 released.
15 2014-04-13  Paul Thomas  <pault@gcc.gnu.org>
17         PR fortran/58085
18         PR fortran/60717
19         * trans.h: Add 'use_offset' bitfield to gfc_se.
20         * trans-array.c (gfc_conv_expr_descriptor): Use 'use_offset'
21         as a trigger to unconditionally recalculate the offset for
22         array slices and constant arrays.
23         trans-expr.c (gfc_conv_intrinsic_to_class): Use it.
24         trans-stmt.c (trans_associate_var): Ditto.
25         (gfc_conv_procedure_call): Ditto.
27 2014-04-11  Janne Blomqvist  <jb@gcc.gnu.org>
29         * intrinsic.texi (RANDOM_SEED): Improve example.
31 2014-04-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
33         * class.c (gfc_build_class_symbol): Append "_t" to target class
34         names to make the generated type names unique.
36 2014-04-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
38         PR fortran/60191
39         * trans-types.c (gfc_get_function_type): In case of recursion
40         build a variadic function type with empty argument list instead of a
41         stdarg-like function type with incomplete argument list.
43 2014-04-04  Tobias Burnus  <burnus@net-b.de>
45         * check.c (gfc_check_cmplx): Fix typo.
47 2014-03-28  Mikael Morin  <mikael@gcc.gnu.org>
48             Tobias Burnus  <burnus@net-b.de>
50         PR fortran/60576
51         * trans-expr.c (gfc_conv_derived_to_class): Avoid
52         generation of out-of-bounds range expr.
54 2014-03-28  Mikael Morin  <mikael@gcc.gnu.org>
56         PR fortran/60677
57         * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Enlarge argument
58         list buffer.
60 2014-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
62         PR fortran/60522
63         * frontend-passes.c (cfe_code):  Do not walk subtrees
64         for WHERE.
66 2014-03-27  Tobias Burnus  <burnus@net-b.de>
68         PR fortran/58880
69         * trans-expr.c (gfc_conv_scalar_to_descriptor): Fix handling
70         of nonpointers.
72 2014-03-26 Dominique d'Humieres <dominiq@lps.ens.fr>
74         PR fortran/34928
75         * fortran.texi: Document Volatile COMMON as not supported.
77 2014-03-22  Jakub Jelinek  <jakub@redhat.com>
79         PR debug/60603
80         * cpp.c (gfc_cpp_init): Restore cb_change_file call to
81         <built-in>.
83 2014-03-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
85         PR fortran/60148
86         * gfortran.texi: Add description of namelist DELIM= behavior.
88 2014-03-19  Tobias Burnus  <burnus@net-b.>
90         PR fortran/60543
91         * io.c (check_io_constraints): Use gfc_unset_implicit_pure.
92         * resolve.c (resolve_ordinary_assign): Ditto.
94 2014-03-19  Tobias Burnus  <burnus@net-b.de>
96         PR fortran/60543
97         PR fortran/60283
98         * gfortran.h (gfc_unset_implicit_pure): New prototype.
99         * resolve.c (gfc_unset_implicit_pure): New.
100         (resolve_structure_cons, resolve_function,
101         pure_subroutine): Use it.
102         * decl.c (match_old_style_init, gfc_match_data,
103         match_pointer_init, variable_decl): Ditto.
104         * expr.c (gfc_check_pointer_assign): Ditto.
105         * intrinsic.c (gfc_intrinsic_sub_interface): Ditto.
106         * io.c (match_vtag, gfc_match_open, gfc_match_close,
107         match_filepos, gfc_match_inquire, gfc_match_print,
108         gfc_match_wait): Ditto.
109         * match.c (gfc_match_critical, gfc_match_stopcode,
110         lock_unlock_statement, sync_statement, gfc_match_allocate,
111         gfc_match_deallocate): Ditto.
112         * parse.c (decode_omp_directive): Ditto.
113         * symbol.c (gfc_add_save): Ditto.
115 2014-03-18  Janus Weil  <janus@gcc.gnu.org>
117         PR fortran/55207
118         PR fortran/60549
119         * decl.c (match_attr_spec): Revert r208590.
121 2014-03-18  Jakub Jelinek  <jakub@redhat.com>
123         PR ipa/58721
124         * trans.c (gfc_unlikely, gfc_likely): Don't add __builtin_expect
125         if !optimize.
127 2014-03-18  Tobias Burnus  <burnus@net-b.de>
129         PR ipa/58721
130         * trans.h (gfc_unlikely, gfc_likely): Add predictor as argument.
131         (gfc_trans_io_runtime_check): Remove.
132         * trans-io.c (gfc_trans_io_runtime_check): Make static; add has_iostat
133         as argument, add predictor to block.
134         (set_parameter_value, gfc_trans_open, gfc_trans_close, build_filepos,
135         gfc_trans_inquire, gfc_trans_wait, build_dt): Update calls.
136         * trans.c (gfc_unlikely, gfc_likely): Add predictor as argument.
137         (gfc_trans_runtime_check, gfc_allocate_using_malloc,
138         gfc_allocate_allocatable, gfc_deallocate_with_status): Set explicitly
139         branch predictor.
140         * trans-expr.c (gfc_conv_procedure_call): Ditto.
141         * trans-stmt.c (gfc_trans_allocate): Ditto.
142         * trans-array.c (gfc_array_init_size, gfc_array_allocate): Ditto.
144 2014-03-15  Janus Weil  <janus@gcc.gnu.org>
146         PR fortran/55207
147         * decl.c (match_attr_spec): Variables in the main program implicitly
148         get the SAVE attribute in Fortran 2008.
150 2014-03-14  Mikael Morin  <mikael@gcc.gnu.org>
152         PR fortran/60392
153         * trans-array.c (gfc_conv_array_parameter): Don't reuse the descriptor
154         if it has transposed dimensions.
156 2014-03-08  Tobias Burnus  <burnus@net-b.de>
158         PR fortran/60447
159         * f95-lang.c (gfc_init): Return false when only
160         preprocessing.
161         * options.c (gfc_post_options): Ditto.
163 2014-03-08  Tobias Burnus  <burnus@net-b.de>
165         * gfortran.texi (Fortran 2003 Status): Mention finalization,
166         deferred-length character support and input rounding.
167         (Fortran 2008 Status): Mention that at termination
168         signalling exceptions are shown.
170 2014-03-06  Paul Thomas  <pault@gcc.gnu.org>
171             Janus Weil  <janus@gcc.gnu.org>
173         PR fortran/51976
174         * gfortran.h (symbol_attribute): Add deferred_parameter attribute.
175         * primary.c (build_actual_constructor): It is not an error if
176         a missing component has the deferred_parameter attribute;
177         equally, if one is given a value, it is an error.
178         * resolve.c (resolve_fl_derived0): Remove error for deferred
179         character length components.  Add the hidden string length
180         field to the structure. Give it the deferred_parameter
181         attribute.
182         * trans-array.c (duplicate_allocatable): Add a strlen field
183         which is used as the element size if it is non-null.
184         (gfc_duplicate_allocatable, gfc_copy_allocatable_data): Pass a
185         NULL to the new argument in duplicate_allocatable.
186         (structure_alloc_comps): Set the hidden string length as
187         appropriate. Use it in calls to duplicate_allocatable.
188         (gfc_alloc_allocatable_for_assignment): When a deferred length
189         backend declaration is variable, use that; otherwise use the
190         string length from the expression evaluation.
191         * trans-expr.c (gfc_conv_component_ref): If this is a deferred
192         character length component, the string length should have the
193         value of the hidden string length field.
194         (gfc_trans_subcomponent_assign): Set the hidden string length
195         field for deferred character length components.  Allocate the
196         necessary memory for the string.
197         (alloc_scalar_allocatable_for_assignment): Same change as in
198         gfc_alloc_allocatable_for_assignment above.
199         * trans-stmt.c (gfc_trans_allocate): Likewise.
200         * trans-intrinsic (size_of_string_in_bytes): Make non-static.
201         * trans-types.c (gfc_get_derived_type): Set the tree type for
202         a deferred character length component.
203         * trans.c (gfc_deferred_strlen): New function.
204         * trans.h (size_of_string_in_bytes,gfc_deferred_strlen): New prototypes.
206 2014-03-01  Mikael Morin  <mikael@gcc.gnu.org>
208         PR fortran/60341
209         * frontend-passes.c (optimize_comparison): Guard two union accesses
210         with the corresponding tag checks.
212 2014-02-28  Janus Weil  <janus@gcc.gnu.org>
214         PR fortran/60359
215         * class.c (find_intrinsic_vtab): Prevent duplicate creation of copy
216         procedure for characters.
218 2014-02-21  Janus Weil  <janus@gcc.gnu.org>
220         PR fortran/60302
221         * check.c (gfc_check_c_f_pointer): Only clear 'size' if 'gfc_array_size'
222         is successful.
224 2014-02-21  Janus Weil  <janus@gcc.gnu.org>
226         PR fortran/60234
227         * gfortran.h (gfc_build_class_symbol): Removed argument.
228         * class.c (gfc_add_component_ref): Fix up missing vtype if necessary.
229         (gfc_build_class_symbol): Remove argument 'delayed_vtab'. vtab is always
230         delayed now, except for unlimited polymorphics.
231         (comp_is_finalizable): Procedure pointer components are not finalizable.
232         * decl. (build_sym, build_struct, attr_decl1): Removed argument of
233         'gfc_build_class_symbol'.
234         * match.c (copy_ts_from_selector_to_associate, select_type_set_tmp):
235         Ditto.
236         * symbol.c (gfc_set_default_type): Ditto.
238 2014-02-19  Janus Weil  <janus@gcc.gnu.org>
240         PR fortran/60232
241         * expr.c (gfc_get_variable_expr): Don't add REF_ARRAY for dimensionful
242         functions, which are used as procedure pointer target.
244 2014-02-18  Tobias Burnus  <burnus@net-b.de>
246         PR fortran/49397
247         * expr.c (gfc_check_pointer_assign): Add check for
248         F2008Cor2, C729.
249         * trans-decl.c (gfc_get_symbol_decl): Correctly generate external
250         decl in a corner case.
252 2014-02-18  Janus Weil  <janus@gcc.gnu.org>
254         PR fortran/60231
255         * resolve.c (check_generic_tbp_ambiguity): Check for presence of dummy
256         arguments to prevent ICE.
258 2014-02-17  Janus Weil  <janus@gcc.gnu.org>
260         PR fortran/55907
261         * resolve.c (build_default_init_expr): Don't initialize character
262         variable if -fno-automatic is given.
264 2014-02-15  Mikael Morin  <mikael@gcc.gnu.org>
266         PR fortran/59599
267         * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Calculate the
268         number of arguments.
270 2014-02-11  Jakub Jelinek  <jakub@redhat.com>
272         PR fortran/52370
273         * trans-decl.c (gfc_build_dummy_array_decl): Set TREE_NO_WARNING
274         on decl if sym->attr.optional.
276 2014-02-09  Paul Thomas  <pault@gcc.gnu.org>
278         PR fortran/57522
279         * resolve.c (resolve_assoc_var): Set the subref_array_pointer
280         attribute for the 'associate-name' if necessary.
281         * trans-stmt.c (trans_associate_var): If the 'associate-name'
282         is a subref_array_pointer, assign the element size of the
283         associate variable to 'span'.
285 2014-02-09  Paul Thomas  <pault@gcc.gnu.org>
287         PR fortran/59026
288         * trans-expr.c (gfc_conv_procedure_call): Pass the value of the
289         actual argument to a formal argument with the value attribute
290         in an elemental procedure.
292 2014-02-08  Janus Weil  <janus@gcc.gnu.org>
293             Mikael Morin <mikael.morin@gcc.gnu.org>
295         PR fortran/58470
296         * class.c (generate_finalization_wrapper): Assert that proc_tree has
297         been set in gfc_resolve_finalizers.
298         * resolve.c (resolve_fl_derived0): Remove unnecessary call to
299         gfc_is_finalizable.
301 2014-02-07  Benno Schulenberg  <bensberg@justemail.net>
303         PR translation/52289
304         * fortran/resolve.c (resolve_ordinary_assign): Fix typoed word
305         in an error message.
307 2014-02-02  Mikael Morin  <mikael@gcc.gnu.org>
309         PR fortran/57033
310         * primary.c (gfc_convert_to_structure_constructor): Avoid null pointer
311         dereference.
313 2014-02-01  Paul Thomas  <pault@gcc.gnu.org>
315         PR fortran/59906
316         * trans-stmt.c (gfc_add_loop_ss_code): In the case of character
317         SS_REFERENCE, use gfc_conv_string_parameter to ensure that a
318         pointer to the string is stored.
319         * trans-expr.c (gfc_conv_expr_reference): Likewise, use
320         gfc_conv_string_parameter to ensure that a pointer to is passed
321         to the elemental function.
323 2014-01-28  Paul Thomas  <pault@gcc.gnu.org>
325         PR fortran/59414
326         * trans-stmt.c (gfc_trans_allocate): Before the pointer
327         assignment to transfer the source _vptr to a class allocate
328         expression, the final class reference should be exposed. The
329         tail that includes the _data and array references is stored.
330         This reduced expression is transferred to 'lhs' and the _vptr
331         added. Then the tail is restored to the allocate expression.
333 2014-01-26  Mikael Morin  <mikael@gcc.gnu.org>
335         PR fortran/58007
336         * module.c (read_module): Assert for component name correctness.
338 2014-01-18  Mikael Morin  <mikael@gcc.gnu.org>
340         PR fortran/58007
341         * module.c (MOD_VERSION): Bump.
342         (fp2, find_pointer2): Remove.
343         (mio_component_ref): Don't forcedfully set the containing derived type
344         symbol for loading.  Remove unused argument.
345         (mio_ref): Update caller
346         (mio_symbol): Dump component list earlier.
347         (skip_list): New argument nest_level.  Initialize level with the new
348         argument.
349         (read_module): Add forced pointer components association for derived
350         type symbols.
352 2014-01-12  Janus Weil  <janus@gcc.gnu.org>
354         PR fortran/58026
355         * decl.c (gfc_match_data_decl): Improve error recovery.
357 2014-01-09  Tobias Burnus  <burnus@net-b.de>
359         * cpp.c (gfc_cpp_handle_option): Add missing break.
360         * trans-io.c (transfer_expr): Silence unused value warning.
362 2014-01-08  Janus Weil  <janus@gcc.gnu.org>
364         PR fortran/58182
365         * resolve.c (gfc_verify_binding_labels): Modify order of checks.
367 2014-01-06  Janus Weil  <janus@gcc.gnu.org>
369         PR fortran/59589
370         * class.c (comp_is_finalizable): New function to dermine if a given
371         component is finalizable.
372         (finalize_component, generate_finalization_wrapper): Use it.
374 2014-01-06  Janus Weil  <janus@gcc.gnu.org>
376         PR fortran/59023
377         PR fortran/59662
378         * resolve.c (resolve_global_procedure): Don't apply to c-binding
379         procedures.
380         (gfc_verify_binding_labels): Remove duplicate line.
382 2014-01-04  Janus Weil  <janus@gcc.gnu.org>
384         PR fortran/59547
385         * class.c (add_proc_comp): Copy pure attribute.
387 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
389         Update copyright years
391 2014-01-02  Tobias Burnus  <burnus@net-b.de>
393         * gfortranspec.c (lang_specific_driver): Update copyright notice
394         dates.
395         * gfc-internals.texi: Bump @copying's copyright year.
396         * gfortran.texi: Ditto.
397         * intrinsic.texi: Ditto.
398         * invoke.texi: Ditto.
400 2014-01-02  Janus Weil  <janus@gcc.gnu.org>
402         PR fortran/59654
403         * resolve.c (resolve_typebound_procedures): No need to create the vtab
404         here.
406 Copyright (C) 2014 Free Software Foundation, Inc.
408 Copying and distribution of this file, with or without modification,
409 are permitted in any medium without royalty provided the copyright
410 notice and this notice are preserved.