2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / fortran / ChangeLog
blob78d40afea290d8446b5f2278fb9126c04a545aa8
1 2017-02-20  Paul Thomas  <pault@gcc.gnu.org>
3         PR fortran/79434
4         * parse.c (check_component, parse_union): Whitespace.
5         (set_syms_host_assoc): For a derived type, check if the module
6         in which it was declared is one of the submodule ancestors. If
7         it is, make the components public. Otherwise, reset attribute
8         'host_assoc' and set 'use-assoc' so that encapsulation is
9         preserved.
11 2017-02-19  Paul Thomas  <pault@gcc.gnu.org>
13         PR fortran/79447
14         * decl.c (gfc_set_constant_character_len): Whitespace.
15         (gfc_match_end): Catch case where a procedure is contained in
16         a module procedure and ensure that 'end procedure' is the
17         correct termination.
19 2017-02-19  Paul Thomas  <pault@gcc.gnu.org>
21         PR fortran/79402
22         * resolve.c (fixup_unique_dummy): New function.
23         (gfc_resolve_expr): Call it for dummy variables with a unique
24         symtree name.
26 2017-02-19  Andre Vehreschild  <vehre@gcc.gnu.org>
28         PR fortran/79229
29         * trans-expr.c (gfc_trans_assignment_1): Deref indirect refs when
30         compiling with -fcheck=mem to check the pointer and not the data.
32 2017-02-19  Andre Vehreschild  <vehre@gcc.gnu.org>
34         PR fortran/79335
35         * trans-array.c (duplicate_allocatable_coarray): Ensure attributes
36         passed are properly initialized.
37         (structure_alloc_comps): Same.
38         * trans-expr.c (gfc_trans_structure_assign): Same.
40 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
42         * trans-expr.c (gfc_conv_substring): Add missing space in diagnostics.
44 2017-02-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
46         PR fortran/65542
47         * intrinsic.c (gfc_intrinsic_func_interface):  Return an error
48         for -std=f95 for disallowed transformational functions in
49         initialization expressions.
51 2017-02-09  Cesar Philippidis  <cesar@codesourcery.com>
52             Joseph Myers  <joseph@codesourcery.com>
54         * openmp.c (resolve_omp_clauses): Error on directives
55         containing both tile and collapse clauses.
56         (resolve_oacc_loop_blocks): Represent '*' tile arguments as zero.
57         * trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
58         collapsed loops.
60 2017-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
62         * trans-types.c (gfc_get_int_kind_from_width_isofortranen):  Choose
63         REAL type with the widest precision if two (or more) have the same
64         storage size.
66 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
68         PR fortran/79344
69         * trans-stmt.c (gfc_trans_allocate): Only deallocate the components of
70         the temporary, when a new object was created for the temporary.  Not
71         when it is just an alias to an existing object.
73 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
75         PR fortran/79335
76         * trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
77         attributes before using them.
79 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
81         PR fortran/78958
82         * trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len
83         component of unlimited polymorphic objects when source-allocating.
85 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
87         PR fortran/79230
88         * trans-array.c (structure_alloc_comps): Ignore pointer components when
89         freeing structures.
91 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
93         PR lto/79061
94         * f95-lang.c (gfc_create_decls): Include stringpool.h.
95         Pass main_input_filename to build_translation_unit_decl.
97 2017-01-23  Thomas Koenig  <tkoenig@netcologne.de>
99         * arith.c (arith_power):  If simplifying integer power expression
100         to zero, warn if -Winteger-division is given.
102 2017-01-22  Jakub Jelinek  <jakub@redhat.com>
104         PR fortran/79154
105         * parse.c (matchs, matcho, matchds, matchdo): Replace return st;
106         with { ret = st; goto finish; }.
107         (decode_omp_directive): Allow declare simd, declare target and
108         simd directives in PURE/ELEMENTAL procedures.  Only call
109         gfc_unset_implicit_pure on successful match of other procedures.
111 2017-01-21  Gerald Pfeifer  <gerald@pfeifer.com>
113         * gfc-internals.texi (Symbol Versioning): Change references
114         to www.akkadia.org to https.
116 2017-01-21  Jakub Jelinek  <jakub@redhat.com>
118         * gfortran.h (gfc_extract_int): Change return type to bool.  Add
119         int argument with = 0.
120         * decl.c (gfc_match_kind_spec): Adjust gfc_extract_int caller, pass
121         1 as new last argument to it, don't emit gfc_error.
122         (match_char_kind): Likewise.
123         (gfc_match_decl_type_spec): Use gfc_get_string ("%s", x) instead of
124         gfc_get_string (x).
125         (gfc_match_derived_decl, match_binding_attributes): Likewise.
126         (gfc_match_structure_decl): Don't sprintf back to name, call
127         get_struct_decl directly with gfc_dt_upper_string (name) result.
128         * trans-stmt.c (gfc_trans_allocate): Use gfc_get_string ("%s", x)
129         instead of gfc_get_string (x).
130         * module.c (gfc_dt_lower_string, gfc_dt_upper_string,
131         gfc_match_use, gfc_match_submodule, find_true_name, mio_pool_string,
132         mio_symtree_ref, mio_expr, mio_omp_udr_expr, load_generic_interfaces,
133         load_omp_udrs, load_needed, read_module, dump_module,
134         create_intrinsic_function, import_iso_c_binding_module,
135         create_int_parameter, create_int_parameter_array, create_derived_type,
136         use_iso_fortran_env_module): Likewise.
137         * error.c (gfc_diagnostic_starter, gfc_diagnostic_start_span): Use
138         pp_verbatim (context->printer, "%s", x) instead of
139         pp_verbatim (context->printer, x).
140         * match.c (gfc_match_small_int): Adjust gfc_extract_int caller, pass
141         1 as new last argument to it, don't emit gfc_error.
142         (gfc_match_small_int_expr): Likewise.
143         * iresolve.c (gfc_get_string): Optimize format "%s" case.
144         (resolve_bound): Use gfc_get_string ("%s", x) instead of
145         gfc_get_string (x).
146         (resolve_transformational): Formatting fix.
147         (gfc_resolve_char_achar): Change name argument to bool is_achar,
148         use a single format string and if is_achar add "a" before "char".
149         (gfc_resolve_achar, gfc_resolve_char): Adjust callers.
150         * expr.c (gfc_extract_int): Change return type to bool, return true
151         if some error occurred.  Add REPORT_ERROR argument, if non-zero
152         call either gfc_error or gfc_error_now depending on its sign.
153         * arith.c (arith_power): Adjust gfc_extract_int caller.
154         * symbol.c (gfc_add_component): Use gfc_get_string ("%s", x) instead
155         of gfc_get_string (x).
156         (gfc_new_symtree, gfc_delete_symtree, gfc_get_uop, gfc_new_symbol,
157         gfc_get_gsymbol, generate_isocbinding_symbol): Likewise.
158         * openmp.c (gfc_match_omp_clauses): Adjust gfc_extract_int caller, pass
159         -1 as new last argument to it, don't emit gfc_error_now.
160         (gfc_match_omp_declare_reduction): Use gfc_get_string ("%s", x)
161         instead of gfc_get_string (x).
162         * check.c (kind_check): Adjust gfc_extract_int caller.
163         * intrinsic.c (add_sym, find_sym, make_alias): Use
164         gfc_get_string ("%s", x) instead of gfc_get_string (x).
165         * simplify.c (get_kind, gfc_simplify_btest, gfc_simplify_maskr,
166         gfc_simplify_maskl, gfc_simplify_poppar, gfc_simplify_repeat,
167         gfc_simplify_selected_int_kind, gfc_simplify_selected_real_kind):
168         Adjust gfc_extract_int callers.
169         * trans-decl.c (gfc_find_module): Use gfc_get_string ("%s", x)
170         instead of gfc_get_string (x).
171         * matchexp.c (expression_syntax): Add const.
172         * primary.c (match_kind_param, match_hollerith_constant,
173         match_string_constant): Adjust gfc_extract_int callers.
174         (match_keyword_arg): Use gfc_get_string ("%s", x) instead of
175         gfc_get_string (x).
176         * frontend-passes.c (optimize_minmaxloc): Likewise.
178 2017-01-19  Andre Vehreschild  <vehre@gcc.gnu.org>
180         PR fortran/70696
181         * trans-decl.c (gfc_build_qualified_array): Add static decl to parent
182         function only, when the decl-context is not the translation unit.
184 2017-01-18  Louis Krupp  <louis.krupp@zoho.com>
186         PR fortran/50069
187         PR fortran/55086
188         * trans-expr.c (gfc_conv_variable): Don't treat temporary variables
189         as function arguments.
190         * trans-stmt.c (forall_make_variable_temp,
191         generate_loop_for_temp_to_lhs, gfc_trans_assign_need_temp,
192         gfc_trans_forall_1): Don't adjust offset of forall temporary
193         for array sections, make forall temporaries work for substring
194         expressions, improve test coverage by adding -ftest-forall-temp
195         option to request usage of temporary array in forall code.
196         * lang.opt: Add -ftest-forall-temp option.
197         * invoke.texi: Add -ftest-forall-temp option.
199 2017-01-18  Andre Vehreschild  <vehre@gcc.gnu.org>
201         * primary.c (caf_variable_attr): Improve figuring whether the current
202         component is the last one refed.
203         * trans-stmt.c (gfc_trans_allocate): Do not generate sync_all calls
204         when allocating pointer or allocatable components.
206 2017-01-18  Andre Vehreschild  <vehre@gcc.gnu.org>
208         * gfortran.texi: Add missing parameters to caf-API functions.  Correct
209         typos and clarify some descriptions.
211 2017-01-18  Andre Vehreschild  <vehre@gcc.gnu.org>
213         PR fortran/70696
214         Missed some cases, here they are:
215         * trans-decl.c (gfc_build_qualified_array): Add static tokens to the
216         parent function's scope.
217         * trans-expr.c (gfc_get_tree_for_caf_expr): Shorten code.  Remove
218         unnecessary assert.
220 2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>
222         PR fortran/70697
223         * resolve.c (resolve_lock_unlock_event): Resolve the expression for
224         event's until_count.
226 2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>
228         PR fortran/70696
229         * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
230         is valid before accessing it.
232 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
234         PR translation/79019
235         PR translation/79020
236         * decl.c (attr_decl1): Fix spelling in translatable string.
237         * intrinsic.texi: Fix spelling - invokation -> invocation.
238         * lang.opt (faggressive-function-elimination, gfc_convert): Fix
239         typos in descriptions.
240         * openmp.c (resolve_omp_clauses): Add missing whitespace to
241         translatable strings.
243 2017-01-08  Martin Sebor  <msebor@redhat.com>
245         PR tree-optimization/78913
246         PR middle-end/77708
247         * trans-common.c (build_equiv_decl): Increase buffer size to avoid
248         truncation for any argument.
249         * trans-types.c (gfc_build_logical_type): Same.
251 2017-01-07  Andre Vehreschild  <vehre@gcc.gnu.org>
253         PR fortran/78781
254         PR fortran/78935
255         * expr.c (gfc_check_pointer_assign): Return the same error message for
256         rewritten coarray pointer assignments like for plain ones.
257         * gfortran.h: Change prototype.
258         * primary.c (caf_variable_attr): Set attributes used ones only only
259         ones.  Add setting of pointer_comp attribute.
260         (gfc_caf_attr): Add setting of pointer_comp attribute.
261         * trans-array.c (gfc_array_allocate): Add flag that the component to
262         allocate is not an ultimate coarray component.  Add allocation of
263         pointer arrays.
264         (structure_alloc_comps): Extend nullify to treat pointer components in
265         coarrays correctly.  Restructure nullify to remove redundant code.
266         (gfc_nullify_alloc_comp): Allow setting caf_mode flags.
267         * trans-array.h: Change prototype of gfc_nullify_alloc_comp ().
268         * trans-decl.c (generate_coarray_sym_init): Call nullify_alloc_comp for
269         derived type coarrays with pointer components.
270         * trans-expr.c (gfc_trans_structure_assign): Also treat pointer
271         components.
272         (trans_caf_token_assign): Handle assignment of token of scalar pointer
273         components.
274         (gfc_trans_pointer_assignment): Call above routine.
275         * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer
276         components.
277         (gfc_conv_intrinsic_caf_get): Likewise.
278         (conv_caf_send): Likewise.
279         * trans-stmt.c (gfc_trans_allocate): After allocating a derived type in
280         a coarray pre-register the tokens.
281         (gfc_trans_deallocate): Simply determining the coarray type (scalar or
282         array) and deregistering it correctly.
283         * trans-types.c (gfc_typenode_for_spec): Replace in_coarray flag by the
284         actual codim to allow lookup of array types in the cache.
285         (gfc_build_array_type): Likewise.
286         (gfc_get_array_descriptor_base): Likewise.
287         (gfc_get_array_type_bounds): Likewise.
288         (gfc_get_derived_type): Likewise.
289         * trans-types.h: Likewise.
290         * trans.c (gfc_deallocate_with_status): Enable deregistering of all kind
291         of coarray components.
292         (gfc_deallocate_scalar_with_status): Use free() in fcoarray_single mode
293         instead of caf_deregister.
295 2017-01-06  Jakub Jelinek  <jakub@redhat.com>
297         * simplify.c (simplify_transformation_to_array): Use
298         GCC_DIAGNOSTIC_PUSH_IGNORED and GCC_DIAGNOSTIC_POP instead of
299         #pragma GCC diagnostic {push,ignored,pop}.
301 2017-01-06  Alexandre Oliva <aoliva@redhat.com>
303         * simplify.c (simplify_transformation_to_array): Silence
304         array bounds warning.  Fix whitespace.
306 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
308         * module.c (load_omp_udrs): Initialize name.
310 2017-01-02  Janne Blomqvist  <jb@gcc.gnu.org>
312         PR fortran/78534
313         * trans-expr.c (gfc_trans_string_copy): Rework string copy
314         algorithm to avoid -Wstringop-overflow warning.
316 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
318         Update copyright years.
320         * gfortranspec.c (lang_specific_driver): Update copyright notice
321         dates.
322         * gfc-internals.texi: Bump @copying's copyright year.
323         * gfortran.texi: Ditto.
324         * intrinsic.texi: Ditto.
325         * invoke.texi: Ditto.
327 Copyright (C) 2017 Free Software Foundation, Inc.
329 Copying and distribution of this file, with or without modification,
330 are permitted in any medium without royalty provided the copyright
331 notice and this notice are preserved.