Fix translation issue with character length * errors (PR fortran/79860)
[official-gcc.git] / gcc / fortran / ChangeLog
blob8629cab6ccb658668c8ab3adccd3a411242d826e
1 2017-03-15  David Malcolm  <dmalcolm@redhat.com>
3         PR fortran/79860
4         * resolve.c (resolve_contained_fntype): Make error messages more
5         amenable to translation.
7 2017-03-06  Richard Biener  <rguenther@suse.de>
9         PR fortran/79894
10         * trans.c (gfc_add_modify_loc): Weaken assert.
12 2017-03-05  Andre Vehreschild  <vehre@gcc.gnu.org>,
13             Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
15         * check.c (positive_check): Add new function checking constant for
16         being greater then zero.
17         (gfc_check_image_status): Add checking of image_status arguments.
18         (gfc_check_failed_or_stopped_images): Same but for failed_- and
19         stopped_images function.
20         * dump-parse-tree.c (show_code_node): Added output of FAIL IMAGE.
21         * gfortran.h (enum gfc_statement): Added FAIL_IMAGE_ST.
22         (enum gfc_isym_id): Added new intrinsic symbols.
23         (enum gfc_exec_op): Added EXEC_FAIL_IMAGE.
24         * gfortran.texi: Added description for the new API functions. Updated
25         coverage of gfortran of TS18508.
26         * intrinsic.c (add_functions): Added symbols to resolve new intrinsic
27         functions. 
28         * intrinsic.h: Added prototypes.
29         * iresolve.c (gfc_resolve_failed_images): Resolve the failed_images
30         intrinsic.
31         (gfc_resolve_image_status): Same for image_status.
32         (gfc_resolve_stopped_images): Same for stopped_images.
33         * libgfortran.h: Added prototypes.
34         * match.c (gfc_match_if): Added matching of FAIL IMAGE statement.
35         (gfc_match_fail_image): Match a FAIL IMAGE statement.
36         * match.h: Added prototype.
37         * parse.c (decode_statement): Added matching for FAIL IMAGE.
38         (next_statement): Same.
39         (gfc_ascii_statement): Same.
40         * resolve.c: Same.
41         * simplify.c (gfc_simplify_failed_or_stopped_images): For COARRAY=
42         single a constant result can be returne.d
43         (gfc_simplify_image_status): For COARRAY=single the result is constant.
44         * st.c (gfc_free_statement): Added FAIL_IMAGE handling.
45         * trans-decl.c (gfc_build_builtin_function_decls): Added decls of the
46         new intrinsics.
47         * trans-expr.c (gfc_conv_procedure_call): This is first time all
48         arguments of a function are optional, which is now handled here
49         correctly.
50         * trans-intrinsic.c (conv_intrinsic_image_status): Translate
51         image_status.
52         (gfc_conv_intrinsic_function): Add support for image_status.
53         (gfc_is_intrinsic_libcall): Add support for the remaining new
54         intrinsics.
55         * trans-stmt.c (gfc_trans_fail_image): Trans a fail image.
56         * trans-stmt.h: Add the prototype for the above.
57         * trans.c (trans_code): Dispatch for fail_image.
58         * trans.h: Add the trees for the new intrinsics.
60 2017-03-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
62         PR fortran/79841
63         * openmp.c (check_symbol_not_pointer): Adjust diagnostic.
65 2017-02-28  Paul Thomas  <pault@gcc.gnu.org>
67         PR fortran/79739
68         * resolve.c (resolve_fl_procedure): Deal with the case where
69         'submodule_name' is NULL so that gfc_error does not ICE.
70         Reformat the error message to make it more consistent.
72 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
74         * parse.c (parse_critical_block): Use cond ? G_("...") : G_("...")
75         instead of just cond ? "..." : "...".
76         * scanner.c (gfc_next_char_literal): Likewise.
77         * match.c (match_exit_cycle): Likewise.
79 2017-02-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
81         PR fortran/51119
82         * options.c (gfc_post_options): Set default limit for matmul
83         inlining to 30.
84         * invoke.texi: Document change.
86 2017-02-25  Dominique d'Humieres  <dominiq@lps.ens.fr>
88         PR fortran/79601
89         * interface.c (check_dtio_arg_TKR_intent): Change 'intent'
90         to 'INTENT'.
92 2017-02-25  Dominique d'Humieres  <dominiq@lps.ens.fr>
94         PR fortran/79597
95         * interface.c (gfc_match_end_interface): Remove spurious comma
96         and space, replace 'got %s' with 'got %qs'.
98 2017-02-20  Paul Thomas  <pault@gcc.gnu.org>
100         PR fortran/79599
101         * interface.c (check_dtio_arg_TKR_intent): Supply 'must'
102         missing from error message.
104 2017-02-20  Paul Thomas  <pault@gcc.gnu.org>
106         PR fortran/79523
107         * interface.c (gfc_find_typebound_dtio_proc): Guard test for
108         flavor attribute by checking that symbol is resolved.
110 2017-02-16  Paul Thomas  <pault@gcc.gnu.org>
112         PR fortran/79382
113         * decl.c (access_attr_decl): Test for presence of generic DTIO
114         interface and emit error if not present.
116 2017-02-20  Paul Thomas  <pault@gcc.gnu.org>
118         PR fortran/79434
119         * parse.c (check_component, parse_union): Whitespace.
120         (set_syms_host_assoc): For a derived type, check if the module
121         in which it was declared is one of the submodule ancestors. If
122         it is, make the components public. Otherwise, reset attribute
123         'host_assoc' and set 'use-assoc' so that encapsulation is
124         preserved.
126 2017-02-19  Paul Thomas  <pault@gcc.gnu.org>
128         PR fortran/79447
129         * decl.c (gfc_set_constant_character_len): Whitespace.
130         (gfc_match_end): Catch case where a procedure is contained in
131         a module procedure and ensure that 'end procedure' is the
132         correct termination.
134 2017-02-19  Paul Thomas  <pault@gcc.gnu.org>
136         PR fortran/79402
137         * resolve.c (fixup_unique_dummy): New function.
138         (gfc_resolve_expr): Call it for dummy variables with a unique
139         symtree name.
141 2017-02-19  Andre Vehreschild  <vehre@gcc.gnu.org>
143         PR fortran/79229
144         * trans-expr.c (gfc_trans_assignment_1): Deref indirect refs when
145         compiling with -fcheck=mem to check the pointer and not the data.
147 2017-02-19  Andre Vehreschild  <vehre@gcc.gnu.org>
149         PR fortran/79335
150         * trans-array.c (duplicate_allocatable_coarray): Ensure attributes
151         passed are properly initialized.
152         (structure_alloc_comps): Same.
153         * trans-expr.c (gfc_trans_structure_assign): Same.
155 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
157         * trans-expr.c (gfc_conv_substring): Add missing space in diagnostics.
159 2017-02-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
161         PR fortran/65542
162         * intrinsic.c (gfc_intrinsic_func_interface):  Return an error
163         for -std=f95 for disallowed transformational functions in
164         initialization expressions.
166 2017-02-09  Cesar Philippidis  <cesar@codesourcery.com>
167             Joseph Myers  <joseph@codesourcery.com>
169         * openmp.c (resolve_omp_clauses): Error on directives
170         containing both tile and collapse clauses.
171         (resolve_oacc_loop_blocks): Represent '*' tile arguments as zero.
172         * trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
173         collapsed loops.
175 2017-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
177         * trans-types.c (gfc_get_int_kind_from_width_isofortranen):  Choose
178         REAL type with the widest precision if two (or more) have the same
179         storage size.
181 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
183         PR fortran/79344
184         * trans-stmt.c (gfc_trans_allocate): Only deallocate the components of
185         the temporary, when a new object was created for the temporary.  Not
186         when it is just an alias to an existing object.
188 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
190         PR fortran/79335
191         * trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
192         attributes before using them.
194 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
196         PR fortran/78958
197         * trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len
198         component of unlimited polymorphic objects when source-allocating.
200 2017-02-05  Andre Vehreschild  <vehre@gcc.gnu.org>
202         PR fortran/79230
203         * trans-array.c (structure_alloc_comps): Ignore pointer components when
204         freeing structures.
206 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
208         PR lto/79061
209         * f95-lang.c (gfc_create_decls): Include stringpool.h.
210         Pass main_input_filename to build_translation_unit_decl.
212 2017-01-23  Thomas Koenig  <tkoenig@netcologne.de>
214         * arith.c (arith_power):  If simplifying integer power expression
215         to zero, warn if -Winteger-division is given.
217 2017-01-22  Jakub Jelinek  <jakub@redhat.com>
219         PR fortran/79154
220         * parse.c (matchs, matcho, matchds, matchdo): Replace return st;
221         with { ret = st; goto finish; }.
222         (decode_omp_directive): Allow declare simd, declare target and
223         simd directives in PURE/ELEMENTAL procedures.  Only call
224         gfc_unset_implicit_pure on successful match of other procedures.
226 2017-01-21  Gerald Pfeifer  <gerald@pfeifer.com>
228         * gfc-internals.texi (Symbol Versioning): Change references
229         to www.akkadia.org to https.
231 2017-01-21  Jakub Jelinek  <jakub@redhat.com>
233         * gfortran.h (gfc_extract_int): Change return type to bool.  Add
234         int argument with = 0.
235         * decl.c (gfc_match_kind_spec): Adjust gfc_extract_int caller, pass
236         1 as new last argument to it, don't emit gfc_error.
237         (match_char_kind): Likewise.
238         (gfc_match_decl_type_spec): Use gfc_get_string ("%s", x) instead of
239         gfc_get_string (x).
240         (gfc_match_derived_decl, match_binding_attributes): Likewise.
241         (gfc_match_structure_decl): Don't sprintf back to name, call
242         get_struct_decl directly with gfc_dt_upper_string (name) result.
243         * trans-stmt.c (gfc_trans_allocate): Use gfc_get_string ("%s", x)
244         instead of gfc_get_string (x).
245         * module.c (gfc_dt_lower_string, gfc_dt_upper_string,
246         gfc_match_use, gfc_match_submodule, find_true_name, mio_pool_string,
247         mio_symtree_ref, mio_expr, mio_omp_udr_expr, load_generic_interfaces,
248         load_omp_udrs, load_needed, read_module, dump_module,
249         create_intrinsic_function, import_iso_c_binding_module,
250         create_int_parameter, create_int_parameter_array, create_derived_type,
251         use_iso_fortran_env_module): Likewise.
252         * error.c (gfc_diagnostic_starter, gfc_diagnostic_start_span): Use
253         pp_verbatim (context->printer, "%s", x) instead of
254         pp_verbatim (context->printer, x).
255         * match.c (gfc_match_small_int): Adjust gfc_extract_int caller, pass
256         1 as new last argument to it, don't emit gfc_error.
257         (gfc_match_small_int_expr): Likewise.
258         * iresolve.c (gfc_get_string): Optimize format "%s" case.
259         (resolve_bound): Use gfc_get_string ("%s", x) instead of
260         gfc_get_string (x).
261         (resolve_transformational): Formatting fix.
262         (gfc_resolve_char_achar): Change name argument to bool is_achar,
263         use a single format string and if is_achar add "a" before "char".
264         (gfc_resolve_achar, gfc_resolve_char): Adjust callers.
265         * expr.c (gfc_extract_int): Change return type to bool, return true
266         if some error occurred.  Add REPORT_ERROR argument, if non-zero
267         call either gfc_error or gfc_error_now depending on its sign.
268         * arith.c (arith_power): Adjust gfc_extract_int caller.
269         * symbol.c (gfc_add_component): Use gfc_get_string ("%s", x) instead
270         of gfc_get_string (x).
271         (gfc_new_symtree, gfc_delete_symtree, gfc_get_uop, gfc_new_symbol,
272         gfc_get_gsymbol, generate_isocbinding_symbol): Likewise.
273         * openmp.c (gfc_match_omp_clauses): Adjust gfc_extract_int caller, pass
274         -1 as new last argument to it, don't emit gfc_error_now.
275         (gfc_match_omp_declare_reduction): Use gfc_get_string ("%s", x)
276         instead of gfc_get_string (x).
277         * check.c (kind_check): Adjust gfc_extract_int caller.
278         * intrinsic.c (add_sym, find_sym, make_alias): Use
279         gfc_get_string ("%s", x) instead of gfc_get_string (x).
280         * simplify.c (get_kind, gfc_simplify_btest, gfc_simplify_maskr,
281         gfc_simplify_maskl, gfc_simplify_poppar, gfc_simplify_repeat,
282         gfc_simplify_selected_int_kind, gfc_simplify_selected_real_kind):
283         Adjust gfc_extract_int callers.
284         * trans-decl.c (gfc_find_module): Use gfc_get_string ("%s", x)
285         instead of gfc_get_string (x).
286         * matchexp.c (expression_syntax): Add const.
287         * primary.c (match_kind_param, match_hollerith_constant,
288         match_string_constant): Adjust gfc_extract_int callers.
289         (match_keyword_arg): Use gfc_get_string ("%s", x) instead of
290         gfc_get_string (x).
291         * frontend-passes.c (optimize_minmaxloc): Likewise.
293 2017-01-19  Andre Vehreschild  <vehre@gcc.gnu.org>
295         PR fortran/70696
296         * trans-decl.c (gfc_build_qualified_array): Add static decl to parent
297         function only, when the decl-context is not the translation unit.
299 2017-01-18  Louis Krupp  <louis.krupp@zoho.com>
301         PR fortran/50069
302         PR fortran/55086
303         * trans-expr.c (gfc_conv_variable): Don't treat temporary variables
304         as function arguments.
305         * trans-stmt.c (forall_make_variable_temp,
306         generate_loop_for_temp_to_lhs, gfc_trans_assign_need_temp,
307         gfc_trans_forall_1): Don't adjust offset of forall temporary
308         for array sections, make forall temporaries work for substring
309         expressions, improve test coverage by adding -ftest-forall-temp
310         option to request usage of temporary array in forall code.
311         * lang.opt: Add -ftest-forall-temp option.
312         * invoke.texi: Add -ftest-forall-temp option.
314 2017-01-18  Andre Vehreschild  <vehre@gcc.gnu.org>
316         * primary.c (caf_variable_attr): Improve figuring whether the current
317         component is the last one refed.
318         * trans-stmt.c (gfc_trans_allocate): Do not generate sync_all calls
319         when allocating pointer or allocatable components.
321 2017-01-18  Andre Vehreschild  <vehre@gcc.gnu.org>
323         * gfortran.texi: Add missing parameters to caf-API functions.  Correct
324         typos and clarify some descriptions.
326 2017-01-18  Andre Vehreschild  <vehre@gcc.gnu.org>
328         PR fortran/70696
329         Missed some cases, here they are:
330         * trans-decl.c (gfc_build_qualified_array): Add static tokens to the
331         parent function's scope.
332         * trans-expr.c (gfc_get_tree_for_caf_expr): Shorten code.  Remove
333         unnecessary assert.
335 2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>
337         PR fortran/70697
338         * resolve.c (resolve_lock_unlock_event): Resolve the expression for
339         event's until_count.
341 2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>
343         PR fortran/70696
344         * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
345         is valid before accessing it.
347 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
349         PR translation/79019
350         PR translation/79020
351         * decl.c (attr_decl1): Fix spelling in translatable string.
352         * intrinsic.texi: Fix spelling - invokation -> invocation.
353         * lang.opt (faggressive-function-elimination, gfc_convert): Fix
354         typos in descriptions.
355         * openmp.c (resolve_omp_clauses): Add missing whitespace to
356         translatable strings.
358 2017-01-08  Martin Sebor  <msebor@redhat.com>
360         PR tree-optimization/78913
361         PR middle-end/77708
362         * trans-common.c (build_equiv_decl): Increase buffer size to avoid
363         truncation for any argument.
364         * trans-types.c (gfc_build_logical_type): Same.
366 2017-01-07  Andre Vehreschild  <vehre@gcc.gnu.org>
368         PR fortran/78781
369         PR fortran/78935
370         * expr.c (gfc_check_pointer_assign): Return the same error message for
371         rewritten coarray pointer assignments like for plain ones.
372         * gfortran.h: Change prototype.
373         * primary.c (caf_variable_attr): Set attributes used ones only only
374         ones.  Add setting of pointer_comp attribute.
375         (gfc_caf_attr): Add setting of pointer_comp attribute.
376         * trans-array.c (gfc_array_allocate): Add flag that the component to
377         allocate is not an ultimate coarray component.  Add allocation of
378         pointer arrays.
379         (structure_alloc_comps): Extend nullify to treat pointer components in
380         coarrays correctly.  Restructure nullify to remove redundant code.
381         (gfc_nullify_alloc_comp): Allow setting caf_mode flags.
382         * trans-array.h: Change prototype of gfc_nullify_alloc_comp ().
383         * trans-decl.c (generate_coarray_sym_init): Call nullify_alloc_comp for
384         derived type coarrays with pointer components.
385         * trans-expr.c (gfc_trans_structure_assign): Also treat pointer
386         components.
387         (trans_caf_token_assign): Handle assignment of token of scalar pointer
388         components.
389         (gfc_trans_pointer_assignment): Call above routine.
390         * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer
391         components.
392         (gfc_conv_intrinsic_caf_get): Likewise.
393         (conv_caf_send): Likewise.
394         * trans-stmt.c (gfc_trans_allocate): After allocating a derived type in
395         a coarray pre-register the tokens.
396         (gfc_trans_deallocate): Simply determining the coarray type (scalar or
397         array) and deregistering it correctly.
398         * trans-types.c (gfc_typenode_for_spec): Replace in_coarray flag by the
399         actual codim to allow lookup of array types in the cache.
400         (gfc_build_array_type): Likewise.
401         (gfc_get_array_descriptor_base): Likewise.
402         (gfc_get_array_type_bounds): Likewise.
403         (gfc_get_derived_type): Likewise.
404         * trans-types.h: Likewise.
405         * trans.c (gfc_deallocate_with_status): Enable deregistering of all kind
406         of coarray components.
407         (gfc_deallocate_scalar_with_status): Use free() in fcoarray_single mode
408         instead of caf_deregister.
410 2017-01-06  Jakub Jelinek  <jakub@redhat.com>
412         * simplify.c (simplify_transformation_to_array): Use
413         GCC_DIAGNOSTIC_PUSH_IGNORED and GCC_DIAGNOSTIC_POP instead of
414         #pragma GCC diagnostic {push,ignored,pop}.
416 2017-01-06  Alexandre Oliva <aoliva@redhat.com>
418         * simplify.c (simplify_transformation_to_array): Silence
419         array bounds warning.  Fix whitespace.
421 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
423         * module.c (load_omp_udrs): Initialize name.
425 2017-01-02  Janne Blomqvist  <jb@gcc.gnu.org>
427         PR fortran/78534
428         * trans-expr.c (gfc_trans_string_copy): Rework string copy
429         algorithm to avoid -Wstringop-overflow warning.
431 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
433         Update copyright years.
435         * gfortranspec.c (lang_specific_driver): Update copyright notice
436         dates.
437         * gfc-internals.texi: Bump @copying's copyright year.
438         * gfortran.texi: Ditto.
439         * intrinsic.texi: Ditto.
440         * invoke.texi: Ditto.
442 Copyright (C) 2017 Free Software Foundation, Inc.
444 Copying and distribution of this file, with or without modification,
445 are permitted in any medium without royalty provided the copyright
446 notice and this notice are preserved.