1aa71d8778e5cb86aa91586415781c0b688518fb
[gcc.git] / gcc / fortran / ChangeLog
1 2020-04-02 Steven G. Kargl <kargl@gcc.gnu.org>
2
3 PR fortran/94030
4 * resolve.c (resolve_equivalence): Correct formatting
5 around the label "identical_types". Instead of using
6 gfc_resolve_array_spec use is_non_constants_shape_array
7 to determine whether the array can be used in a in an
8 equivalence statement.
9
10 2020-04-01 Mark Eggleston <mark.eggleston@codethink.com>
11
12 PR fortran/94386
13 expr.c (simplify_parameter_variable): Restore code deleted
14 in PR94246.
15
16 2020-03-28 Paul Thomas <pault@gcc.gnu.org>
17
18 PR fortran/94246
19 * arith.c : Remove trailing white space.
20 * expr.c (scalarize_intrinsic_call): Remove the error checking.
21 Make a copy of the expression to be simplified and only replace
22 the original if the simplification succeeds.
23
24 2020-03-28 Tobias Burnus <tobias@codesourcery.com>
25
26 PR fortran/94348
27 * decl.c (gfc_match_submod_proc): Add result var to the
28 proc's namespace.
29
30 2020-03-27 Tobias Burnus <tobias@codesourcery.com>
31
32 PR fortran/93957
33 * trans-array.c (gfc_alloc_allocatable_for_assignment): Accept
34 nonallocatable, nonpointer deferred-rank arrays.
35
36 2020-03-27 Tobias Burnus <tobias@codesourcery.com>
37
38 PR fortran/93363
39 * resolve.c (resolve_assoc_var): Reject association to DT and
40 function name.
41
42 2020-03-25 Steven G. Kargl <kargl@gcc.gnu.org>
43
44 PR fortran/93484
45 * match.c (gfc_match_type_spec): Replace gfc_match_init_expr with
46 gfc_match_expr. Return m if m is MATCH_NO or MATCH_ERROR.
47
48 2020-03-23 Mark Eggleston <mark.eggleston@codethink.com>
49 Steven G. Kargl <kargl@gcc.gnu.org>
50
51 PR fortran/93600
52 * expr.c (simplify_parameter_variable): Check whether the ref
53 chain contains INQUIRY_LEN or INQUIRY_KIND and set inquiry
54 boolean. When an empty array has been identified and a new
55 new EXPR_ARRAY expression has been created only return that
56 expression if inquiry is not set. This allows the new
57 expression to drop through to be simplified into a
58 EXPR_CONSTANT representing %kind or %len.
59 * matc.c (gfc_match_assignment): If lvalue doesn't have a
60 symtree free both lvalue and rvalue expressions and return
61 an error.
62 * resolv.c (gfc_resolve_ref): Ensure that code to handle
63 INQUIRY_LEN is only performed for arrays with deferred types.
64
65 2020-03-18 Jakub Jelinek <jakub@redhat.com>
66
67 * class.c (generate_finalization_wrapper): Fix up duplicated word
68 issue in a comment.
69 * trans-types.c (gfc_get_nodesc_array_type): Likewise.
70
71 2020-03-17 Jakub Jelinek <jakub@redhat.com>
72
73 * array.c (gfc_check_iter_variable): Fix up duplicated word issue
74 in a comment.
75 * arith.c (gfc_arith_concat): Likewise.
76 * resolve.c (gfc_resolve_ref): Likewise.
77 * frontend-passes.c (matmul_lhs_realloc): Likewise.
78 * module.c (gfc_match_submodule, load_needed): Likewise.
79 * trans-expr.c (gfc_init_se): Likewise.
80
81 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
82
83 * lang.opt: Avoid redundancy in the help text.
84
85 2020-03-12 Tobias Burnus <tobias@codesourcery.com>
86
87 PR middle-end/94120
88 * openmp.c (gfc_match_oacc_declare): Accept function-result
89 variables; reject variables declared in a different scoping unit.
90
91 2020-03-08 Paul Thomas <pault@gcc.gnu.org>
92
93 PR fortran/93581
94 * resolve.c (gfc_resolve_ref): Modify array refs to be elements
95 if the ref chain ends in INQUIRY_LEN.
96 * trans-array.c (gfc_get_dataptr_offset): Provide the offsets
97 for INQUIRY_RE and INQUIRY_IM.
98
99 2020-03-05 Steven G. Kargl <kargl@gcc.gnu.org>
100
101 PR fortran/93792
102 * decl.c (variable_decl): If param and initializer check
103 for BOZ, if found, output an error, set m to MATCH_ERROR
104 and goto cleanup.
105
106 2020-03-02 Andrew Benson <abensonca@gmail.com>
107
108 PR fortran/93486
109 * module.c: Increase size of variables used to read module names
110 when loading interfaces from module files to permit cases where
111 the name is the concatenation of a module and submodule name.
112 * gfortran.dg/pr93486.f90: New test.
113
114 2020-03-01 Paul Thomas <pault@gcc.gnu.org>
115
116 PR fortran/92976
117 * match.c (select_type_set_tmp): If the selector array spec has
118 explicit bounds, make the temporary's bounds deferred.
119
120 2020-03-01 Paul Thomas <pault@gcc.gnu.org>
121
122 PR fortran/92959
123 * trans-intrinsic.c (gfc_conv_associated): Eliminate
124 'nonzero_charlen' and move the chunk to evaluate zero character
125 length until after the argument evaluation so that the string
126 length can be used.
127
128 2020-02-28 Paul Thomas <pault@gcc.gnu.org>
129
130 PR fortran/92785
131 * trans-expr.c (gfc_conv_intrinsic_to_class): Renormalise non-
132 variable expressions to be unity lbound based.
133
134 2020-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
135
136 * simplify.c (degrees_f): Remove unused code.
137
138 2020-02-25 Jakub Jelinek <jakub@redhat.com>
139
140 PR translation/93864
141 * intrinsic.texi (CO_BROADCAST): Fix typo, paramter -> parameter.
142 * trans-array.c (gfc_allocate_pdt_comp, gfc_deallocate_pdt_comp,
143 gfc_check_pdt_dummy): Fix comment typo paramter -> parameter.
144
145 2020-02-24 Mark Eggleston <mark.eggleston@codethink.com>
146 Steven G. Kargl <kargl@gcc.gnu.org>
147
148 PR fortran/93835
149 * decl.c (gfc_match_data) : Check whether the data expression
150 is a derived type and is a constructor. If a BOZ constant
151 is encountered in the constructor output an error and return
152 MATCH_ERROR.
153
154 2020-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
155
156 PR fortran/93604
157 * decl.c (gfc_match_data) : Check whether the data expression
158 is a derived type and is a constructor. If a BOZ constant
159 is encountered in the constructor output an error and return
160 MATCH_ERROR.
161
162 2020-02-24 Tobias Burnus <tobias@codesourcery.com>
163
164 PR fortran/93552
165 * match.c (match_exit_cycle): With OpenACC, check the kernels loop
166 directive and tile clause as well.
167
168 2020-02-23 Thomas Koenig <tkoenig@gcc.gnu.org>
169
170 PR fortran/93889
171 * interface.c (compare_parameter): Fix error message.
172
173 2020-02-23 Thomas Koenig <tkoenig@gcc.gnu.org>
174
175 PR fortran/93890
176 * interface.c: Replace "can not" by "cannot" and remove trailing
177 space.
178
179 2020-02-20 Tobias Burnus <tobias@codesourcery.com>
180
181 PR fortran/93825
182 * openmp.c (resolve_oacc_loop_blocks): Move call to
183 resolve_oacc_nested_loops from here ...
184 (resolve_oacc_loop): ... to here.
185
186 2020-02-18 Mark Eggleston <markeggleston@gcc.gnu.org>
187
188 PR fortran/93714
189 * expr.c (gfc_check_pointer_assign): Move check for
190 matching character length to after checking the lvalue
191 attributes for target or pointer.
192
193 2020-02-18 Steven G. Kargl <kargl@gcc.gnu.org>
194
195 PR fortran/93601
196 * match.c (gfc_match_assignment) : Reject assignment if
197 the lhs stype is BT_CLASS and the rhs type is BT_BOZ.
198
199 2020-02-18 Steven G. Kargl <kargl@gcc.gnu.org>
200
201 PR fortran/93603
202 * match.c (gfc_match_associate) : If target expression
203 has the type BT_BOZ output an error and goto
204 assocListError.
205
206 2020-02-18 Steven G. Kargl <kargl@gcc.gnu.org>
207 Mark Eggleston <markeggleston@gcc.gnu.org>
208
209 PR fortran/93580
210 * primary.c (gfc_match_varspec): If the symbol following %
211 is re or im and the primary expression type is not BT_COMPLEX
212 issue an error. If the symbol is len and the primary
213 expression type is not BT_CHARACTER is an error.
214
215 2020-02-10 Andrew Benson <abensonca@gmail.com>
216
217 PR fortran/83113
218 * array.c: Do not attempt to set the array spec for a submodule
219 function symbol (as it has already been set in the corresponding
220 module procedure interface).
221 * symbol.c: Do not reject duplicate POINTER, ALLOCATABLE, or
222 DIMENSION attributes in declarations of a submodule function.
223 * gfortran.h: Add a macro that tests for a module procedure in a
224 submodule.
225 * gfortran.dg/pr83113.f90: New test.
226
227 2020-02-03 Julian Brown <julian@codesourcery.com>
228 Tobias Burnus <tobias@codesourcery.com>
229
230 * cpp.c (cpp_define_builtins): Update _OPENACC define to 201711.
231 * intrinsic.texi: Update mentions of OpenACC version to 2.6.
232 * gfortran.texi: Likewise. Remove experimental disclamer for OpenACC.
233 * invoke.texi: Remove experimental disclamer for OpenACC.
234
235 2020-02-03 Tobias Burnus <tobias@codesourcery.com>
236
237 PR fortran/93541
238 * intrinisic.texi (OpenMP Modules OMP_LIB and OMP_LIB_KINDS):
239 Add undocumented parameters from omp_lib.f90.in.
240
241 2020-02-03 Tobias Burnus <tobias@codesourcery.com>
242
243 PR fortran/93427
244 * resolve.c (resolve_assoc_var): Remove too strict check.
245 * gfortran.dg/associate_51.f90: Update test case.
246
247 2020-02-01 Jakub Jelinek <jakub@redhat.com>
248
249 PR fortran/92305
250 * trans-types.c (gfc_get_function_type): Also push boolean_type_node
251 types for non-character scalar VALUE optional dummy arguments.
252 * trans-decl.c (create_function_arglist): Skip those in
253 hidden_typelist. Formatting fix.
254
255 2020-01-31 Tobias Burnus <tobias@codesourcery.com>
256
257 PR fortran/93462
258 * frontend-passes.c (gfc_code_walker): For EXEC_OACC_ATOMIC, set
259 in_omp_atomic to true prevent front-end optimization.
260
261 2020-01-30 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
262
263 PR fortran/87103
264 * expr.c (gfc_check_conformance): Check vsnprintf for truncation.
265 * iresolve.c (gfc_get_string): Likewise.
266 * symbol.c (gfc_new_symbol): Remove check for maximum symbol
267 name length. Remove redundant 0 setting of new calloc()ed
268 gfc_symbol.
269
270 2020-01-30 Paul Thomas  <pault@gcc.gnu.org>
271 Jakub Jelinek <jakub@redhat.com>
272
273 PR fortran/92123
274 * trans-decl.c (gfc_get_symbol_decl): Call gfc_defer_symbol_init for
275 CFI descs.
276 (gfc_build_builtin_function_decls): Use ".w." instead of ".ww" or ".wR"
277 for gfor_fndecl_{cfi_to_gfc,gfc_to_cfi}.
278 (convert_CFI_desc): Handle references to CFI descriptors.
279
280 2020-01-29 Jakub Jelinek <jakub@redhat.com>
281
282 PR fortran/93463
283 * openmp.c (oacc_code_to_statement): Handle
284 EXEC_OACC_{ROUTINE,UPDATE,WAIT,CACHE,{ENTER,EXIT}_DATA,DECLARE}.
285
286 2020-01-28 Andrew Benson <abensonca@gmail.com>
287
288 PR fortran/93461
289 * trans.h: Increase GFC_MAX_MANGLED_SYMBOL_LEN to
290 GFC_MAX_SYMBOL_LEN*3+5 to allow for inclusion of submodule name,
291 plus the "." between module and submodule names.
292 * gfortran.dg/pr93461.f90: New test.
293
294 2020-01-28 Andrew Benson <abensonca@gmail.com>
295
296 PR fortran/93473
297 * parse.c: Increase length of char variables to allow them to hold
298 a concatenated module + submodule name.
299 * gfortran.dg/pr93473.f90: New test.
300
301 2020-01-28 Julian Brown <julian@codesourcery.com>
302
303 PR fortran/93025
304 * openmp.c (resolve_omp_clauses): Check array references for contiguity.
305
306 2020-01-28 Julian Brown <julian@codesourcery.com>
307
308 * gfortran.h (gfc_symbol): Add comp_mark bitfield.
309 * openmp.c (resolve_omp_clauses): Disallow mixed component and
310 full-derived-type accesses to the same variable within a single
311 directive.
312
313 2020-01-28 Tobias Burnus <tobias@codesourcery.com>
314
315 PR fortran/93464
316 * openmp.c (gfc_omp_check_optional_argument): Avoid ICE when
317 DECL_LANG_SPECIFIC and GFC_DESCRIPTOR_TYPE_P but not
318 GFC_DECL_SAVED_DESCRIPTOR as for local allocatable character vars.
319
320 2020-01-28 Tobias Burnus <tobias@codesourcery.com>
321
322 * gfortran.texi (Runtime): Remove tailing '.' in @menu.
323
324 2020-01-27 Tobias Burnus <tobias@codesourcery.com>
325
326 PR fortran/85781
327 * trans-expr.c (gfc_conv_substring): Handle non-ARRAY_TYPE strings
328 of Bind(C) procedures.
329
330 2020-01-22 Jakub Jelinek <jakub@redhat.com>
331
332 * parse.c (parse_omp_structured_block): Handle ST_OMP_TARGET_PARALLEL.
333 * trans-openmp.c (gfc_trans_omp_target)
334 <case EXEC_OMP_TARGET_PARALLEL>: Call pushlevel first.
335
336 PR fortran/93329
337 * openmp.c (omp_code_to_statement): Handle remaining EXEC_OMP_*
338 cases.
339
340 2020-01-21 Tobias Burnus <tobias@codesourcery.com>
341
342 PR fortran/93309
343 * interface.c (gfc_procedure_use): Also check parent namespace for
344 'implict none (external)'.
345 * symbol.c (gfc_get_namespace): Don't set has_implicit_none_export
346 to parent namespace's setting.
347
348 2020-01-19 Thomas König <tkoenig@gcc.gnu.org>
349
350 PR fortran/44960
351 * primary.c (gfc_match_rvalue): Break after setting MATCH_ERROR.
352 * resolve.c (resolve_function): Issue error when a
353 function call contains a reference.
354
355 2020-01-17 Mark Eggleston <mark.eggleston@codethink.com>
356
357 PR fortran/93236
358 * resolve.c (resolve_types): Declare boolean recursive and set with the
359 value of the recursive attribute of namespace proc_name symbol
360 structure if it exists. Call gfc_save_all if both flag_automatic and
361 recursive are false or ns->save_all is true.
362
363 2020-01-16 Tobias Burnus <tobias@codesourcery.com>
364
365 PR fortran/93253
366 * check.c (gfc_invalid_boz): Mention -fallow-invalid-boz
367 in the error message.
368 * gfortran.texi (BOZ literal constants): List another missing
369 extension and refer to -fallow-invalid-boz.
370 * lang.opt (fallow-invalid-boz): Also mention 'X' in the help text
371 as it is not covered by the previous wording.
372 * primary.c (match_boz_constant): Tweak wording such that it is
373 clear how to fix the nonstandard use.
374
375 2020-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
376
377 PR fortran/65428
378 * array.c (empty_constructor): New variable.
379 (empty_ts): New variable.
380 (expand_constructor): Save typespec in empty_ts.
381 Unset empty_constructor if there is an element.
382 (gfc_expand_constructor): Initialize empty_constructor
383 and empty_ts. If there was no explicit constructor
384 type and the constructor is empty, take the type from
385 empty_ts.
386
387 2020-01-09 Tobias Burnus <tobias@codesourcery.com>
388
389 PR fortran/84135
390 * array.c (gfc_set_array_spec): Fix shifting of codimensions
391 when adding a dimension.
392 * decl.c (merge_array_spec): Ditto. Fix using correct codimensions.
393
394 2020-01-07 Jakub Jelinek <jakub@redhat.com>
395
396 PR fortran/93162
397 * trans-openmp.c (gfc_trans_omp_clauses): Check for REF_ARRAY type
398 before testing u.ar.type == AR_FULL.
399
400 2020-01-04 Tobias Burnus <tobias@codesourcery.com>
401
402 PR fortran/91640
403 * trans-expr.c (gfc_conv_procedure_call): Avoid copy-out for nonvariable
404 arguments to contiguous dummy args. Avoid re-checking whether fsym is
405 NULL.
406
407 2020-01-03 Tobias Burnus <tobias@codesourcery.com>
408
409 * trans-openmp.c (gfc_omp_check_optional_argument): Always return a
410 Boolean expression; handle unallocated/disassociated actual arguments
411 as absent if passed to nonallocatable/nonpointer dummy array arguments.
412 (gfc_build_cond_assign): Change to assume a Boolean expr not a pointer.
413 (gfc_omp_finish_clause, gfc_trans_omp_clauses): Assign NULL to generated
414 array-data variable if the argument is absent. Simplify code as
415 'present' is now a Boolean expression.
416
417 2020-01-03 Tobias Burnus <tobias@codesourcery.com>
418
419 PR fortran/92994
420 * primary.c (gfc_match_rvalue): Add some flavor checks
421 gfc_matching_procptr_assignment.
422 * resolve.c (resolve_assoc_var): Add more checks for invalid targets.
423
424 2020-01-02 Tobias Burnus <tobias@codesourcery.com>
425
426 PR fortran/68020
427 * array.c (gfc_match_array_spec): Fix implied-type matching
428 for rank > 2.
429
430 2020-01-01 Thomas Koenig <tkoenig@gcc.gnu.org>
431
432 PR fortran/93113
433 * dependency.c (gfc_dep_resolver): Handle REF_INQUIRY in switch
434 for ref types.
435
436 2020-01-01 Jakub Jelinek <jakub@redhat.com>
437
438 Update copyright years.
439
440 * gfortranspec.c (lang_specific_driver): Update copyright notice
441 dates.
442 * gfc-internals.texi: Bump @copying's copyright year.
443 * gfortran.texi: Ditto.
444 * intrinsic.texi: Ditto.
445 * invoke.texi: Ditto.
446 \f
447 Copyright (C) 2020 Free Software Foundation, Inc.
448
449 Copying and distribution of this file, with or without modification,
450 are permitted in any medium without royalty provided the copyright
451 notice and this notice are preserved.