]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / fortran / ChangeLog
1 2021-09-17 Harald Anlauf <anlauf@gmx.de>
2
3 PR fortran/102366
4 * trans-decl.c (gfc_finish_var_decl): Disable the warning message
5 for variables moved from stack to static storange if they are
6 declared in the main, but allow the move to happen.
7
8 2021-09-17 Sandra Loosemore <sandra@codesourcery.com>
9
10 * intrinsic.texi (ISO_C_BINDING): Change C_FLOAT128 to correspond
11 to _Float128 rather than __float128.
12 * iso-c-binding.def (c_float128): Update comments.
13 * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Likewise.
14 (build_round_expr): Likewise.
15 (gfc_build_intrinsic_lib_fndcecls): Likewise.
16 * trans-types.h (gfc_real16_is_float128): Likewise.
17
18 2021-09-16 Harald Anlauf <anlauf@gmx.de>
19
20 PR fortran/102287
21 * trans-expr.c (gfc_conv_procedure_call): Wrap deallocation of
22 allocatable components of optional allocatable derived type
23 procedure arguments with INTENT(OUT) into a presence check.
24
25 2021-09-14 Harald Anlauf <anlauf@gmx.de>
26
27 PR fortran/102311
28 * resolve.c (resolve_entries): Attempt to recover cleanly after
29 rejecting mismatched function entries.
30
31 2021-09-14 Tobias Burnus <tobias@codesourcery.com>
32
33 PR fortran/102313
34 * parse.c (gfc_ascii_statement): Add missing ST_OMP_END_SCOPE.
35
36 2021-09-13 Harald Anlauf <anlauf@gmx.de>
37
38 PR fortran/82314
39 * decl.c (add_init_expr_to_sym): For proper initialization of
40 array-valued named constants the array bounds need to be
41 simplified before adding the initializer.
42
43 2021-09-13 Harald Anlauf <anlauf@gmx.de>
44
45 PR fortran/85130
46 * expr.c (find_substring_ref): Handle given substring start and
47 end indices as signed integers, not unsigned.
48
49 2021-09-09 Harald Anlauf <anlauf@gmx.de>
50
51 PR fortran/98490
52 * trans-expr.c (gfc_conv_substring): Do not generate substring
53 bounds check for implied do loop index variable before it actually
54 becomes defined.
55
56 2021-09-08 liuhongt <hongtao.liu@intel.com>
57
58 * options.c (gfc_post_options): Issue an error for
59 -fexcess-precision=16.
60
61 2021-09-07 Harald Anlauf <anlauf@gmx.de>
62
63 PR fortran/101327
64 * expr.c (find_array_element): When bounds cannot be determined as
65 constant, return error instead of aborting.
66
67 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
68
69 * openmp.c (gfc_match_omp_flush): Parse 'seq_cst' clause on 'flush'
70 directive.
71 * trans-openmp.c (gfc_trans_omp_flush): Handle OMP_MEMORDER_SEQ_CST.
72
73 2021-09-03 Tobias Burnus <tobias@codesourcery.com>
74
75 * decl.c (gfc_verify_c_interop_param): Reject pointer with
76 CONTIGUOUS attributes as dummy arg. Reject character len > 1
77 when passed as byte stream.
78
79 2021-09-01 Harald Anlauf <anlauf@gmx.de>
80
81 PR fortran/56985
82 * resolve.c (resolve_common_vars): Fix grammar and improve wording
83 of error message rejecting an unlimited polymorphic in COMMON.
84
85 2021-08-31 Harald Anlauf <anlauf@gmx.de>
86
87 PR fortran/100950
88 * simplify.c (substring_has_constant_len): Minimize checks for
89 substring expressions being allowed.
90
91 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
92
93 * gfortran.h: Add variable for 'ancestor' in struct gfc_omp_clauses.
94 * openmp.c (gfc_match_omp_clauses): Parse device-modifiers 'device_num'
95 and 'ancestor' in 'target device' clauses.
96 * trans-openmp.c (gfc_trans_omp_clauses): Set OMP_CLAUSE_DEVICE_ANCESTOR.
97
98 2021-08-30 Harald Anlauf <anlauf@gmx.de>
99
100 PR fortran/102113
101 * match.c (gfc_match_goto): Allow for whitespace in parsing list
102 of labels.
103
104 2021-08-30 Harald Anlauf <anlauf@gmx.de>
105
106 PR fortran/101349
107 * resolve.c (resolve_allocate_expr): An unlimited polymorphic
108 argument to ALLOCATE must be ALLOCATABLE or a POINTER. Fix the
109 corresponding check.
110
111 2021-08-28 Harald Anlauf <anlauf@gmx.de>
112
113 PR fortran/87737
114 * resolve.c (resolve_entries): For functions of type CHARACTER
115 tighten the checks for matching characteristics.
116
117 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
118
119 PR other/93067
120 * cpp.c (gfc_cpp_post_options): Call new function
121 diagnostic_initialize_input_context().
122
123 2021-08-24 Harald Anlauf <anlauf@gmx.de>
124
125 PR fortran/98411
126 * trans-decl.c (gfc_finish_var_decl): Adjust check to handle
127 implicit SAVE as well as variables in the main program. Improve
128 warning message text.
129
130 2021-08-23 Tobias Burnus <tobias@codesourcery.com>
131
132 * openmp.c (gfc_match_dupl_check, gfc_match_dupl_memorder,
133 gfc_match_dupl_atomic): New.
134 (gfc_match_omp_clauses): Use them; remove duplicate
135 'release'/'relaxed' clause matching; improve error dignostic
136 for 'default'.
137
138 2021-08-23 Tobias Burnus <tobias@codesourcery.com>
139
140 * dump-parse-tree.c (show_omp_clauses): Handle 'strict' modifier
141 on grainsize/num_tasks
142 * gfortran.h (gfc_omp_clauses): Add grainsize_strict
143 and num_tasks_strict.
144 * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses):
145 Handle 'strict' modifier on grainsize/num_tasks.
146 * openmp.c (gfc_match_omp_clauses): Likewise.
147
148 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
149
150 * error.c
151 (error_uinteger): Take 'long long unsigned' instead
152 of 'long unsigned' as argumpent.
153 (error_integer): Take 'long long' instead of 'long'.
154 (error_hwuint, error_hwint): New.
155 (error_print): Update to handle 'll' and 'w'
156 length modifiers.
157 * simplify.c (substring_has_constant_len): Use '%wd'
158 in gfc_error.
159
160 2021-08-20 Harald Anlauf <anlauf@gmx.de>
161
162 PR fortran/100950
163 * simplify.c (substring_has_constant_len): Fix format string of
164 gfc_error, pass HOST_WIDE_INT bounds values via char buffer.
165
166 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
167
168 * dump-parse-tree.c (show_omp_clauses): Handle 'at', 'severity'
169 and 'message' clauses.
170 (show_omp_node, show_code_node): Handle EXEC_OMP_ERROR.
171 * gfortran.h (gfc_statement): Add ST_OMP_ERROR.
172 (gfc_omp_severity_type, gfc_omp_at_type): New.
173 (gfc_omp_clauses): Add 'at', 'severity' and 'message' clause;
174 use more bitfields + ENUM_BITFIELD.
175 (gfc_exec_op): Add EXEC_OMP_ERROR.
176 * match.h (gfc_match_omp_error): New.
177 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_(AT,SEVERITY,MESSAGE).
178 (gfc_match_omp_clauses): Handle new clauses.
179 (OMP_ERROR_CLAUSES, gfc_match_omp_error): New.
180 (resolve_omp_clauses): Resolve new clauses.
181 (omp_code_to_statement, gfc_resolve_omp_directive): Handle
182 EXEC_OMP_ERROR.
183 * parse.c (decode_omp_directive, next_statement,
184 gfc_ascii_statement): Handle 'omp error'.
185 * resolve.c (gfc_resolve_blocks): Likewise.
186 * st.c (gfc_free_statement): Likewise.
187 * trans-openmp.c (gfc_trans_omp_error): Likewise.
188 (gfc_trans_omp_directive): Likewise.
189 * trans.c (trans_code): Likewise.
190
191 2021-08-20 Jakub Jelinek <jakub@redhat.com>
192
193 * types.def (BT_FN_VOID_CONST_PTR_SIZE): New DEF_FUNCTION_TYPE_2.
194 * f95-lang.c (ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST): Define.
195
196 2021-08-19 Harald Anlauf <anlauf@gmx.de>
197
198 PR fortran/100950
199 * simplify.c (substring_has_constant_len): New.
200 (gfc_simplify_len): Handle case of substrings with constant
201 bounds.
202
203 2021-08-18 Tobias Burnus <tobias@codesourcery.com>
204
205 * match.h (gfc_match_omp_nothing): New.
206 * openmp.c (gfc_match_omp_nothing): New.
207 * parse.c (decode_omp_directive): Match 'nothing' directive.
208
209 2021-08-17 Tobias Burnus <tobias@codesourcery.com>
210
211 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
212 EXEC_OMP_SCOPE.
213 * gfortran.h (enum gfc_statement): Add ST_OMP_(END_)SCOPE.
214 (enum gfc_exec_op): Add EXEC_OMP_SCOPE.
215 * match.h (gfc_match_omp_scope): New.
216 * openmp.c (OMP_SCOPE_CLAUSES): Define
217 (gfc_match_omp_scope): New.
218 (gfc_match_omp_cancellation_point, gfc_match_omp_end_nowait):
219 Improve error diagnostic.
220 (omp_code_to_statement): Handle ST_OMP_SCOPE.
221 (gfc_resolve_omp_directive): Handle EXEC_OMP_SCOPE.
222 * parse.c (decode_omp_directive, next_statement,
223 gfc_ascii_statement, parse_omp_structured_block,
224 parse_executable): Handle OpenMP's scope construct.
225 * resolve.c (gfc_resolve_blocks): Likewise
226 * st.c (gfc_free_statement): Likewise
227 * trans-openmp.c (gfc_trans_omp_scope): New.
228 (gfc_trans_omp_directive): Call it.
229 * trans.c (trans_code): handle EXEC_OMP_SCOPE.
230
231 2021-08-16 Tobias Burnus <tobias@codesourcery.com>
232
233 * dump-parse-tree.c (show_omp_clauses): Handle 'filter' clause.
234 (show_omp_node, show_code_node): Handle (combined) omp masked construct.
235 * frontend-passes.c (gfc_code_walker): Likewise.
236 * gfortran.h (enum gfc_statement): Add ST_OMP_*_MASKED*.
237 (enum gfc_exec_op): Add EXEC_OMP_*_MASKED*.
238 * match.h (gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
239 gfc_match_omp_masked_taskloop_simd, gfc_match_omp_parallel_masked,
240 gfc_match_omp_parallel_masked_taskloop,
241 gfc_match_omp_parallel_masked_taskloop_simd): New prototypes.
242 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_FILTER.
243 (gfc_match_omp_clauses): Match it.
244 (OMP_MASKED_CLAUSES, gfc_match_omp_parallel_masked,
245 gfc_match_omp_parallel_masked_taskloop,
246 gfc_match_omp_parallel_masked_taskloop_simd,
247 gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
248 gfc_match_omp_masked_taskloop_simd): New.
249 (resolve_omp_clauses): Resolve filter clause.
250 (gfc_resolve_omp_parallel_blocks, resolve_omp_do,
251 omp_code_to_statement, gfc_resolve_omp_directive): Handle
252 omp masked constructs.
253 * parse.c (decode_omp_directive, case_exec_markers,
254 gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
255 parse_executable): Likewise.
256 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
257 * st.c (gfc_free_statement): Likewise.
258 * trans-openmp.c (gfc_trans_omp_clauses): Handle filter clause.
259 (GFC_OMP_SPLIT_MASKED, GFC_OMP_MASK_MASKED): New enum values.
260 (gfc_trans_omp_masked): New.
261 (gfc_split_omp_clauses): Handle combined masked directives.
262 (gfc_trans_omp_master_taskloop): Rename to ...
263 (gfc_trans_omp_master_masked_taskloop): ... this; handle also
264 combined masked directives.
265 (gfc_trans_omp_parallel_master): Rename to ...
266 (gfc_trans_omp_parallel_master_masked): ... this; handle
267 combined masked directives.
268 (gfc_trans_omp_directive): Handle EXEC_OMP_*_MASKED*.
269 * trans.c (trans_code): Likewise.
270
271 2021-08-15 Harald Anlauf <anlauf@gmx.de>
272
273 PR fortran/99351
274 * match.c (sync_statement): Replace %v code by %e in gfc_match to
275 allow for function references as STAT and ERRMSG arguments.
276 * resolve.c (resolve_sync): Adjust checks of STAT= and ERRMSG= to
277 being definable arguments. Function references with a data
278 pointer result are accepted.
279 * trans-stmt.c (gfc_trans_sync): Adjust assertion.
280
281 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
282
283 * gfortran.h (gfc_omp_proc_bind_kind): Add OMP_PROC_BIND_PRIMARY.
284 * dump-parse-tree.c (show_omp_clauses): Add TODO comment to
285 change 'master' to 'primary' in proc_bind for OpenMP 5.1.
286 * intrinsic.texi (OMP_LIB): Mention OpenMP 5.1; add
287 omp_proc_bind_primary.
288 * openmp.c (gfc_match_omp_clauses): Accept
289 'primary' as alias for 'master'.
290 * trans-openmp.c (gfc_trans_omp_clauses): Handle
291 OMP_PROC_BIND_PRIMARY.
292
293 2021-08-11 Sandra Loosemore <sandra@codesourcery.com>
294
295 * iso-c-binding.def (c_float128, c_float128_complex): Check
296 float128_type_node instead of gfc_float128_type_node.
297 * trans-types.c (gfc_init_kinds, gfc_build_real_type):
298 Update comments re supported 128-bit floating-point types.
299
300 2021-08-11 Richard Biener <rguenther@suse.de>
301
302 * trans-common.c (create_common): Set TREE_THIS_VOLATILE on the
303 COMPONENT_REF if the field is volatile.
304
305 2021-08-07 Harald Anlauf <anlauf@gmx.de>
306
307 PR fortran/68568
308 * primary.c (gfc_expr_attr): Variable attribute can only be
309 inquired when symtree is non-NULL.
310
311 2021-07-28 Harald Anlauf <anlauf@gmx.de>
312
313 PR fortran/101564
314 * expr.c (gfc_check_vardef_context): Add check for KIND and LEN
315 parameter inquiries.
316 * match.c (gfc_match): Fix comment for %v code.
317 (gfc_match_allocate, gfc_match_deallocate): Replace use of %v code
318 by %e in gfc_match to allow for function references as STAT and
319 ERRMSG arguments.
320 * resolve.c (resolve_allocate_deallocate): Avoid NULL pointer
321 dereferences and shortcut for bad STAT and ERRMSG argument to
322 (DE)ALLOCATE. Remove bogus parts of checks for STAT and ERRMSG.
323
324 2021-07-26 José Rui Faustino de Sousa <jrfsousa@gmail.com>
325 Tobias Burnus <tobias@codesourcery.com>
326
327 PR fortran/93308
328 PR fortran/93963
329 PR fortran/94327
330 PR fortran/94331
331 PR fortran/97046
332 * trans-decl.c (convert_CFI_desc): Only copy out the descriptor
333 if necessary.
334 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Updated attribute
335 handling which reflect a previous intermediate version of the
336 standard. Only copy out the descriptor if necessary.
337
338 2021-07-23 Harald Anlauf <anlauf@gmx.de>
339
340 PR fortran/101536
341 * check.c (array_check): Adjust check for the case of CLASS
342 arrays.
343
344 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
345 Joseph Myers <joseph@codesourcery.com>
346 Cesar Philippidis <cesar@codesourcery.com>
347
348 * dump-parse-tree.c (show_attr): Update.
349 * gfortran.h (symbol_attribute): Add 'oacc_routine_nohost' member.
350 (gfc_omp_clauses): Add 'nohost' member.
351 * module.c (ab_attribute): Add 'AB_OACC_ROUTINE_NOHOST'.
352 (attr_bits, mio_symbol_attribute): Update.
353 * openmp.c (omp_mask2): Add 'OMP_CLAUSE_NOHOST'.
354 (gfc_match_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
355 (OACC_ROUTINE_CLAUSES): Add 'OMP_CLAUSE_NOHOST'.
356 (gfc_match_oacc_routine): Update.
357 * trans-decl.c (add_attributes_to_decl): Update.
358 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
359
360 2021-07-21 Harald Anlauf <anlauf@gmx.de>
361
362 PR fortran/101514
363 * target-memory.c (gfc_interpret_derived): Size of array component
364 of derived type can only be computed here for explicit shape.
365 * trans-types.c (gfc_get_nodesc_array_type): Do not dereference
366 NULL pointers.
367
368 2021-07-21 Tobias Burnus <tobias@codesourcery.com>
369
370 * decl.c (gfc_verify_c_interop_param): Update for F2008 + F2018
371 changes; reject unsupported bits with 'Error: Sorry,'.
372 * trans-expr.c (gfc_conv_procedure_call): Fix condition to
373 For using CFI descriptor with characters.
374
375 2021-07-18 Harald Anlauf <anlauf@gmx.de>
376
377 PR fortran/101084
378 * io.c (resolve_tag_format): Extend FORMAT check to unknown type.
379
380 2021-07-14 Harald Anlauf <anlauf@gmx.de>
381
382 PR fortran/100949
383 * trans-expr.c (gfc_trans_class_init_assign): Call
384 gfc_conv_expr_present only for dummy variables.
385
386 2021-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
387
388 PR fortran/100227
389 * frontend-passes.c (traverse_io_block): Adjust test for
390 when a variable is eligible for the transformation to
391 array slice.
392
393 2021-06-28 Martin Sebor <msebor@redhat.com>
394
395 * trans-array.c (trans_array_constructor): Replace direct uses
396 of TREE_NO_WARNING with warning_suppressed_p, and suppress_warning.
397 * trans-decl.c (gfc_build_qualified_array): Same.
398 (gfc_build_dummy_array_decl): Same.
399 (generate_local_decl): Same.
400 (gfc_generate_function_code): Same.
401 * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
402 (gfc_omp_clause_copy_ctor): Same.
403 * trans-types.c (get_dtype_type_node): Same.
404 (gfc_get_desc_dim_type): Same.
405 (gfc_get_array_descriptor_base): Same.
406 (gfc_get_caf_vector_type): Same.
407 (gfc_get_caf_reference_type): Same.
408 * trans.c (gfc_create_var_np): Same.
409
410 2021-06-23 Tobias Burnus <tobias@codesourcery.com>
411
412 * dump-parse-tree.c (show_omp_clauses): Fix enum type used
413 for dumping gfc_omp_defaultmap_category.
414
415 2021-06-23 Andre Vehreschild <vehre@gcc.gnu.org>
416
417 PR fortran/100337
418 * trans-intrinsic.c (conv_co_collective): Check stat for null ptr
419 before dereferrencing.
420
421 2021-06-18 Harald Anlauf <anlauf@gmx.de>
422
423 PR fortran/100283
424 PR fortran/101123
425 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Unconditionally
426 convert result of min/max to result type.
427
428 2021-06-16 Harald Anlauf <anlauf@gmx.de>
429
430 PR fortran/95501
431 PR fortran/95502
432 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
433 dereference.
434 * match.c (gfc_match_pointer_assignment): Likewise.
435 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
436 symtree.
437
438 2021-06-16 Harald Anlauf <anlauf@gmx.de>
439
440 Revert:
441 2021-06-16 Harald Anlauf <anlauf@gmx.de>
442
443 PR fortran/95501
444 PR fortran/95502
445 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
446 dereference.
447 * match.c (gfc_match_pointer_assignment): Likewise.
448 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
449 symtree.
450
451 2021-06-16 Harald Anlauf <anlauf@gmx.de>
452
453 PR fortran/95501
454 PR fortran/95502
455 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
456 dereference.
457 * match.c (gfc_match_pointer_assignment): Likewise.
458 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
459 symtree.
460
461 2021-06-15 Tobias Burnus <tobias@codesourcery.com>
462
463 PR fortran/92568
464 * dump-parse-tree.c (show_omp_clauses): Update for defaultmap.
465 * f95-lang.c (LANG_HOOKS_OMP_ALLOCATABLE_P,
466 LANG_HOOKS_OMP_SCALAR_TARGET_P): New.
467 * gfortran.h (enum gfc_omp_defaultmap,
468 enum gfc_omp_defaultmap_category): New.
469 * openmp.c (gfc_match_omp_clauses): Update defaultmap matching.
470 * trans-decl.c (gfc_finish_decl_attrs): Set GFC_DECL_SCALAR_TARGET.
471 * trans-openmp.c (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
472 (gfc_omp_scalar_p): Take 'ptr_alloc_ok' argument.
473 (gfc_trans_omp_clauses, gfc_split_omp_clauses): Update for
474 defaultmap changes.
475 * trans.h (gfc_omp_scalar_p): Update prototype.
476 (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
477 (struct lang_decl): Add scalar_target.
478 (GFC_DECL_SCALAR_TARGET, GFC_DECL_GET_SCALAR_TARGET): New.
479
480 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
481
482 * resolve.c (resolve_variable): Remove *XCNEW used to
483 nullify nullified memory.
484
485 2021-06-09 Martin Liska <mliska@suse.cz>
486
487 * intrinsic.texi: Add missing @headitem to tables with a header.
488
489 2021-06-09 Jakub Jelinek <jakub@redhat.com>
490
491 PR fortran/100965
492 * trans-openmp.c (gfc_omp_finish_clause): Gimplify OMP_CLAUSE_SIZE.
493
494 2021-06-08 Tobias Burnus <tobias@codesourcery.com>
495
496 PR middle-end/99928
497 * trans-openmp.c (gfc_add_clause_implicitly): New.
498 (gfc_split_omp_clauses): Use it.
499 (gfc_free_split_omp_clauses): New.
500 (gfc_trans_omp_do_simd, gfc_trans_omp_parallel_do,
501 gfc_trans_omp_parallel_do_simd, gfc_trans_omp_distribute,
502 gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_taskloop,
503 gfc_trans_omp_master_taskloop, gfc_trans_omp_parallel_master): Use it.
504
505 2021-06-08 Martin Liska <mliska@suse.cz>
506
507 * intrinsic.texi: Fix typo.
508 * trans-expr.c (gfc_trans_pointer_assignment): Likewise.
509
510 2021-06-05 José Rui Faustino de Sousa <jrfsousa@gmail.com>
511
512 PR fortran/100120
513 PR fortran/100816
514 PR fortran/100818
515 PR fortran/100819
516 PR fortran/100821
517 * trans-array.c (gfc_get_array_span): rework the way character
518 array "span" was calculated.
519 (gfc_conv_expr_descriptor): improve handling of character sections
520 and unlimited polymorphic objects.
521 * trans-expr.c (gfc_get_character_len): new function to calculate
522 character string length.
523 (gfc_get_character_len_in_bytes): new function to calculate
524 character string length in bytes.
525 (gfc_conv_scalar_to_descriptor): add call to set the "span".
526 (gfc_trans_pointer_assignment): set "_len" and antecipate the
527 initialization of the deferred character length hidden argument.
528 * trans-intrinsic.c (gfc_conv_associated): set "force_no_tmp" to
529 avoid the creation of a temporary.
530 * trans-types.c (gfc_get_dtype_rank_type): rework type detection
531 so that unlimited polymorphic objects get proper type infomation,
532 also important for bind(c).
533 (gfc_get_dtype): add argument to pass the rank if necessary.
534 (gfc_get_array_type_bounds): cosmetic change to have character
535 arrays called character instead of unknown.
536 * trans-types.h (gfc_get_dtype): modify prototype.
537 * trans.c (get_array_span): rework the way character array "span"
538 was calculated.
539 * trans.h (gfc_get_character_len): new prototype.
540 (gfc_get_character_len_in_bytes): new prototype.
541 Add "unlimited_polymorphic" flag to "gfc_se" type to signal when
542 expression carries an unlimited polymorphic object.
543
544 2021-06-04 Harald Anlauf <anlauf@gmx.de>
545
546 PR fortran/99839
547 * frontend-passes.c (inline_matmul_assign): Do not inline matmul
548 if the assignment to the resulting array if it is not of canonical
549 type (real/integer/complex/logical).
550
551 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
552
553 * dump-parse-tree.c (show_code_node): Handle
554 EXEC_OMP_(TARGET_)(,PARALLEL_,TEAMS_)LOOP.
555
556 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
557
558 * scanner.c (skip_fixed_omp_sentinel): Set openacc_flag if
559 this is not an (OpenMP) continuation line.
560 (skip_fixed_oacc_sentinel): Likewise for openmp_flag and OpenACC.
561 (gfc_next_char_literal): gfc_error_now to force error for mixed OMP/ACC
562 continuation once per location and return '\n'.
563
564 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
565
566 PR middle-end/99928
567 * openmp.c (gfc_match_omp_clauses): Fix typo in error message.
568
569 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
570
571 PR middle-end/99928
572 * dump-parse-tree.c (show_omp_clauses): Handle bind clause.
573 (show_omp_node): Handle loop directive.
574 * frontend-passes.c (gfc_code_walker): Likewise.
575 * gfortran.h (enum gfc_statement): Add
576 ST_OMP_(END_)(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
577 (enum gfc_omp_bind_type): New.
578 (gfc_omp_clauses): Use it.
579 (enum gfc_exec_op): Add EXEC_OMP_(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
580 * match.h (gfc_match_omp_loop, gfc_match_omp_parallel_loop,
581 gfc_match_omp_target_parallel_loop, gfc_match_omp_target_teams_loop,
582 gfc_match_omp_teams_loop): New.
583 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_BIND.
584 (gfc_match_omp_clauses): Handle it.
585 (OMP_LOOP_CLAUSES, gfc_match_omp_loop, gfc_match_omp_teams_loop,
586 gfc_match_omp_target_teams_loop, gfc_match_omp_parallel_loop,
587 gfc_match_omp_target_parallel_loop): New.
588 (resolve_omp_clauses, resolve_omp_do, omp_code_to_statement,
589 gfc_resolve_omp_directive): Handle omp loop.
590 * parse.c (decode_omp_directive case_exec_markers, gfc_ascii_statement,
591 parse_omp_do, parse_executable): Likewise.
592 (parse_omp_structured_block): Remove ST_ which use parse_omp_do.
593 * resolve.c (gfc_resolve_blocks): Add omp loop.
594 * st.c (gfc_free_statement): Likewise.
595 * trans-openmp.c (gfc_trans_omp_clauses): Handle bind clause.
596 (gfc_trans_omp_do, gfc_trans_omp_parallel_do, gfc_trans_omp_distribute,
597 gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_directive):
598 Handle loop directive.
599 (gfc_split_omp_clauses): Likewise; fix firstprivate/lastprivate
600 and (in_)reduction for taskloop.
601 * trans.c (trans_code): Handle omp loop directive.
602
603 2021-06-01 Tobias Burnus <tobias@codesourcery.com>
604
605 PR middle-end/99928
606 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
607 (parallel) master taskloop (simd).
608 * frontend-passes.c (gfc_code_walker): Set in_omp_workshare
609 to false for parallel master taskloop (simd).
610 * gfortran.h (enum gfc_statement):
611 Add ST_OMP_(END_)(PARALLEL_)MASTER_TASKLOOP(_SIMD).
612 (enum gfc_exec_op): EXEC_OMP_(PARALLEL_)MASTER_TASKLOOP(_SIMD).
613 * match.h (gfc_match_omp_master_taskloop,
614 gfc_match_omp_master_taskloop_simd,
615 gfc_match_omp_parallel_master_taskloop,
616 gfc_match_omp_parallel_master_taskloop_simd): New prototype.
617 * openmp.c (gfc_match_omp_parallel_master_taskloop,
618 gfc_match_omp_parallel_master_taskloop_simd,
619 gfc_match_omp_master_taskloop,
620 gfc_match_omp_master_taskloop_simd): New.
621 (gfc_match_omp_taskloop_simd): Permit 'reduction' clause.
622 (resolve_omp_clauses): Handle new combined directives; remove
623 inscan-reduction check to reduce multiple errors; add
624 task-reduction error for 'taskloop simd'.
625 (gfc_resolve_omp_parallel_blocks,
626 resolve_omp_do, omp_code_to_statement,
627 gfc_resolve_omp_directive): Handle new combined constructs.
628 * parse.c (decode_omp_directive, next_statement,
629 gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
630 parse_executable): Likewise.
631 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
632 * st.c (gfc_free_statement): Likewise.
633 * trans.c (trans_code): Likewise.
634 * trans-openmp.c (gfc_split_omp_clauses,
635 gfc_trans_omp_directive): Likewise.
636 (gfc_trans_omp_parallel_master): Move after gfc_trans_omp_master_taskloop;
637 handle parallel master taskloop (simd) as well.
638 (gfc_trans_omp_taskloop): Take gfc_exec_op as arg.
639 (gfc_trans_omp_master_taskloop): New.
640
641 2021-05-30 Gerald Pfeifer <gerald@pfeifer.com>
642
643 * gfortran.texi (BOZ literal constants): Fix typo.
644
645 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
646
647 * dump-parse-tree.c (show_iterator): New.
648 (show_omp_namelist): Handle iterators.
649 (show_omp_clauses): Handle affinity.
650 * gfortran.h (gfc_free_omp_namelist): New union with 'udr' and new 'ns'.
651 * match.c (gfc_free_omp_namelist): Add are to choose union element.
652 * openmp.c (gfc_free_omp_clauses, gfc_match_omp_detach,
653 gfc_match_omp_clause_reduction, gfc_match_omp_flush): Update
654 call to gfc_free_omp_namelist.
655 (gfc_match_omp_variable_list): Likewise; permit preceeding whitespace.
656 (enum omp_mask1): Add OMP_CLAUSE_AFFINITY.
657 (gfc_match_iterator): New.
658 (gfc_match_omp_clauses): Use it; update call to gfc_free_omp_namelist.
659 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_AFFINITY.
660 (gfc_match_omp_taskwait): Match depend clause.
661 (resolve_omp_clauses): Handle affinity; update for udr/union change.
662 (gfc_resolve_omp_directive): Resolve clauses of taskwait.
663 * st.c (gfc_free_statement): Update gfc_free_omp_namelist call.
664 * trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Likewise
665 (handle_iterator): New.
666 (gfc_trans_omp_clauses): Handle iterators for depend/affinity clause.
667 (gfc_trans_omp_taskwait): Handle depend clause.
668 (gfc_trans_omp_directive): Update call.
669
670 2021-05-27 Harald Anlauf <anlauf@gmx.de>
671
672 PR fortran/100602
673 * trans-intrinsic.c (gfc_conv_intrinsic_size): Use CLASS data
674 attributes for CLASS arrays for generation of runtime error.
675
676 2021-05-27 Harald Anlauf <anlauf@gmx.de>
677
678 PR fortran/100656
679 * trans-array.c (gfc_conv_ss_startstride): Do not call check for
680 presence of a dummy argument when a symbol actually refers to a
681 non-dummy.
682
683 2021-05-25 Tobias Burnus <tobias@codesourcery.com>
684 Johannes Nendwich <a08727063@unet.univie.ac.at>
685
686 * intrinsic.texi (GERROR, GETARGS, GETLOG, NORM2, PARITY, RANDOM_INIT,
687 RANDOM_NUMBER): Fix typos and copy'n'paste errors.
688
689 2021-05-24 Tobias Burnus <tobias@codesourcery.com>
690
691 PR fortran/86470
692 * trans-expr.c (gfc_copy_class_to_class): Add unshare_expr.
693 * trans-openmp.c (gfc_is_polymorphic_nonptr,
694 gfc_is_unlimited_polymorphic_nonptr): New.
695 (gfc_omp_clause_copy_ctor, gfc_omp_clause_dtor): Handle
696 polymorphic scalars.
697
698 2021-05-23 Harald Anlauf <anlauf@gmx.de>
699
700 PR fortran/100551
701 * trans-expr.c (gfc_conv_procedure_call): Adjust check for
702 implicit conversion of actual argument to an unlimited polymorphic
703 procedure argument.
704
705 2021-05-23 Tobias Burnus <tobias@codesourcery.com>
706
707 * intrinsic.texi (ATOMIC_ADD, ATOMIC_FETCH_ADD): Use the
708 proper variable name in the description.
709
710 2021-05-22 Andre Vehreschild <vehre@gcc.gnu.org>
711 Steve Kargl <kargl@gcc.gnu.org>
712
713 PR fortran/98301
714 * trans-decl.c (gfc_build_builtin_function_decls): Move decl.
715 * trans-intrinsic.c (conv_intrinsic_random_init): Use bool for
716 lib-call of caf_random_init instead of logical (4-byte).
717 * trans.h: Add tree var for random_init.
718
719 2021-05-20 Marcel Vollweiler <marcel@codesourcery.com>
720
721 * openmp.c (gfc_match_omp_clauses): Support map-type-modifier 'close'.
722
723 2021-05-18 Tobias Burnus <tobias@codesourcery.com>
724
725 PR fortran/100642
726 * openmp.c (omp_code_to_statement): Add missing EXEC_OMP_DEPOBJ.
727
728 2021-05-17 Harald Anlauf <anlauf@gmx.de>
729
730 PR fortran/98411
731 * trans-decl.c (gfc_finish_var_decl): Add check for explicit SAVE
732 attribute.
733
734 2021-05-17 Tobias Burnus <tobias@codesourcery.com>
735
736 PR fortran/100633
737 * resolve.c (gfc_resolve_code): Reject nonintrinsic assignments in
738 OMP WORKSHARE.
739
740 2021-05-14 Tobias Burnus <tobias@codesourcery.com>
741
742 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
743 EXEC_OMP_PARALLEL_MASTER.
744 * frontend-passes.c (gfc_code_walker): Likewise.
745 * gfortran.h (enum gfc_statement): Add ST_OMP_PARALLEL_MASTER and
746 ST_OMP_END_PARALLEL_MASTER.
747 (enum gfc_exec_op): Add EXEC_OMP_PARALLEL_MASTER..
748 * match.h (gfc_match_omp_parallel_master): Handle it.
749 * openmp.c (gfc_match_omp_parallel_master, resolve_omp_clauses,
750 omp_code_to_statement, gfc_resolve_omp_directive): Likewise.
751 * parse.c (decode_omp_directive, case_exec_markers,
752 gfc_ascii_statement, parse_omp_structured_block,
753 parse_executable): Likewise.
754 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
755 * st.c (gfc_free_statement): Likewise.
756 * trans-openmp.c (gfc_trans_omp_parallel_master,
757 gfc_trans_omp_workshare, gfc_trans_omp_directive): Likewise.
758 * trans.c (trans_code): Likewise.
759
760 2021-05-14 Tobias Burnus <tobias@codesourcery.com>
761
762 * resolve.c (resolve_symbol): Handle implicit SAVE of main-program
763 for vars in 'omp threadprivate' and 'omp declare target'.
764
765 2021-05-10 Martin Liska <mliska@suse.cz>
766
767 * decl.c (variable_decl): Use startswith
768 function instead of strncmp.
769 (gfc_match_end): Likewise.
770 * gfortran.h (gfc_str_startswith): Likewise.
771 * module.c (load_omp_udrs): Likewise.
772 (read_module): Likewise.
773 * options.c (gfc_handle_runtime_check_option): Likewise.
774 * primary.c (match_arg_list_function): Likewise.
775 * trans-decl.c (gfc_get_symbol_decl): Likewise.
776 * trans-expr.c (gfc_conv_procedure_call): Likewise.
777 * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Likewise.
778
779 2021-05-06 Paul Thomas <pault@gcc.gnu.org>
780
781 PR fortran/46991
782 PR fortran/99819
783 * class.c (gfc_build_class_symbol): Remove the error that
784 disables assumed size class arrays. Class array types that are
785 not deferred shape or assumed rank are given a unique name and
786 placed in the procedure namespace.
787 * trans-array.c (gfc_trans_g77_array): Obtain the data pointer
788 for class arrays.
789 (gfc_trans_dummy_array_bias): Suppress the runtime error for
790 extent violations in explicit shape class arrays because it
791 always fails.
792 * trans-expr.c (gfc_conv_procedure_call): Handle assumed size
793 class actual arguments passed to non-descriptor formal args by
794 using the data pointer, stored as the symbol's backend decl.
795
796 2021-05-05 Harald Anlauf <anlauf@gmx.de>
797
798 PR fortran/100274
799 * interface.c (gfc_compare_actual_formal): Continue checks after
800 emitting warning for argument length mismatch.
801 * trans-expr.c (gfc_conv_procedure_call): Check for NULL pointer
802 dereference.
803
804 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
805
806 PR testsuite/100397
807 * trans-openmp.c (gfc_trans_omp_depobj): Fix pasto in enum values.
808
809 2021-04-28 Tobias Burnus <tobias@codesourcery.com>
810
811 * openmp.c (gfc_match_omp_variable_list): Gobble whitespace before
812 checking whether a '%' or parenthesis-open follows as next character.
813
814 2021-04-28 José Rui Faustino de Sousa <jrfsousa@gmail.com>
815
816 PR fortran/82376
817 * trans-expr.c (gfc_conv_procedure_call): Evaluate function result
818 and then pass a pointer.
819
820 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
821 Nathan Sidwell <nathan@codesourcery.com>
822 Tom de Vries <vries@codesourcery.com>
823 Julian Brown <julian@codesourcery.com>
824 Kwok Cheung Yeung <kcy@codesourcery.com>
825
826 * lang.opt (Wopenacc-parallelism): New.
827
828 2021-04-24 Harald Anlauf <anlauf@gmx.de>
829
830 PR fortran/100154
831 * check.c (variable_check): Allow function reference having a data
832 pointer result.
833 (arg_strlen_is_zero): New function.
834 (gfc_check_fgetputc_sub): Add static check of character and status
835 arguments.
836 (gfc_check_fgetput_sub): Likewise.
837 * intrinsic.c (add_subroutines): Fix argument name for the
838 character argument to intrinsic subroutines fget[c], fput[c].
839
840 2021-04-24 Harald Anlauf <anlauf@gmx.de>
841
842 PR fortran/100218
843 * expr.c (gfc_check_vardef_context): Extend check to allow pointer
844 from a function reference.
845
846 2021-04-22 Martin Liska <mliska@suse.cz>
847
848 PR testsuite/100159
849 PR testsuite/100192
850 * frontend-passes.c (optimize_expr): Fix typos and missing comments.
851
852 2021-04-22 Michael Meissner <meissner@linux.ibm.com>
853
854 PR fortran/96983
855 * trans-intrinsic.c (build_round_expr): If int type is larger than
856 long long, do the round and convert to the integer type. Do not
857 try to find a floating point type the exact size of the integer
858 type.
859
860 2021-04-21 Tobias Burnus <tobias@codesourcery.com>
861
862 * dump-parse-tree.c (show_omp_namelist): Handle depobj + mutexinoutset
863 in the depend clause.
864 (show_omp_clauses, show_omp_node, show_code_node): Handle depobj.
865 * gfortran.h (enum gfc_statement): Add ST_OMP_DEPOBJ.
866 (enum gfc_omp_depend_op): Add OMP_DEPEND_UNSET,
867 OMP_DEPEND_MUTEXINOUTSET and OMP_DEPEND_DEPOBJ.
868 (gfc_omp_clauses): Add destroy, depobj_update and depobj.
869 (enum gfc_exec_op): Add EXEC_OMP_DEPOBJ
870 * match.h (gfc_match_omp_depobj): Match 'omp depobj'.
871 * openmp.c (gfc_match_omp_clauses): Add depobj + mutexinoutset
872 to depend clause.
873 (gfc_match_omp_depobj, resolve_omp_clauses, gfc_resolve_omp_directive):
874 Handle 'omp depobj'.
875 * parse.c (decode_omp_directive, next_statement, gfc_ascii_statement):
876 Likewise.
877 * resolve.c (gfc_resolve_code): Likewise.
878 * st.c (gfc_free_statement): Likewise.
879 * trans-openmp.c (gfc_trans_omp_clauses): Handle depobj + mutexinoutset
880 in the depend clause.
881 (gfc_trans_omp_depobj, gfc_trans_omp_directive): Handle EXEC_OMP_DEPOBJ.
882 * trans.c (trans_code): Likewise.
883
884 2021-04-20 Paul Thomas <pault@gcc.gnu.org>
885
886 PR fortran/100110
887 * trans-decl.c (gfc_get_symbol_decl): Replace test for host
888 association with a check that the current and symbol namespaces
889 are the same.
890
891 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
892
893 * lang.opt (fopenacc-kernels=): Remove.
894
895 2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
896
897 PR fortran/100094
898 * trans-array.c (gfc_trans_deferred_array): Add code to initialize
899 pointers and allocatables with correct TKR parameters.
900
901 2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
902
903 PR fortran/100018
904 * resolve.c: Add association check before de-referencing pointer.
905
906 2021-04-16 Harald Anlauf <anlauf@gmx.de>
907 Paul Thomas <pault@gcc.gnu.org>
908
909 PR fortran/63797
910 * module.c (write_symtree): Do not write interface of intrinsic
911 procedure to module file for F2003 and newer.
912
913 2021-04-15 Paul Thomas <pault@gcc.gnu.org>
914
915 PR fortran/99307
916 * symbol.c: Remove trailing white space.
917 * trans-array.c (gfc_trans_create_temp_array): Create a class
918 temporary for class expressions and assign the new descriptor
919 to the data field.
920 (build_class_array_ref): If the class expr can be extracted,
921 then use that for 'decl'. Class function results are reliably
922 handled this way. Call gfc_find_and_cut_at_last_class_ref to
923 eliminate largely redundant code. Remove dead code and recast
924 the rest of the code to extract 'decl' for remaining cases.
925 Call gfc_build_spanned_array_ref.
926 (gfc_alloc_allocatable_for_assignment): Use class descriptor
927 element length for 'elemsize1'. Eliminate repeat set of dtype
928 for class expressions.
929 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Include
930 additional code from build_class_array_ref, and use optional
931 gfc_typespec pointer argument.
932 (gfc_trans_scalar_assign): Make use of pre and post blocks for
933 all class expressions.
934 * trans.c (get_array_span): For unlimited polymorphic exprs
935 multiply the span by the value of the _len field.
936 (gfc_build_spanned_array_ref): New function.
937 (gfc_build_array_ref): Call gfc_build_spanned_array_ref and
938 eliminate repeated code.
939 * trans.h: Add arg to gfc_find_and_cut_at_last_class_ref and
940 add prototype for gfc_build_spanned_array_ref.
941
942 2021-04-14 Martin Liska <mliska@suse.cz>
943
944 * intrinsic.texi: The table has first column empty and it makes
945 trouble when processing makeinfo --xml output.
946
947 2021-04-09 Tobias Burnus <tobias@codesourcery.com>
948
949 PR fortran/99817
950 * trans-types.c (gfc_get_function_type): Also generate hidden
951 coarray argument for character arguments.
952
953 2021-04-03 Paul Thomas <pault@gcc.gnu.org>
954
955 PR fortran/99818
956 * interface.c (compare_parameter): The codimension attribute is
957 applied to the _data field of class formal arguments.
958
959 2021-04-01 Harald Anlauf <anlauf@gmx.de>
960
961 PR fortran/99840
962 * simplify.c (gfc_simplify_transpose): Properly initialize
963 resulting shape.
964
965 2021-03-28 Paul Thomas <pault@gcc.gnu.org>
966
967 PR fortran/99602
968 * trans-expr.c (gfc_conv_procedure_call): Use the _data attrs
969 for class expressions and detect proc pointer evaluations by
970 the non-null actual argument list.
971
972 2021-03-27 Steve Kargl <kargl@gcc.gnu.org>
973
974 * misc.c (gfc_typename): Fix off-by-one in buffer sizes.
975
976 2021-03-26 Tobias Burnus <tobias@codesourcery.com>
977
978 PR fortran/99651
979 * intrinsic.c (gfc_intrinsic_func_interface): Set
980 attr.proc = PROC_INTRINSIC if FL_PROCEDURE.
981
982 2021-03-24 Tobias Burnus <tobias@codesourcery.com>
983
984 PR fortran/99369
985 * resolve.c (resolve_operator): Make 'msg' buffer larger
986 and use snprintf.
987
988 2021-03-23 Tobias Burnus <tobias@codesourcery.com>
989
990 PR fortran/93660
991 * trans-decl.c (build_function_decl): Add comment;
992 increment hidden_typelist for caf_token/caf_offset.
993 * trans-types.c (gfc_get_function_type): Add comment;
994 add missing caf_token/caf_offset args.
995
996 2021-03-22 Tobias Burnus <tobias@codesourcery.com>
997
998 PR fortran/99688
999 * match.c (select_type_set_tmp, gfc_match_select_type,
1000 gfc_match_select_rank): Fix 'name' buffersize to avoid out of bounds.
1001 * resolve.c (resolve_select_type): Likewise.
1002
1003 2021-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1004
1005 * frontend-passes.c (inline_limit_check): Add rank_a
1006 argument. If a is rank 1, set the second dimension to 1.
1007 (inline_matmul_assign): Pass rank_a argument to inline_limit_check.
1008 (call_external_blas): Likewise.
1009
1010 2021-03-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1011
1012 PR fortran/99345
1013 * frontend-passes.c (doloop_contained_procedure_code):
1014 Properly handle EXEC_IOLENGTH.
1015
1016 2021-03-15 Paul Thomas <pault@gcc.gnu.org>
1017
1018 PR fortran/99545
1019 * trans-stmt.c (gfc_trans_allocate): Mark the initialization
1020 assignment by setting init_flag.
1021
1022 2021-03-14 Harald Anlauf <anlauf@gmx.de>
1023 Paul Thomas <pault@gcc.gnu.org>
1024
1025 * trans-expr.c (gfc_conv_procedure_call): Fix runtime checks for
1026 CLASS arguments.
1027 * trans-intrinsic.c (gfc_conv_intrinsic_size): Likewise.
1028
1029 2021-03-13 Paul Thomas <pault@gcc.gnu.org>
1030
1031 PR fortran/99125
1032 * trans-array.c (gfc_conv_expr_descriptor): For deferred length
1033 length components use the ss_info string length instead of
1034 gfc_get_expr_charlen. Make sure that the deferred string length
1035 is a variable before assigning to it. Otherwise use the expr.
1036 * trans-expr.c (gfc_conv_string_length): Make sure that the
1037 deferred string length is a variable before assigning to it.
1038
1039 2021-03-12 Tobias Burnus <tobias@codesourcery.com>
1040
1041 PR fortran/99514
1042 * resolve.c (resolve_symbol): Accept vars which are in DATA
1043 and hence (either) implicit SAVE (or in common).
1044
1045 2021-03-10 Harald Anlauf <anlauf@gmx.de>
1046
1047 PR fortran/99205
1048 * data.c (gfc_assign_data_value): Reject non-constant character
1049 length for lvalue.
1050 * trans-array.c (gfc_conv_array_initializer): Restrict loop to
1051 elements which are defined to avoid NULL pointer dereference.
1052
1053 2021-03-10 Tobias Burnus <tobias@codesourcery.com>
1054
1055 * intrinsic.texi (MIN): Correct 'maximum' to 'minimum'.
1056
1057 2021-03-10 Eric Botcazou <ebotcazou@adacore.com>
1058
1059 PR fortran/96983
1060 * trans-intrinsic.c (build_round_expr): Do not implicitly assume
1061 that __float128 is the 128-bit floating-point type.
1062
1063 2021-03-08 Harald Anlauf <anlauf@gmx.de>
1064
1065 PR fortran/49278
1066 * data.c (gfc_assign_data_value): Reject variable with PARAMETER
1067 attribute in DATA statement.
1068
1069 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
1070
1071 PR fortran/99355
1072 PR fortran/57871
1073 * invoke.texi (-freal{4,8}-real-*): Extend description.
1074 * primary.c (match_real_constant): Also promote real literals
1075 with '_kind' number.
1076
1077 2021-03-04 Tobias Burnus <tobias@codesourcery.com>
1078
1079 PR fortran/99355
1080 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Avoid
1081 redoing kind conversions.
1082 * primary.c (match_real_constant): Likewise.
1083
1084 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1085
1086 PR fortran/99303
1087 * openmp.c (gfc_omp_requires_add_clause): Fix up diagnostic message
1088 wordings.
1089 (resolve_omp_clauses): Likewise.
1090
1091 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1092
1093 PR fortran/99300
1094 * frontend-passes.c (doloop_code): Replace double space in diagnostics
1095 with a single space.
1096
1097 2021-02-24 Paul Thomas <pault@gcc.gnu.org>
1098
1099 PR fortran/98342
1100 * trans-expr.c (gfc_conv_derived_to_class): Add optional arg.
1101 'derived_array' to hold the fixed, parmse expr in the case of
1102 assumed rank formal arguments. Deal with optional arguments.
1103 (gfc_conv_procedure_call): Null 'derived' array for each actual
1104 argument. Add its address to the call to gfc_conv_derived_to_
1105 class. Access the 'data' field of scalar descriptors before
1106 deallocating allocatable components. Also strip NOPs before the
1107 calls to gfc_deallocate_alloc_comp. Use 'derived' array as the
1108 input to gfc_deallocate_alloc_comp if it is available.
1109 * trans.h : Include the optional argument 'derived_array' to
1110 the prototype of gfc_conv_derived_to_class. The default value
1111 is NULL_TREE.
1112
1113 2021-02-23 Paul Thomas <pault@gcc.gnu.org>
1114
1115 PR fortran/99124
1116 * resolve.c (resolve_fl_procedure): Include class results in
1117 the test for F2018, C15100.
1118 * trans-array.c (get_class_info_from_ss): Do not use the saved
1119 descriptor to obtain the class expression for variables. Use
1120 gfc_get_class_from_expr instead.
1121
1122 2021-02-23 Harald Anlauf <anlauf@gmx.de>
1123
1124 PR fortran/99206
1125 * simplify.c (gfc_simplify_reshape): Set string length for
1126 character arguments.
1127
1128 2021-02-22 Tobias Burnus <tobias@codesourcery.com>
1129
1130 PR fortran/99171
1131 * trans-openmp.c (gfc_omp_is_optional_argument): Regard optional
1132 dummy procs as nonoptional as no special treatment is needed.
1133
1134 2021-02-21 Harald Anlauf <anlauf@gmx.de>
1135
1136 * trans-expr.c (gfc_conv_procedure_call): Do not add clobber to
1137 allocatable intent(out) argument.
1138
1139 2021-02-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1140
1141 PR fortran/98686
1142 * match.c (gfc_match_namelist): If BT_UNKNOWN, check for
1143 IMPLICIT NONE and and issue an error, otherwise set the type
1144 to its IMPLICIT type so that any subsequent use of objects will
1145 will confirm their types.
1146
1147 2021-02-19 Harald Anlauf <anlauf@gmx.de>
1148
1149 * symbol.c (gfc_add_flavor): Reverse order of conditions.
1150
1151 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1152
1153 PR fortran/99010
1154 * dependency.c (gfc_dep_resolver): Fix coarray handling.
1155
1156 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1157
1158 PR fortran/99146
1159 * interface.c:
1160
1161 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1162
1163 PR fortran/99027
1164 * simplify.c (simplify_bound_dim): Honor DIMEN_ELEMENT
1165 when using dim=.
1166
1167 2021-02-17 Julian Brown <julian@codesourcery.com>
1168
1169 * openmp.c (resolve_omp_clauses): Disallow selecting components
1170 of arrays of derived type.
1171
1172 2021-02-17 Julian Brown <julian@codesourcery.com>
1173
1174 * trans-openmp.c (gfc_trans_omp_clauses): Handle element selection
1175 for arrays of derived types.
1176
1177 2021-02-16 Tobias Burnus <tobias@codesourcery.com>
1178
1179 * expr.c (gfc_is_simplify_contiguous): Handle REF_INQUIRY, i.e.
1180 %im and %re which are EXPR_VARIABLE.
1181 * openmp.c (resolve_omp_clauses): Diagnose %re/%im explicitly.
1182
1183 2021-02-16 Tobias Burnus <tobias@codesourcery.com>
1184
1185 PR fortran/99111
1186 * io.c (resolve_tag_format): Reject BT_DERIVED/CLASS/VOID
1187 as (array-valued) FORMAT tag.
1188
1189 2021-02-12 Tobias Burnus <tobias@codesourcery.com>
1190
1191 PR fortran/99043
1192 * trans-expr.c (gfc_conv_procedure_call): Don't reset
1193 rank of assumed-rank array.
1194
1195 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
1196
1197 PR fortran/98897
1198 * match.c (gfc_match_call): Include associate names as possible
1199 entities with typebound subroutines. The target needs to be
1200 resolved for the type.
1201
1202 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
1203
1204 PR fortran/99060
1205 * primary.c (gfc_match_varspec): Test for non-null 'previous'
1206 before using its name in the error message.
1207
1208 2021-02-11 Tobias Burnus <tobias@codesourcery.com>
1209
1210 * intrinsic.texi (FINDLOC): Add 'MASK' to argument table.
1211 (MAXLOC, MAXVAL, MINLOC, MINVAL): For 'MASK', remove 'an
1212 array' as scalars are also permitted.
1213
1214 2021-02-10 Julian Brown <julian@codesourcery.com>
1215
1216 PR fortran/98979
1217 * openmp.c (resolve_omp_clauses): Omit OpenACC update in
1218 contiguity check and stride-specified error.
1219
1220 2021-02-04 Julian Brown <julian@codesourcery.com>
1221
1222 * openmp.c (resolve_omp_clauses): Omit OpenACC update in
1223 contiguity check and stride-specified error.
1224
1225 2021-02-04 Julian Brown <julian@codesourcery.com>
1226
1227 * trans-openmp.c (gfc_trans_omp_clauses): Use class_pointer attribute
1228 for BT_CLASS.
1229
1230 2021-02-04 Julian Brown <julian@codesourcery.com>
1231
1232 * trans-openmp.c (gfc_trans_omp_clauses): Fix dereferencing for
1233 BT_DERIVED members.
1234
1235 2021-02-04 Tobias Burnus <tobias@codesourcery.com>
1236
1237 * openmp.c (resolve_omp_clauses): Explicitly diagnose
1238 substrings as not permitted.
1239
1240 2021-02-03 Jeff Law <law@redhat.com>
1241
1242 * intrinsic.texi (ANINT): Fix typo.
1243
1244 2021-02-03 Tobias Burnus <tobias@codesourcery.com>
1245
1246 PR fortran/98913
1247 * dependency.c (gfc_dep_resolver): Treat local access
1248 to coarrays like any array access in dependency analysis.
1249
1250 2021-01-28 Harald Anlauf <anlauf@gmx.de>
1251
1252 PR fortran/86470
1253 * trans.c (gfc_call_malloc): Allocate area of size 1 if passed
1254 size is NULL (as documented).
1255
1256 2021-01-27 Paul Thomas <pault@gcc.gnu.org>
1257
1258 PR fortran/93924
1259 PR fortran/93925
1260 * trans-expr.c (gfc_conv_procedure_call): Suppress the call to
1261 gfc_conv_intrinsic_to_class for unlimited polymorphic procedure
1262 pointers.
1263 (gfc_trans_assignment_1): Similarly suppress class assignment
1264 for class valued procedure pointers.
1265
1266 2021-01-27 Paul Thomas <pault@gcc.gnu.org>
1267
1268 PR fortran/98472
1269 * trans-array.c (gfc_conv_expr_descriptor): Include elemental
1270 procedure pointers in the assert under the comment 'elemental
1271 function' and eliminate the second, spurious assert.
1272
1273 2021-01-25 Harald Anlauf <anlauf@gmx.de>
1274
1275 PR fortran/70070
1276 * data.c (create_character_initializer): Check substring indices
1277 against bounds.
1278 (gfc_assign_data_value): Catch error returned from
1279 create_character_initializer.
1280
1281 2021-01-25 Tobias Burnus <tobias@codesourcery.com>
1282
1283 * intrinsic.texi (CO_BROADCAST, CO_MIN, CO_REDUCE, CO_SUM): Fix typos.
1284
1285 2021-01-25 Steve Kargl <kargl@gcc.gnu.org>
1286
1287 PR fortran/98517
1288 * resolve.c (resolve_charlen): Check that length expression is
1289 present before testing for scalar/integer..
1290
1291 2021-01-22 Paul Thomas <pault@gcc.gnu.org>
1292
1293 PR fortran/98565
1294 * trans-intrinsic.c (gfc_conv_associated): Do not add a _data
1295 component for scalar class function targets. Instead, fix the
1296 function result and access the _data from that.
1297
1298 2021-01-21 Jorge D'Elia <jdelia@cimec.unl.edu.ar>
1299
1300 * intrinsic.texi (CO_MAX): Fix typo.
1301
1302 2021-01-21 Paul Thomas <pault@gcc.gnu.org>
1303
1304 PR fortran/96320
1305 * decl.c (gfc_match_modproc): It is not an error to find a
1306 module procedure declaration within a contains block.
1307 * expr.c (gfc_check_vardef_context): Pure procedure result is
1308 assignable. Change 'own_scope' accordingly.
1309 * resolve.c (resolve_typebound_procedure): A procedure that
1310 has the module procedure attribute is almost certainly a
1311 module procedure, whatever its interface.
1312
1313 2021-01-19 Tobias Burnus <tobias@codesourcery.com>
1314
1315 PR fortran/98476
1316 * openmp.c (resolve_omp_clauses): Change use_device_ptr
1317 to use_device_addr for unless type(c_ptr); check all
1318 list item for is_device_ptr.
1319
1320 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1321
1322 * dump-parse-tree.c (show_omp_clauses): Handle detach clause.
1323 * frontend-passes.c (gfc_code_walker): Walk detach expression.
1324 * gfortran.h (struct gfc_omp_clauses): Add detach field.
1325 (gfc_c_intptr_kind): New.
1326 * openmp.c (gfc_free_omp_clauses): Free detach clause.
1327 (gfc_match_omp_detach): New.
1328 (enum omp_mask1): Add OMP_CLAUSE_DETACH.
1329 (enum omp_mask2): Remove OMP_CLAUSE_DETACH.
1330 (gfc_match_omp_clauses): Handle OMP_CLAUSE_DETACH for OpenMP.
1331 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DETACH.
1332 (resolve_omp_clauses): Prevent use of detach with mergeable and
1333 overriding the data sharing mode of the event handle.
1334 * trans-openmp.c (gfc_trans_omp_clauses): Handle detach clause.
1335 * trans-types.c (gfc_c_intptr_kind): New.
1336 (gfc_init_kinds): Initialize gfc_c_intptr_kind.
1337 * types.def
1338 (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT): Rename
1339 to...
1340 (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT_PTR):
1341 ...this. Add extra argument.
1342
1343 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1344
1345 * gfortran.h (gfc_resolve_substring): Add prototype.
1346 * primary.c (match_string_constant): Simplify substrings with
1347 constant starting and ending points.
1348 * resolve.c: Rename resolve_substring to gfc_resolve_substring.
1349 (gfc_resolve_ref): Use renamed function gfc_resolve_substring.
1350
1351 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1352
1353 PR fortran/98661
1354 * resolve.c (resolve_component): Derived type components with
1355 ALLOCATABLE or POINTER attribute shall have a deferred shape.
1356
1357 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1358
1359 Revert:
1360 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1361
1362 PR fortran/98661
1363 * resolve.c (resolve_component): Derived type components with
1364 ALLOCATABLE or POINTER attribute shall have a deferred shape.
1365
1366 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1367
1368 PR fortran/98661
1369 * resolve.c (resolve_component): Derived type components with
1370 ALLOCATABLE or POINTER attribute shall have a deferred shape.
1371
1372 2021-01-08 Paul Thomas <pault@gcc.gnu.org>
1373
1374 PR fortran/93794
1375 * trans-expr.c (gfc_conv_component_ref): Remove the condition
1376 that deferred character length components only be allocatable.
1377
1378 2021-01-08 Paul Thomas <pault@gcc.gnu.org>
1379
1380 PR fortran/98458
1381 * simplify.c (is_constant_array_expr): If an array constructor
1382 expression has elements other than constants or structures, try
1383 fixing the expression with gfc_reduce_init_expr. Also, if shape
1384 is NULL, obtain the array size and set it.
1385
1386 2021-01-07 Paul Thomas <pault@gcc.gnu.org>
1387
1388 PR fortran/93701
1389 * resolve.c (find_array_spec): Put static prototype for
1390 resolve_assoc_var before this function and call for associate
1391 variables.
1392
1393 2021-01-06 Harald Anlauf <anlauf@gmx.de>
1394
1395 * resolve.c (resolve_component): Add check for valid CLASS
1396 reference before trying to access CLASS data.
1397
1398 2021-01-04 Martin Liska <mliska@suse.cz>
1399
1400 * ChangeLog-2018: Remove duplicate ChangeLog entries.
1401
1402 2021-01-01 Harald Anlauf <anlauf@gmx.de>
1403
1404 * class.c (gfc_find_vtab): Add check on attribute is_class.
1405
1406 2021-01-01 Jakub Jelinek <jakub@redhat.com>
1407
1408 * gfortranspec.c (lang_specific_driver): Update copyright notice
1409 dates.
1410 * gfc-internals.texi: Bump @copying's copyright year.
1411 * gfortran.texi: Ditto.
1412 * intrinsic.texi: Ditto.
1413 * invoke.texi: Ditto.
1414
1415 2021-01-01 Jakub Jelinek <jakub@redhat.com>
1416
1417 * ChangeLog-2020: Rotate ChangeLog. New file.
1418
1419 \f
1420 Copyright (C) 2021 Free Software Foundation, Inc.
1421
1422 Copying and distribution of this file, with or without modification,
1423 are permitted in any medium without royalty provided the copyright
1424 notice and this notice are preserved.