PR testsuite/79169
[official-gcc.git] / gcc / fortran / ChangeLog
blob5382696a1755a0e1df95ced508935bbab72e42e6
1 2017-01-21  Jakub Jelinek  <jakub@redhat.com>
3         * gfortran.h (gfc_extract_int): Change return type to bool.  Add
4         int argument with = 0.
5         * decl.c (gfc_match_kind_spec): Adjust gfc_extract_int caller, pass
6         1 as new last argument to it, don't emit gfc_error.
7         (match_char_kind): Likewise.
8         (gfc_match_decl_type_spec): Use gfc_get_string ("%s", x) instead of
9         gfc_get_string (x).
10         (gfc_match_derived_decl, match_binding_attributes): Likewise.
11         (gfc_match_structure_decl): Don't sprintf back to name, call
12         get_struct_decl directly with gfc_dt_upper_string (name) result.
13         * trans-stmt.c (gfc_trans_allocate): Use gfc_get_string ("%s", x)
14         instead of gfc_get_string (x).
15         * module.c (gfc_dt_lower_string, gfc_dt_upper_string,
16         gfc_match_use, gfc_match_submodule, find_true_name, mio_pool_string,
17         mio_symtree_ref, mio_expr, mio_omp_udr_expr, load_generic_interfaces,
18         load_omp_udrs, load_needed, read_module, dump_module,
19         create_intrinsic_function, import_iso_c_binding_module,
20         create_int_parameter, create_int_parameter_array, create_derived_type,
21         use_iso_fortran_env_module): Likewise.
22         * error.c (gfc_diagnostic_starter, gfc_diagnostic_start_span): Use
23         pp_verbatim (context->printer, "%s", x) instead of
24         pp_verbatim (context->printer, x).
25         * match.c (gfc_match_small_int): Adjust gfc_extract_int caller, pass
26         1 as new last argument to it, don't emit gfc_error.
27         (gfc_match_small_int_expr): Likewise.
28         * iresolve.c (gfc_get_string): Optimize format "%s" case.
29         (resolve_bound): Use gfc_get_string ("%s", x) instead of
30         gfc_get_string (x).
31         (resolve_transformational): Formatting fix.
32         (gfc_resolve_char_achar): Change name argument to bool is_achar,
33         use a single format string and if is_achar add "a" before "char".
34         (gfc_resolve_achar, gfc_resolve_char): Adjust callers.
35         * expr.c (gfc_extract_int): Change return type to bool, return true
36         if some error occurred.  Add REPORT_ERROR argument, if non-zero
37         call either gfc_error or gfc_error_now depending on its sign.
38         * arith.c (arith_power): Adjust gfc_extract_int caller.
39         * symbol.c (gfc_add_component): Use gfc_get_string ("%s", x) instead
40         of gfc_get_string (x).
41         (gfc_new_symtree, gfc_delete_symtree, gfc_get_uop, gfc_new_symbol,
42         gfc_get_gsymbol, generate_isocbinding_symbol): Likewise.
43         * openmp.c (gfc_match_omp_clauses): Adjust gfc_extract_int caller, pass
44         -1 as new last argument to it, don't emit gfc_error_now.
45         (gfc_match_omp_declare_reduction): Use gfc_get_string ("%s", x)
46         instead of gfc_get_string (x).
47         * check.c (kind_check): Adjust gfc_extract_int caller.
48         * intrinsic.c (add_sym, find_sym, make_alias): Use
49         gfc_get_string ("%s", x) instead of gfc_get_string (x).
50         * simplify.c (get_kind, gfc_simplify_btest, gfc_simplify_maskr,
51         gfc_simplify_maskl, gfc_simplify_poppar, gfc_simplify_repeat,
52         gfc_simplify_selected_int_kind, gfc_simplify_selected_real_kind):
53         Adjust gfc_extract_int callers.
54         * trans-decl.c (gfc_find_module): Use gfc_get_string ("%s", x)
55         instead of gfc_get_string (x).
56         * matchexp.c (expression_syntax): Add const.
57         * primary.c (match_kind_param, match_hollerith_constant,
58         match_string_constant): Adjust gfc_extract_int callers.
59         (match_keyword_arg): Use gfc_get_string ("%s", x) instead of
60         gfc_get_string (x).
61         * frontend-passes.c (optimize_minmaxloc): Likewise.
63 2017-01-19  Andre Vehreschild  <vehre@gcc.gnu.org>
65         PR fortran/70696
66         * trans-decl.c (gfc_build_qualified_array): Add static decl to parent
67         function only, when the decl-context is not the translation unit.
69 2017-01-18  Louis Krupp  <louis.krupp@zoho.com>
71         PR fortran/50069
72         PR fortran/55086
73         * trans-expr.c (gfc_conv_variable): Don't treat temporary variables
74         as function arguments.
75         * trans-stmt.c (forall_make_variable_temp,
76         generate_loop_for_temp_to_lhs, gfc_trans_assign_need_temp,
77         gfc_trans_forall_1): Don't adjust offset of forall temporary
78         for array sections, make forall temporaries work for substring
79         expressions, improve test coverage by adding -ftest-forall-temp
80         option to request usage of temporary array in forall code.
81         * lang.opt: Add -ftest-forall-temp option.
82         * invoke.texi: Add -ftest-forall-temp option.
84 2017-01-18  Andre Vehreschild  <vehre@gcc.gnu.org>
86         * primary.c (caf_variable_attr): Improve figuring whether the current
87         component is the last one refed.
88         * trans-stmt.c (gfc_trans_allocate): Do not generate sync_all calls
89         when allocating pointer or allocatable components.
91 2017-01-18  Andre Vehreschild  <vehre@gcc.gnu.org>
93         * gfortran.texi: Add missing parameters to caf-API functions.  Correct
94         typos and clarify some descriptions.
96 2017-01-18  Andre Vehreschild  <vehre@gcc.gnu.org>
98         PR fortran/70696
99         Missed some cases, here they are:
100         * trans-decl.c (gfc_build_qualified_array): Add static tokens to the
101         parent function's scope.
102         * trans-expr.c (gfc_get_tree_for_caf_expr): Shorten code.  Remove
103         unnecessary assert.
105 2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>
107         PR fortran/70697
108         * resolve.c (resolve_lock_unlock_event): Resolve the expression for
109         event's until_count.
111 2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>
113         PR fortran/70696
114         * trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
115         is valid before accessing it.
117 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
119         PR translation/79019
120         PR translation/79020
121         * decl.c (attr_decl1): Fix spelling in translatable string.
122         * intrinsic.texi: Fix spelling - invokation -> invocation.
123         * lang.opt (faggressive-function-elimination, gfc_convert): Fix
124         typos in descriptions.
125         * openmp.c (resolve_omp_clauses): Add missing whitespace to
126         translatable strings.
128 2017-01-08  Martin Sebor  <msebor@redhat.com>
130         PR tree-optimization/78913
131         PR middle-end/77708
132         * trans-common.c (build_equiv_decl): Increase buffer size to avoid
133         truncation for any argument.
134         * trans-types.c (gfc_build_logical_type): Same.
136 2017-01-07  Andre Vehreschild  <vehre@gcc.gnu.org>
138         PR fortran/78781
139         PR fortran/78935
140         * expr.c (gfc_check_pointer_assign): Return the same error message for
141         rewritten coarray pointer assignments like for plain ones.
142         * gfortran.h: Change prototype.
143         * primary.c (caf_variable_attr): Set attributes used ones only only
144         ones.  Add setting of pointer_comp attribute.
145         (gfc_caf_attr): Add setting of pointer_comp attribute.
146         * trans-array.c (gfc_array_allocate): Add flag that the component to
147         allocate is not an ultimate coarray component.  Add allocation of
148         pointer arrays.
149         (structure_alloc_comps): Extend nullify to treat pointer components in
150         coarrays correctly.  Restructure nullify to remove redundant code.
151         (gfc_nullify_alloc_comp): Allow setting caf_mode flags.
152         * trans-array.h: Change prototype of gfc_nullify_alloc_comp ().
153         * trans-decl.c (generate_coarray_sym_init): Call nullify_alloc_comp for
154         derived type coarrays with pointer components.
155         * trans-expr.c (gfc_trans_structure_assign): Also treat pointer
156         components.
157         (trans_caf_token_assign): Handle assignment of token of scalar pointer
158         components.
159         (gfc_trans_pointer_assignment): Call above routine.
160         * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer
161         components.
162         (gfc_conv_intrinsic_caf_get): Likewise.
163         (conv_caf_send): Likewise.
164         * trans-stmt.c (gfc_trans_allocate): After allocating a derived type in
165         a coarray pre-register the tokens.
166         (gfc_trans_deallocate): Simply determining the coarray type (scalar or
167         array) and deregistering it correctly.
168         * trans-types.c (gfc_typenode_for_spec): Replace in_coarray flag by the
169         actual codim to allow lookup of array types in the cache.
170         (gfc_build_array_type): Likewise.
171         (gfc_get_array_descriptor_base): Likewise.
172         (gfc_get_array_type_bounds): Likewise.
173         (gfc_get_derived_type): Likewise.
174         * trans-types.h: Likewise.
175         * trans.c (gfc_deallocate_with_status): Enable deregistering of all kind
176         of coarray components.
177         (gfc_deallocate_scalar_with_status): Use free() in fcoarray_single mode
178         instead of caf_deregister.
180 2017-01-06  Jakub Jelinek  <jakub@redhat.com>
182         * simplify.c (simplify_transformation_to_array): Use
183         GCC_DIAGNOSTIC_PUSH_IGNORED and GCC_DIAGNOSTIC_POP instead of
184         #pragma GCC diagnostic {push,ignored,pop}.
186 2017-01-06  Alexandre Oliva <aoliva@redhat.com>
188         * simplify.c (simplify_transformation_to_array): Silence
189         array bounds warning.  Fix whitespace.
191 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
193         * module.c (load_omp_udrs): Initialize name.
195 2017-01-02  Janne Blomqvist  <jb@gcc.gnu.org>
197         PR fortran/78534
198         * trans-expr.c (gfc_trans_string_copy): Rework string copy
199         algorithm to avoid -Wstringop-overflow warning.
201 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
203         Update copyright years.
205         * gfortranspec.c (lang_specific_driver): Update copyright notice
206         dates.
207         * gfc-internals.texi: Bump @copying's copyright year.
208         * gfortran.texi: Ditto.
209         * intrinsic.texi: Ditto.
210         * invoke.texi: Ditto.
212 Copyright (C) 2017 Free Software Foundation, Inc.
214 Copying and distribution of this file, with or without modification,
215 are permitted in any medium without royalty provided the copyright
216 notice and this notice are preserved.