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