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