1 2021-10-12 Tobias Burnus <tobias@codesourcery.com>
4 * check.c (gfc_check_present): Handle optional CLASS.
5 * interface.c (gfc_compare_actual_formal): Likewise.
6 * trans-array.c (gfc_trans_g77_array): Likewise.
7 * trans-decl.c (gfc_build_dummy_array_decl): Likewise.
8 * trans-types.c (gfc_sym_type): Likewise.
9 * primary.c (gfc_variable_attr): Fixes for dummy and
10 pointer when 'class%_data' is passed.
11 * trans-expr.c (set_dtype_for_unallocated, gfc_conv_procedure_call):
12 For assumed-rank dummy, fix setting rank for dealloc/notassoc actual
13 and setting ubound to -1 for assumed-size actuals.
15 2021-10-10 Harald Anlauf <anlauf@gmx.de>
19 * decl.c (add_init_expr_to_sym): Extend initialization of
20 parameter arrays from scalars to handle derived types.
22 2021-10-09 Harald Anlauf <anlauf@gmx.de>
25 * module.c (read_module): Handle old and new-style relational
26 operators when used in USE module, ONLY: OPERATOR(op).
28 2021-10-08 Sandra Loosemore <sandra@codesourcery.com>
31 * interface.c (gfc_compare_actual_formal): Add diagnostic
32 for F2018:C839. Refactor shared code and fix bugs with class
33 array info lookup, and extend similar diagnostic from PR94110
34 to also cover class types.
36 2021-10-08 Martin Liska <mliska@suse.cz>
38 * options.c (gfc_post_options): Use new macro
41 2021-10-06 Tobias Burnus <tobias@codesourcery.com>
43 * resolve.c (resolve_values): Only show
44 deprecated warning if attr.referenced.
46 2021-10-04 Tobias Burnus <tobias@codesourcery.com>
49 * resolve.c (can_generate_init, resolve_fl_variable_derived,
50 resolve_symbol): Only do initialization with intent(out) if not
51 inside of an interface block.
53 2021-10-01 Martin Sebor <msebor@redhat.com>
56 * array.c: Remove an unnecessary test.
57 * trans-array.c: Same.
59 2021-10-01 Jakub Jelinek <jakub@redhat.com>
61 * gfortran.h (gfc_omp_clauses): Add order_reproducible bitfield.
62 * dump-parse-tree.c (show_omp_clauses): Print REPRODUCIBLE: for it.
63 * openmp.c (gfc_match_omp_clauses): Set order_reproducible for
64 explicit reproducible: modifier.
65 * trans-openmp.c (gfc_trans_omp_clauses): Set
66 OMP_CLAUSE_ORDER_REPRODUCIBLE for order_reproducible.
67 (gfc_split_omp_clauses): Also copy order_reproducible.
69 2021-09-30 Harald Anlauf <anlauf@gmx.de>
72 * simplify.c (simplify_size): Resolve expressions used in array
73 specifications so that SIZE can be simplified.
75 2021-09-30 Harald Anlauf <anlauf@gmx.de>
77 * expr.c: The correct reference to Fortran standard is: F2018:10.1.12.
79 2021-09-30 Tobias Burnus <tobias@codesourcery.com>
83 * trans-intrinsic.c (gfc_conv_same_type_as): Fix handling
85 * trans.h (gfc_vtpr_hash_get): Renamed prototype to ...
86 (gfc_vptr_hash_get): ... this to match function name.
88 2021-09-29 Harald Anlauf <anlauf@gmx.de>
91 * array.c (expand_constructor): Do not dereference NULL pointer.
93 2021-09-27 Tobias Burnus <tobias@codesourcery.com>
96 * trans-array.c (gfc_tree_array_size): New function to
97 find size inline (whole array or one dimension).
98 (array_parameter_size): Use it, take stmt_block as arg.
99 (gfc_conv_array_parameter): Update call.
100 * trans-array.h (gfc_tree_array_size): Add prototype.
101 * trans-decl.c (gfor_fndecl_size0, gfor_fndecl_size1): Remove
103 (gfc_build_intrinsic_function_decls): Remove their initialization.
104 * trans-expr.c (gfc_conv_procedure_call): Update
105 bounds of pointer/allocatable actual args to nonallocatable/nonpointer
106 dummies to be one based.
107 * trans-intrinsic.c (gfc_conv_intrinsic_shape): Fix case for
108 assumed rank with allocatable/pointer dummy.
109 (gfc_conv_intrinsic_size): Update to use inline function.
110 * trans.h (gfor_fndecl_size0, gfor_fndecl_size1): Remove var decl.
112 2021-09-26 Tobias Burnus <tobias@codesourcery.com>
115 * trans-intrinsic.c (gfc_conv_associated): Support assumed-rank
116 'pointer' with scalar/array 'target' argument.
118 2021-09-24 Harald Anlauf <anlauf@gmx.de>
121 * expr.c (is_non_constant_intrinsic): Check for intrinsics
122 excluded in constant expressions (F2018:10.1.2).
123 (gfc_is_constant_expr): Use that check.
125 2021-09-24 Sandra Loosemore <sandra@codesourcery.com>
128 * interface.c (compare_parameter): Enforce F2018 C711.
130 2021-09-24 Tobias Burnus <tobias@codesourcery.com>
133 * scanner.c (load_file): Return void, call (gfc_)fatal_error for
135 (include_line, include_stmt, gfc_new_file): Remove exit call
136 for failed load_file run.
138 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
141 * decl.c (gfc_verify_c_interop_param): Handle F2018 C1557,
144 2021-09-23 Harald Anlauf <anlauf@gmx.de>
145 Tobias Burnus <tobias@codesourcery.com>
148 * trans-intrinsic.c (gfc_conv_allocated): Cleanup. Handle
149 coindexed scalar coarrays.
151 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
154 * interface.c (gfc_compare_actual_formal): Extend existing
155 assumed-type diagnostic to also check for argument with type
158 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
161 * check.c (gfc_check_associated): Allow an assumed-rank
162 array for the pointer argument.
163 * interface.c (compare_parameter): Also give rank mismatch
164 error on assumed-rank array.
166 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
168 * trans-stmt.c (trans_associate_var): Check that result of
169 GFC_DECL_SAVED_DESCRIPTOR is not null before using it.
171 2021-09-22 Tobias Burnus <tobias@codesourcery.com>
174 * cpp.c (gfc_cpp_register_include_paths, gfc_cpp_post_options):
175 Add new bool verbose_missing_dir_warn argument.
176 * cpp.h (gfc_cpp_post_options): Update prototype.
177 * f95-lang.c (gfc_init): Remove duplicated file-not found diag.
178 * gfortran.h (gfc_check_include_dirs): Takes bool
179 verbose_missing_dir_warn arg.
180 (gfc_new_file): Returns now void.
181 * options.c (gfc_post_options): Update to warn for -I and -J,
182 only, by default but for all when user requested.
183 * scanner.c (gfc_do_check_include_dir):
184 (gfc_do_check_include_dirs, gfc_check_include_dirs): Take bool
185 verbose warn arg and update to avoid printing the same message
187 (load_file): Fix indent.
188 (gfc_new_file): Return void and exit when load_file failed
189 as all other load_file users do.
191 2021-09-22 Tobias Burnus <tobias@codesourcery.com>
193 * trans-expr.c (gfc_simple_for_loop): New.
194 * trans.h (gfc_simple_for_loop): New prototype.
196 2021-09-21 Tobias Burnus <tobias@codesourcery.com>
199 * cpp.c: Define GCC_C_COMMON_C for #include "options.h" to make
200 cpp_reason_option_codes available.
201 (gfc_cpp_register_include_paths): Make static, set pfile's
202 warn_missing_include_dirs and move before caller.
203 (gfc_cpp_init_cb): New, cb code moved from ...
204 (gfc_cpp_init_0): ... here.
205 (gfc_cpp_post_options): Call gfc_cpp_init_cb.
206 (cb_cpp_diagnostic_cpp_option): New. As implemented in c-family
207 to match CppReason flags to -W... names.
208 (cb_cpp_diagnostic): Use it to replace single special case.
209 * cpp.h (gfc_cpp_register_include_paths): Remove as now static.
210 * gfortran.h (gfc_check_include_dirs): New prototype.
211 (gfc_add_include_path): Add new bool arg.
212 * options.c (gfc_init_options): Don't set -Wmissing-include-dirs.
213 (gfc_post_options): Set it here after commandline processing. Call
214 gfc_add_include_path with defer_warn=false.
215 (gfc_handle_option): Call it with defer_warn=true.
216 * scanner.c (gfc_do_check_include_dir, gfc_do_check_include_dirs,
217 gfc_check_include_dirs): New. Diagnostic moved from ...
218 (add_path_to_list): ... here, which came before cmdline processing.
219 Take additional bool defer_warn argument.
220 (gfc_add_include_path): Take additional defer_warn arg.
221 * scanner.h (struct gfc_directorylist): Reorder for alignment issues,
224 2021-09-20 Tobias Burnus <tobias@codesourcery.com>
226 * gfortran.h (gfc_omp_clauses): Add order_unconstrained.
227 * dump-parse-tree.c (show_omp_clauses): Dump it.
228 * openmp.c (gfc_match_omp_clauses): Match unconstrained/reproducible
229 modifiers to ordered(concurrent).
230 (OMP_DISTRIBUTE_CLAUSES): Accept ordered clause.
231 (resolve_omp_clauses): Reject ordered + order on same directive.
232 * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses): Pass
233 on unconstrained modifier of ordered(concurrent).
235 2021-09-17 Harald Anlauf <anlauf@gmx.de>
238 * trans-decl.c (gfc_finish_var_decl): Disable the warning message
239 for variables moved from stack to static storange if they are
240 declared in the main, but allow the move to happen.
242 2021-09-17 Sandra Loosemore <sandra@codesourcery.com>
244 * intrinsic.texi (ISO_C_BINDING): Change C_FLOAT128 to correspond
245 to _Float128 rather than __float128.
246 * iso-c-binding.def (c_float128): Update comments.
247 * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Likewise.
248 (build_round_expr): Likewise.
249 (gfc_build_intrinsic_lib_fndcecls): Likewise.
250 * trans-types.h (gfc_real16_is_float128): Likewise.
252 2021-09-16 Harald Anlauf <anlauf@gmx.de>
255 * trans-expr.c (gfc_conv_procedure_call): Wrap deallocation of
256 allocatable components of optional allocatable derived type
257 procedure arguments with INTENT(OUT) into a presence check.
259 2021-09-14 Harald Anlauf <anlauf@gmx.de>
262 * resolve.c (resolve_entries): Attempt to recover cleanly after
263 rejecting mismatched function entries.
265 2021-09-14 Tobias Burnus <tobias@codesourcery.com>
268 * parse.c (gfc_ascii_statement): Add missing ST_OMP_END_SCOPE.
270 2021-09-13 Harald Anlauf <anlauf@gmx.de>
273 * decl.c (add_init_expr_to_sym): For proper initialization of
274 array-valued named constants the array bounds need to be
275 simplified before adding the initializer.
277 2021-09-13 Harald Anlauf <anlauf@gmx.de>
280 * expr.c (find_substring_ref): Handle given substring start and
281 end indices as signed integers, not unsigned.
283 2021-09-09 Harald Anlauf <anlauf@gmx.de>
286 * trans-expr.c (gfc_conv_substring): Do not generate substring
287 bounds check for implied do loop index variable before it actually
290 2021-09-08 liuhongt <hongtao.liu@intel.com>
292 * options.c (gfc_post_options): Issue an error for
293 -fexcess-precision=16.
295 2021-09-07 Harald Anlauf <anlauf@gmx.de>
298 * expr.c (find_array_element): When bounds cannot be determined as
299 constant, return error instead of aborting.
301 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
303 * openmp.c (gfc_match_omp_flush): Parse 'seq_cst' clause on 'flush'
305 * trans-openmp.c (gfc_trans_omp_flush): Handle OMP_MEMORDER_SEQ_CST.
307 2021-09-03 Tobias Burnus <tobias@codesourcery.com>
309 * decl.c (gfc_verify_c_interop_param): Reject pointer with
310 CONTIGUOUS attributes as dummy arg. Reject character len > 1
311 when passed as byte stream.
313 2021-09-01 Harald Anlauf <anlauf@gmx.de>
316 * resolve.c (resolve_common_vars): Fix grammar and improve wording
317 of error message rejecting an unlimited polymorphic in COMMON.
319 2021-08-31 Harald Anlauf <anlauf@gmx.de>
322 * simplify.c (substring_has_constant_len): Minimize checks for
323 substring expressions being allowed.
325 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
327 * gfortran.h: Add variable for 'ancestor' in struct gfc_omp_clauses.
328 * openmp.c (gfc_match_omp_clauses): Parse device-modifiers 'device_num'
329 and 'ancestor' in 'target device' clauses.
330 * trans-openmp.c (gfc_trans_omp_clauses): Set OMP_CLAUSE_DEVICE_ANCESTOR.
332 2021-08-30 Harald Anlauf <anlauf@gmx.de>
335 * match.c (gfc_match_goto): Allow for whitespace in parsing list
338 2021-08-30 Harald Anlauf <anlauf@gmx.de>
341 * resolve.c (resolve_allocate_expr): An unlimited polymorphic
342 argument to ALLOCATE must be ALLOCATABLE or a POINTER. Fix the
345 2021-08-28 Harald Anlauf <anlauf@gmx.de>
348 * resolve.c (resolve_entries): For functions of type CHARACTER
349 tighten the checks for matching characteristics.
351 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
354 * cpp.c (gfc_cpp_post_options): Call new function
355 diagnostic_initialize_input_context().
357 2021-08-24 Harald Anlauf <anlauf@gmx.de>
360 * trans-decl.c (gfc_finish_var_decl): Adjust check to handle
361 implicit SAVE as well as variables in the main program. Improve
362 warning message text.
364 2021-08-23 Tobias Burnus <tobias@codesourcery.com>
366 * openmp.c (gfc_match_dupl_check, gfc_match_dupl_memorder,
367 gfc_match_dupl_atomic): New.
368 (gfc_match_omp_clauses): Use them; remove duplicate
369 'release'/'relaxed' clause matching; improve error dignostic
372 2021-08-23 Tobias Burnus <tobias@codesourcery.com>
374 * dump-parse-tree.c (show_omp_clauses): Handle 'strict' modifier
375 on grainsize/num_tasks
376 * gfortran.h (gfc_omp_clauses): Add grainsize_strict
377 and num_tasks_strict.
378 * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses):
379 Handle 'strict' modifier on grainsize/num_tasks.
380 * openmp.c (gfc_match_omp_clauses): Likewise.
382 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
385 (error_uinteger): Take 'long long unsigned' instead
386 of 'long unsigned' as argumpent.
387 (error_integer): Take 'long long' instead of 'long'.
388 (error_hwuint, error_hwint): New.
389 (error_print): Update to handle 'll' and 'w'
391 * simplify.c (substring_has_constant_len): Use '%wd'
394 2021-08-20 Harald Anlauf <anlauf@gmx.de>
397 * simplify.c (substring_has_constant_len): Fix format string of
398 gfc_error, pass HOST_WIDE_INT bounds values via char buffer.
400 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
402 * dump-parse-tree.c (show_omp_clauses): Handle 'at', 'severity'
403 and 'message' clauses.
404 (show_omp_node, show_code_node): Handle EXEC_OMP_ERROR.
405 * gfortran.h (gfc_statement): Add ST_OMP_ERROR.
406 (gfc_omp_severity_type, gfc_omp_at_type): New.
407 (gfc_omp_clauses): Add 'at', 'severity' and 'message' clause;
408 use more bitfields + ENUM_BITFIELD.
409 (gfc_exec_op): Add EXEC_OMP_ERROR.
410 * match.h (gfc_match_omp_error): New.
411 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_(AT,SEVERITY,MESSAGE).
412 (gfc_match_omp_clauses): Handle new clauses.
413 (OMP_ERROR_CLAUSES, gfc_match_omp_error): New.
414 (resolve_omp_clauses): Resolve new clauses.
415 (omp_code_to_statement, gfc_resolve_omp_directive): Handle
417 * parse.c (decode_omp_directive, next_statement,
418 gfc_ascii_statement): Handle 'omp error'.
419 * resolve.c (gfc_resolve_blocks): Likewise.
420 * st.c (gfc_free_statement): Likewise.
421 * trans-openmp.c (gfc_trans_omp_error): Likewise.
422 (gfc_trans_omp_directive): Likewise.
423 * trans.c (trans_code): Likewise.
425 2021-08-20 Jakub Jelinek <jakub@redhat.com>
427 * types.def (BT_FN_VOID_CONST_PTR_SIZE): New DEF_FUNCTION_TYPE_2.
428 * f95-lang.c (ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST): Define.
430 2021-08-19 Harald Anlauf <anlauf@gmx.de>
433 * simplify.c (substring_has_constant_len): New.
434 (gfc_simplify_len): Handle case of substrings with constant
437 2021-08-18 Tobias Burnus <tobias@codesourcery.com>
439 * match.h (gfc_match_omp_nothing): New.
440 * openmp.c (gfc_match_omp_nothing): New.
441 * parse.c (decode_omp_directive): Match 'nothing' directive.
443 2021-08-17 Tobias Burnus <tobias@codesourcery.com>
445 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
447 * gfortran.h (enum gfc_statement): Add ST_OMP_(END_)SCOPE.
448 (enum gfc_exec_op): Add EXEC_OMP_SCOPE.
449 * match.h (gfc_match_omp_scope): New.
450 * openmp.c (OMP_SCOPE_CLAUSES): Define
451 (gfc_match_omp_scope): New.
452 (gfc_match_omp_cancellation_point, gfc_match_omp_end_nowait):
453 Improve error diagnostic.
454 (omp_code_to_statement): Handle ST_OMP_SCOPE.
455 (gfc_resolve_omp_directive): Handle EXEC_OMP_SCOPE.
456 * parse.c (decode_omp_directive, next_statement,
457 gfc_ascii_statement, parse_omp_structured_block,
458 parse_executable): Handle OpenMP's scope construct.
459 * resolve.c (gfc_resolve_blocks): Likewise
460 * st.c (gfc_free_statement): Likewise
461 * trans-openmp.c (gfc_trans_omp_scope): New.
462 (gfc_trans_omp_directive): Call it.
463 * trans.c (trans_code): handle EXEC_OMP_SCOPE.
465 2021-08-16 Tobias Burnus <tobias@codesourcery.com>
467 * dump-parse-tree.c (show_omp_clauses): Handle 'filter' clause.
468 (show_omp_node, show_code_node): Handle (combined) omp masked construct.
469 * frontend-passes.c (gfc_code_walker): Likewise.
470 * gfortran.h (enum gfc_statement): Add ST_OMP_*_MASKED*.
471 (enum gfc_exec_op): Add EXEC_OMP_*_MASKED*.
472 * match.h (gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
473 gfc_match_omp_masked_taskloop_simd, gfc_match_omp_parallel_masked,
474 gfc_match_omp_parallel_masked_taskloop,
475 gfc_match_omp_parallel_masked_taskloop_simd): New prototypes.
476 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_FILTER.
477 (gfc_match_omp_clauses): Match it.
478 (OMP_MASKED_CLAUSES, gfc_match_omp_parallel_masked,
479 gfc_match_omp_parallel_masked_taskloop,
480 gfc_match_omp_parallel_masked_taskloop_simd,
481 gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
482 gfc_match_omp_masked_taskloop_simd): New.
483 (resolve_omp_clauses): Resolve filter clause.
484 (gfc_resolve_omp_parallel_blocks, resolve_omp_do,
485 omp_code_to_statement, gfc_resolve_omp_directive): Handle
486 omp masked constructs.
487 * parse.c (decode_omp_directive, case_exec_markers,
488 gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
489 parse_executable): Likewise.
490 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
491 * st.c (gfc_free_statement): Likewise.
492 * trans-openmp.c (gfc_trans_omp_clauses): Handle filter clause.
493 (GFC_OMP_SPLIT_MASKED, GFC_OMP_MASK_MASKED): New enum values.
494 (gfc_trans_omp_masked): New.
495 (gfc_split_omp_clauses): Handle combined masked directives.
496 (gfc_trans_omp_master_taskloop): Rename to ...
497 (gfc_trans_omp_master_masked_taskloop): ... this; handle also
498 combined masked directives.
499 (gfc_trans_omp_parallel_master): Rename to ...
500 (gfc_trans_omp_parallel_master_masked): ... this; handle
501 combined masked directives.
502 (gfc_trans_omp_directive): Handle EXEC_OMP_*_MASKED*.
503 * trans.c (trans_code): Likewise.
505 2021-08-15 Harald Anlauf <anlauf@gmx.de>
508 * match.c (sync_statement): Replace %v code by %e in gfc_match to
509 allow for function references as STAT and ERRMSG arguments.
510 * resolve.c (resolve_sync): Adjust checks of STAT= and ERRMSG= to
511 being definable arguments. Function references with a data
512 pointer result are accepted.
513 * trans-stmt.c (gfc_trans_sync): Adjust assertion.
515 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
517 * gfortran.h (gfc_omp_proc_bind_kind): Add OMP_PROC_BIND_PRIMARY.
518 * dump-parse-tree.c (show_omp_clauses): Add TODO comment to
519 change 'master' to 'primary' in proc_bind for OpenMP 5.1.
520 * intrinsic.texi (OMP_LIB): Mention OpenMP 5.1; add
521 omp_proc_bind_primary.
522 * openmp.c (gfc_match_omp_clauses): Accept
523 'primary' as alias for 'master'.
524 * trans-openmp.c (gfc_trans_omp_clauses): Handle
525 OMP_PROC_BIND_PRIMARY.
527 2021-08-11 Sandra Loosemore <sandra@codesourcery.com>
529 * iso-c-binding.def (c_float128, c_float128_complex): Check
530 float128_type_node instead of gfc_float128_type_node.
531 * trans-types.c (gfc_init_kinds, gfc_build_real_type):
532 Update comments re supported 128-bit floating-point types.
534 2021-08-11 Richard Biener <rguenther@suse.de>
536 * trans-common.c (create_common): Set TREE_THIS_VOLATILE on the
537 COMPONENT_REF if the field is volatile.
539 2021-08-07 Harald Anlauf <anlauf@gmx.de>
542 * primary.c (gfc_expr_attr): Variable attribute can only be
543 inquired when symtree is non-NULL.
545 2021-07-28 Harald Anlauf <anlauf@gmx.de>
548 * expr.c (gfc_check_vardef_context): Add check for KIND and LEN
550 * match.c (gfc_match): Fix comment for %v code.
551 (gfc_match_allocate, gfc_match_deallocate): Replace use of %v code
552 by %e in gfc_match to allow for function references as STAT and
554 * resolve.c (resolve_allocate_deallocate): Avoid NULL pointer
555 dereferences and shortcut for bad STAT and ERRMSG argument to
556 (DE)ALLOCATE. Remove bogus parts of checks for STAT and ERRMSG.
558 2021-07-26 José Rui Faustino de Sousa <jrfsousa@gmail.com>
559 Tobias Burnus <tobias@codesourcery.com>
566 * trans-decl.c (convert_CFI_desc): Only copy out the descriptor
568 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Updated attribute
569 handling which reflect a previous intermediate version of the
570 standard. Only copy out the descriptor if necessary.
572 2021-07-23 Harald Anlauf <anlauf@gmx.de>
575 * check.c (array_check): Adjust check for the case of CLASS
578 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
579 Joseph Myers <joseph@codesourcery.com>
580 Cesar Philippidis <cesar@codesourcery.com>
582 * dump-parse-tree.c (show_attr): Update.
583 * gfortran.h (symbol_attribute): Add 'oacc_routine_nohost' member.
584 (gfc_omp_clauses): Add 'nohost' member.
585 * module.c (ab_attribute): Add 'AB_OACC_ROUTINE_NOHOST'.
586 (attr_bits, mio_symbol_attribute): Update.
587 * openmp.c (omp_mask2): Add 'OMP_CLAUSE_NOHOST'.
588 (gfc_match_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
589 (OACC_ROUTINE_CLAUSES): Add 'OMP_CLAUSE_NOHOST'.
590 (gfc_match_oacc_routine): Update.
591 * trans-decl.c (add_attributes_to_decl): Update.
592 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
594 2021-07-21 Harald Anlauf <anlauf@gmx.de>
597 * target-memory.c (gfc_interpret_derived): Size of array component
598 of derived type can only be computed here for explicit shape.
599 * trans-types.c (gfc_get_nodesc_array_type): Do not dereference
602 2021-07-21 Tobias Burnus <tobias@codesourcery.com>
604 * decl.c (gfc_verify_c_interop_param): Update for F2008 + F2018
605 changes; reject unsupported bits with 'Error: Sorry,'.
606 * trans-expr.c (gfc_conv_procedure_call): Fix condition to
607 For using CFI descriptor with characters.
609 2021-07-18 Harald Anlauf <anlauf@gmx.de>
612 * io.c (resolve_tag_format): Extend FORMAT check to unknown type.
614 2021-07-14 Harald Anlauf <anlauf@gmx.de>
617 * trans-expr.c (gfc_trans_class_init_assign): Call
618 gfc_conv_expr_present only for dummy variables.
620 2021-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
623 * frontend-passes.c (traverse_io_block): Adjust test for
624 when a variable is eligible for the transformation to
627 2021-06-28 Martin Sebor <msebor@redhat.com>
629 * trans-array.c (trans_array_constructor): Replace direct uses
630 of TREE_NO_WARNING with warning_suppressed_p, and suppress_warning.
631 * trans-decl.c (gfc_build_qualified_array): Same.
632 (gfc_build_dummy_array_decl): Same.
633 (generate_local_decl): Same.
634 (gfc_generate_function_code): Same.
635 * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
636 (gfc_omp_clause_copy_ctor): Same.
637 * trans-types.c (get_dtype_type_node): Same.
638 (gfc_get_desc_dim_type): Same.
639 (gfc_get_array_descriptor_base): Same.
640 (gfc_get_caf_vector_type): Same.
641 (gfc_get_caf_reference_type): Same.
642 * trans.c (gfc_create_var_np): Same.
644 2021-06-23 Tobias Burnus <tobias@codesourcery.com>
646 * dump-parse-tree.c (show_omp_clauses): Fix enum type used
647 for dumping gfc_omp_defaultmap_category.
649 2021-06-23 Andre Vehreschild <vehre@gcc.gnu.org>
652 * trans-intrinsic.c (conv_co_collective): Check stat for null ptr
653 before dereferrencing.
655 2021-06-18 Harald Anlauf <anlauf@gmx.de>
659 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Unconditionally
660 convert result of min/max to result type.
662 2021-06-16 Harald Anlauf <anlauf@gmx.de>
666 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
668 * match.c (gfc_match_pointer_assignment): Likewise.
669 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
672 2021-06-16 Harald Anlauf <anlauf@gmx.de>
675 2021-06-16 Harald Anlauf <anlauf@gmx.de>
679 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
681 * match.c (gfc_match_pointer_assignment): Likewise.
682 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
685 2021-06-16 Harald Anlauf <anlauf@gmx.de>
689 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
691 * match.c (gfc_match_pointer_assignment): Likewise.
692 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
695 2021-06-15 Tobias Burnus <tobias@codesourcery.com>
698 * dump-parse-tree.c (show_omp_clauses): Update for defaultmap.
699 * f95-lang.c (LANG_HOOKS_OMP_ALLOCATABLE_P,
700 LANG_HOOKS_OMP_SCALAR_TARGET_P): New.
701 * gfortran.h (enum gfc_omp_defaultmap,
702 enum gfc_omp_defaultmap_category): New.
703 * openmp.c (gfc_match_omp_clauses): Update defaultmap matching.
704 * trans-decl.c (gfc_finish_decl_attrs): Set GFC_DECL_SCALAR_TARGET.
705 * trans-openmp.c (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
706 (gfc_omp_scalar_p): Take 'ptr_alloc_ok' argument.
707 (gfc_trans_omp_clauses, gfc_split_omp_clauses): Update for
709 * trans.h (gfc_omp_scalar_p): Update prototype.
710 (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
711 (struct lang_decl): Add scalar_target.
712 (GFC_DECL_SCALAR_TARGET, GFC_DECL_GET_SCALAR_TARGET): New.
714 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
716 * resolve.c (resolve_variable): Remove *XCNEW used to
717 nullify nullified memory.
719 2021-06-09 Martin Liska <mliska@suse.cz>
721 * intrinsic.texi: Add missing @headitem to tables with a header.
723 2021-06-09 Jakub Jelinek <jakub@redhat.com>
726 * trans-openmp.c (gfc_omp_finish_clause): Gimplify OMP_CLAUSE_SIZE.
728 2021-06-08 Tobias Burnus <tobias@codesourcery.com>
731 * trans-openmp.c (gfc_add_clause_implicitly): New.
732 (gfc_split_omp_clauses): Use it.
733 (gfc_free_split_omp_clauses): New.
734 (gfc_trans_omp_do_simd, gfc_trans_omp_parallel_do,
735 gfc_trans_omp_parallel_do_simd, gfc_trans_omp_distribute,
736 gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_taskloop,
737 gfc_trans_omp_master_taskloop, gfc_trans_omp_parallel_master): Use it.
739 2021-06-08 Martin Liska <mliska@suse.cz>
741 * intrinsic.texi: Fix typo.
742 * trans-expr.c (gfc_trans_pointer_assignment): Likewise.
744 2021-06-05 José Rui Faustino de Sousa <jrfsousa@gmail.com>
751 * trans-array.c (gfc_get_array_span): rework the way character
752 array "span" was calculated.
753 (gfc_conv_expr_descriptor): improve handling of character sections
754 and unlimited polymorphic objects.
755 * trans-expr.c (gfc_get_character_len): new function to calculate
756 character string length.
757 (gfc_get_character_len_in_bytes): new function to calculate
758 character string length in bytes.
759 (gfc_conv_scalar_to_descriptor): add call to set the "span".
760 (gfc_trans_pointer_assignment): set "_len" and antecipate the
761 initialization of the deferred character length hidden argument.
762 * trans-intrinsic.c (gfc_conv_associated): set "force_no_tmp" to
763 avoid the creation of a temporary.
764 * trans-types.c (gfc_get_dtype_rank_type): rework type detection
765 so that unlimited polymorphic objects get proper type infomation,
766 also important for bind(c).
767 (gfc_get_dtype): add argument to pass the rank if necessary.
768 (gfc_get_array_type_bounds): cosmetic change to have character
769 arrays called character instead of unknown.
770 * trans-types.h (gfc_get_dtype): modify prototype.
771 * trans.c (get_array_span): rework the way character array "span"
773 * trans.h (gfc_get_character_len): new prototype.
774 (gfc_get_character_len_in_bytes): new prototype.
775 Add "unlimited_polymorphic" flag to "gfc_se" type to signal when
776 expression carries an unlimited polymorphic object.
778 2021-06-04 Harald Anlauf <anlauf@gmx.de>
781 * frontend-passes.c (inline_matmul_assign): Do not inline matmul
782 if the assignment to the resulting array if it is not of canonical
783 type (real/integer/complex/logical).
785 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
787 * dump-parse-tree.c (show_code_node): Handle
788 EXEC_OMP_(TARGET_)(,PARALLEL_,TEAMS_)LOOP.
790 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
792 * scanner.c (skip_fixed_omp_sentinel): Set openacc_flag if
793 this is not an (OpenMP) continuation line.
794 (skip_fixed_oacc_sentinel): Likewise for openmp_flag and OpenACC.
795 (gfc_next_char_literal): gfc_error_now to force error for mixed OMP/ACC
796 continuation once per location and return '\n'.
798 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
801 * openmp.c (gfc_match_omp_clauses): Fix typo in error message.
803 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
806 * dump-parse-tree.c (show_omp_clauses): Handle bind clause.
807 (show_omp_node): Handle loop directive.
808 * frontend-passes.c (gfc_code_walker): Likewise.
809 * gfortran.h (enum gfc_statement): Add
810 ST_OMP_(END_)(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
811 (enum gfc_omp_bind_type): New.
812 (gfc_omp_clauses): Use it.
813 (enum gfc_exec_op): Add EXEC_OMP_(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
814 * match.h (gfc_match_omp_loop, gfc_match_omp_parallel_loop,
815 gfc_match_omp_target_parallel_loop, gfc_match_omp_target_teams_loop,
816 gfc_match_omp_teams_loop): New.
817 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_BIND.
818 (gfc_match_omp_clauses): Handle it.
819 (OMP_LOOP_CLAUSES, gfc_match_omp_loop, gfc_match_omp_teams_loop,
820 gfc_match_omp_target_teams_loop, gfc_match_omp_parallel_loop,
821 gfc_match_omp_target_parallel_loop): New.
822 (resolve_omp_clauses, resolve_omp_do, omp_code_to_statement,
823 gfc_resolve_omp_directive): Handle omp loop.
824 * parse.c (decode_omp_directive case_exec_markers, gfc_ascii_statement,
825 parse_omp_do, parse_executable): Likewise.
826 (parse_omp_structured_block): Remove ST_ which use parse_omp_do.
827 * resolve.c (gfc_resolve_blocks): Add omp loop.
828 * st.c (gfc_free_statement): Likewise.
829 * trans-openmp.c (gfc_trans_omp_clauses): Handle bind clause.
830 (gfc_trans_omp_do, gfc_trans_omp_parallel_do, gfc_trans_omp_distribute,
831 gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_directive):
832 Handle loop directive.
833 (gfc_split_omp_clauses): Likewise; fix firstprivate/lastprivate
834 and (in_)reduction for taskloop.
835 * trans.c (trans_code): Handle omp loop directive.
837 2021-06-01 Tobias Burnus <tobias@codesourcery.com>
840 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
841 (parallel) master taskloop (simd).
842 * frontend-passes.c (gfc_code_walker): Set in_omp_workshare
843 to false for parallel master taskloop (simd).
844 * gfortran.h (enum gfc_statement):
845 Add ST_OMP_(END_)(PARALLEL_)MASTER_TASKLOOP(_SIMD).
846 (enum gfc_exec_op): EXEC_OMP_(PARALLEL_)MASTER_TASKLOOP(_SIMD).
847 * match.h (gfc_match_omp_master_taskloop,
848 gfc_match_omp_master_taskloop_simd,
849 gfc_match_omp_parallel_master_taskloop,
850 gfc_match_omp_parallel_master_taskloop_simd): New prototype.
851 * openmp.c (gfc_match_omp_parallel_master_taskloop,
852 gfc_match_omp_parallel_master_taskloop_simd,
853 gfc_match_omp_master_taskloop,
854 gfc_match_omp_master_taskloop_simd): New.
855 (gfc_match_omp_taskloop_simd): Permit 'reduction' clause.
856 (resolve_omp_clauses): Handle new combined directives; remove
857 inscan-reduction check to reduce multiple errors; add
858 task-reduction error for 'taskloop simd'.
859 (gfc_resolve_omp_parallel_blocks,
860 resolve_omp_do, omp_code_to_statement,
861 gfc_resolve_omp_directive): Handle new combined constructs.
862 * parse.c (decode_omp_directive, next_statement,
863 gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
864 parse_executable): Likewise.
865 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
866 * st.c (gfc_free_statement): Likewise.
867 * trans.c (trans_code): Likewise.
868 * trans-openmp.c (gfc_split_omp_clauses,
869 gfc_trans_omp_directive): Likewise.
870 (gfc_trans_omp_parallel_master): Move after gfc_trans_omp_master_taskloop;
871 handle parallel master taskloop (simd) as well.
872 (gfc_trans_omp_taskloop): Take gfc_exec_op as arg.
873 (gfc_trans_omp_master_taskloop): New.
875 2021-05-30 Gerald Pfeifer <gerald@pfeifer.com>
877 * gfortran.texi (BOZ literal constants): Fix typo.
879 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
881 * dump-parse-tree.c (show_iterator): New.
882 (show_omp_namelist): Handle iterators.
883 (show_omp_clauses): Handle affinity.
884 * gfortran.h (gfc_free_omp_namelist): New union with 'udr' and new 'ns'.
885 * match.c (gfc_free_omp_namelist): Add are to choose union element.
886 * openmp.c (gfc_free_omp_clauses, gfc_match_omp_detach,
887 gfc_match_omp_clause_reduction, gfc_match_omp_flush): Update
888 call to gfc_free_omp_namelist.
889 (gfc_match_omp_variable_list): Likewise; permit preceeding whitespace.
890 (enum omp_mask1): Add OMP_CLAUSE_AFFINITY.
891 (gfc_match_iterator): New.
892 (gfc_match_omp_clauses): Use it; update call to gfc_free_omp_namelist.
893 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_AFFINITY.
894 (gfc_match_omp_taskwait): Match depend clause.
895 (resolve_omp_clauses): Handle affinity; update for udr/union change.
896 (gfc_resolve_omp_directive): Resolve clauses of taskwait.
897 * st.c (gfc_free_statement): Update gfc_free_omp_namelist call.
898 * trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Likewise
899 (handle_iterator): New.
900 (gfc_trans_omp_clauses): Handle iterators for depend/affinity clause.
901 (gfc_trans_omp_taskwait): Handle depend clause.
902 (gfc_trans_omp_directive): Update call.
904 2021-05-27 Harald Anlauf <anlauf@gmx.de>
907 * trans-intrinsic.c (gfc_conv_intrinsic_size): Use CLASS data
908 attributes for CLASS arrays for generation of runtime error.
910 2021-05-27 Harald Anlauf <anlauf@gmx.de>
913 * trans-array.c (gfc_conv_ss_startstride): Do not call check for
914 presence of a dummy argument when a symbol actually refers to a
917 2021-05-25 Tobias Burnus <tobias@codesourcery.com>
918 Johannes Nendwich <a08727063@unet.univie.ac.at>
920 * intrinsic.texi (GERROR, GETARGS, GETLOG, NORM2, PARITY, RANDOM_INIT,
921 RANDOM_NUMBER): Fix typos and copy'n'paste errors.
923 2021-05-24 Tobias Burnus <tobias@codesourcery.com>
926 * trans-expr.c (gfc_copy_class_to_class): Add unshare_expr.
927 * trans-openmp.c (gfc_is_polymorphic_nonptr,
928 gfc_is_unlimited_polymorphic_nonptr): New.
929 (gfc_omp_clause_copy_ctor, gfc_omp_clause_dtor): Handle
932 2021-05-23 Harald Anlauf <anlauf@gmx.de>
935 * trans-expr.c (gfc_conv_procedure_call): Adjust check for
936 implicit conversion of actual argument to an unlimited polymorphic
939 2021-05-23 Tobias Burnus <tobias@codesourcery.com>
941 * intrinsic.texi (ATOMIC_ADD, ATOMIC_FETCH_ADD): Use the
942 proper variable name in the description.
944 2021-05-22 Andre Vehreschild <vehre@gcc.gnu.org>
945 Steve Kargl <kargl@gcc.gnu.org>
948 * trans-decl.c (gfc_build_builtin_function_decls): Move decl.
949 * trans-intrinsic.c (conv_intrinsic_random_init): Use bool for
950 lib-call of caf_random_init instead of logical (4-byte).
951 * trans.h: Add tree var for random_init.
953 2021-05-20 Marcel Vollweiler <marcel@codesourcery.com>
955 * openmp.c (gfc_match_omp_clauses): Support map-type-modifier 'close'.
957 2021-05-18 Tobias Burnus <tobias@codesourcery.com>
960 * openmp.c (omp_code_to_statement): Add missing EXEC_OMP_DEPOBJ.
962 2021-05-17 Harald Anlauf <anlauf@gmx.de>
965 * trans-decl.c (gfc_finish_var_decl): Add check for explicit SAVE
968 2021-05-17 Tobias Burnus <tobias@codesourcery.com>
971 * resolve.c (gfc_resolve_code): Reject nonintrinsic assignments in
974 2021-05-14 Tobias Burnus <tobias@codesourcery.com>
976 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
977 EXEC_OMP_PARALLEL_MASTER.
978 * frontend-passes.c (gfc_code_walker): Likewise.
979 * gfortran.h (enum gfc_statement): Add ST_OMP_PARALLEL_MASTER and
980 ST_OMP_END_PARALLEL_MASTER.
981 (enum gfc_exec_op): Add EXEC_OMP_PARALLEL_MASTER..
982 * match.h (gfc_match_omp_parallel_master): Handle it.
983 * openmp.c (gfc_match_omp_parallel_master, resolve_omp_clauses,
984 omp_code_to_statement, gfc_resolve_omp_directive): Likewise.
985 * parse.c (decode_omp_directive, case_exec_markers,
986 gfc_ascii_statement, parse_omp_structured_block,
987 parse_executable): Likewise.
988 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
989 * st.c (gfc_free_statement): Likewise.
990 * trans-openmp.c (gfc_trans_omp_parallel_master,
991 gfc_trans_omp_workshare, gfc_trans_omp_directive): Likewise.
992 * trans.c (trans_code): Likewise.
994 2021-05-14 Tobias Burnus <tobias@codesourcery.com>
996 * resolve.c (resolve_symbol): Handle implicit SAVE of main-program
997 for vars in 'omp threadprivate' and 'omp declare target'.
999 2021-05-10 Martin Liska <mliska@suse.cz>
1001 * decl.c (variable_decl): Use startswith
1002 function instead of strncmp.
1003 (gfc_match_end): Likewise.
1004 * gfortran.h (gfc_str_startswith): Likewise.
1005 * module.c (load_omp_udrs): Likewise.
1006 (read_module): Likewise.
1007 * options.c (gfc_handle_runtime_check_option): Likewise.
1008 * primary.c (match_arg_list_function): Likewise.
1009 * trans-decl.c (gfc_get_symbol_decl): Likewise.
1010 * trans-expr.c (gfc_conv_procedure_call): Likewise.
1011 * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Likewise.
1013 2021-05-06 Paul Thomas <pault@gcc.gnu.org>
1017 * class.c (gfc_build_class_symbol): Remove the error that
1018 disables assumed size class arrays. Class array types that are
1019 not deferred shape or assumed rank are given a unique name and
1020 placed in the procedure namespace.
1021 * trans-array.c (gfc_trans_g77_array): Obtain the data pointer
1023 (gfc_trans_dummy_array_bias): Suppress the runtime error for
1024 extent violations in explicit shape class arrays because it
1026 * trans-expr.c (gfc_conv_procedure_call): Handle assumed size
1027 class actual arguments passed to non-descriptor formal args by
1028 using the data pointer, stored as the symbol's backend decl.
1030 2021-05-05 Harald Anlauf <anlauf@gmx.de>
1033 * interface.c (gfc_compare_actual_formal): Continue checks after
1034 emitting warning for argument length mismatch.
1035 * trans-expr.c (gfc_conv_procedure_call): Check for NULL pointer
1038 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
1041 * trans-openmp.c (gfc_trans_omp_depobj): Fix pasto in enum values.
1043 2021-04-28 Tobias Burnus <tobias@codesourcery.com>
1045 * openmp.c (gfc_match_omp_variable_list): Gobble whitespace before
1046 checking whether a '%' or parenthesis-open follows as next character.
1048 2021-04-28 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1051 * trans-expr.c (gfc_conv_procedure_call): Evaluate function result
1052 and then pass a pointer.
1054 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1055 Nathan Sidwell <nathan@codesourcery.com>
1056 Tom de Vries <vries@codesourcery.com>
1057 Julian Brown <julian@codesourcery.com>
1058 Kwok Cheung Yeung <kcy@codesourcery.com>
1060 * lang.opt (Wopenacc-parallelism): New.
1062 2021-04-24 Harald Anlauf <anlauf@gmx.de>
1065 * check.c (variable_check): Allow function reference having a data
1067 (arg_strlen_is_zero): New function.
1068 (gfc_check_fgetputc_sub): Add static check of character and status
1070 (gfc_check_fgetput_sub): Likewise.
1071 * intrinsic.c (add_subroutines): Fix argument name for the
1072 character argument to intrinsic subroutines fget[c], fput[c].
1074 2021-04-24 Harald Anlauf <anlauf@gmx.de>
1077 * expr.c (gfc_check_vardef_context): Extend check to allow pointer
1078 from a function reference.
1080 2021-04-22 Martin Liska <mliska@suse.cz>
1084 * frontend-passes.c (optimize_expr): Fix typos and missing comments.
1086 2021-04-22 Michael Meissner <meissner@linux.ibm.com>
1089 * trans-intrinsic.c (build_round_expr): If int type is larger than
1090 long long, do the round and convert to the integer type. Do not
1091 try to find a floating point type the exact size of the integer
1094 2021-04-21 Tobias Burnus <tobias@codesourcery.com>
1096 * dump-parse-tree.c (show_omp_namelist): Handle depobj + mutexinoutset
1097 in the depend clause.
1098 (show_omp_clauses, show_omp_node, show_code_node): Handle depobj.
1099 * gfortran.h (enum gfc_statement): Add ST_OMP_DEPOBJ.
1100 (enum gfc_omp_depend_op): Add OMP_DEPEND_UNSET,
1101 OMP_DEPEND_MUTEXINOUTSET and OMP_DEPEND_DEPOBJ.
1102 (gfc_omp_clauses): Add destroy, depobj_update and depobj.
1103 (enum gfc_exec_op): Add EXEC_OMP_DEPOBJ
1104 * match.h (gfc_match_omp_depobj): Match 'omp depobj'.
1105 * openmp.c (gfc_match_omp_clauses): Add depobj + mutexinoutset
1107 (gfc_match_omp_depobj, resolve_omp_clauses, gfc_resolve_omp_directive):
1108 Handle 'omp depobj'.
1109 * parse.c (decode_omp_directive, next_statement, gfc_ascii_statement):
1111 * resolve.c (gfc_resolve_code): Likewise.
1112 * st.c (gfc_free_statement): Likewise.
1113 * trans-openmp.c (gfc_trans_omp_clauses): Handle depobj + mutexinoutset
1114 in the depend clause.
1115 (gfc_trans_omp_depobj, gfc_trans_omp_directive): Handle EXEC_OMP_DEPOBJ.
1116 * trans.c (trans_code): Likewise.
1118 2021-04-20 Paul Thomas <pault@gcc.gnu.org>
1121 * trans-decl.c (gfc_get_symbol_decl): Replace test for host
1122 association with a check that the current and symbol namespaces
1125 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1127 * lang.opt (fopenacc-kernels=): Remove.
1129 2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1132 * trans-array.c (gfc_trans_deferred_array): Add code to initialize
1133 pointers and allocatables with correct TKR parameters.
1135 2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1138 * resolve.c: Add association check before de-referencing pointer.
1140 2021-04-16 Harald Anlauf <anlauf@gmx.de>
1141 Paul Thomas <pault@gcc.gnu.org>
1144 * module.c (write_symtree): Do not write interface of intrinsic
1145 procedure to module file for F2003 and newer.
1147 2021-04-15 Paul Thomas <pault@gcc.gnu.org>
1150 * symbol.c: Remove trailing white space.
1151 * trans-array.c (gfc_trans_create_temp_array): Create a class
1152 temporary for class expressions and assign the new descriptor
1154 (build_class_array_ref): If the class expr can be extracted,
1155 then use that for 'decl'. Class function results are reliably
1156 handled this way. Call gfc_find_and_cut_at_last_class_ref to
1157 eliminate largely redundant code. Remove dead code and recast
1158 the rest of the code to extract 'decl' for remaining cases.
1159 Call gfc_build_spanned_array_ref.
1160 (gfc_alloc_allocatable_for_assignment): Use class descriptor
1161 element length for 'elemsize1'. Eliminate repeat set of dtype
1162 for class expressions.
1163 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Include
1164 additional code from build_class_array_ref, and use optional
1165 gfc_typespec pointer argument.
1166 (gfc_trans_scalar_assign): Make use of pre and post blocks for
1167 all class expressions.
1168 * trans.c (get_array_span): For unlimited polymorphic exprs
1169 multiply the span by the value of the _len field.
1170 (gfc_build_spanned_array_ref): New function.
1171 (gfc_build_array_ref): Call gfc_build_spanned_array_ref and
1172 eliminate repeated code.
1173 * trans.h: Add arg to gfc_find_and_cut_at_last_class_ref and
1174 add prototype for gfc_build_spanned_array_ref.
1176 2021-04-14 Martin Liska <mliska@suse.cz>
1178 * intrinsic.texi: The table has first column empty and it makes
1179 trouble when processing makeinfo --xml output.
1181 2021-04-09 Tobias Burnus <tobias@codesourcery.com>
1184 * trans-types.c (gfc_get_function_type): Also generate hidden
1185 coarray argument for character arguments.
1187 2021-04-03 Paul Thomas <pault@gcc.gnu.org>
1190 * interface.c (compare_parameter): The codimension attribute is
1191 applied to the _data field of class formal arguments.
1193 2021-04-01 Harald Anlauf <anlauf@gmx.de>
1196 * simplify.c (gfc_simplify_transpose): Properly initialize
1199 2021-03-28 Paul Thomas <pault@gcc.gnu.org>
1202 * trans-expr.c (gfc_conv_procedure_call): Use the _data attrs
1203 for class expressions and detect proc pointer evaluations by
1204 the non-null actual argument list.
1206 2021-03-27 Steve Kargl <kargl@gcc.gnu.org>
1208 * misc.c (gfc_typename): Fix off-by-one in buffer sizes.
1210 2021-03-26 Tobias Burnus <tobias@codesourcery.com>
1213 * intrinsic.c (gfc_intrinsic_func_interface): Set
1214 attr.proc = PROC_INTRINSIC if FL_PROCEDURE.
1216 2021-03-24 Tobias Burnus <tobias@codesourcery.com>
1219 * resolve.c (resolve_operator): Make 'msg' buffer larger
1222 2021-03-23 Tobias Burnus <tobias@codesourcery.com>
1225 * trans-decl.c (build_function_decl): Add comment;
1226 increment hidden_typelist for caf_token/caf_offset.
1227 * trans-types.c (gfc_get_function_type): Add comment;
1228 add missing caf_token/caf_offset args.
1230 2021-03-22 Tobias Burnus <tobias@codesourcery.com>
1233 * match.c (select_type_set_tmp, gfc_match_select_type,
1234 gfc_match_select_rank): Fix 'name' buffersize to avoid out of bounds.
1235 * resolve.c (resolve_select_type): Likewise.
1237 2021-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1239 * frontend-passes.c (inline_limit_check): Add rank_a
1240 argument. If a is rank 1, set the second dimension to 1.
1241 (inline_matmul_assign): Pass rank_a argument to inline_limit_check.
1242 (call_external_blas): Likewise.
1244 2021-03-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1247 * frontend-passes.c (doloop_contained_procedure_code):
1248 Properly handle EXEC_IOLENGTH.
1250 2021-03-15 Paul Thomas <pault@gcc.gnu.org>
1253 * trans-stmt.c (gfc_trans_allocate): Mark the initialization
1254 assignment by setting init_flag.
1256 2021-03-14 Harald Anlauf <anlauf@gmx.de>
1257 Paul Thomas <pault@gcc.gnu.org>
1259 * trans-expr.c (gfc_conv_procedure_call): Fix runtime checks for
1261 * trans-intrinsic.c (gfc_conv_intrinsic_size): Likewise.
1263 2021-03-13 Paul Thomas <pault@gcc.gnu.org>
1266 * trans-array.c (gfc_conv_expr_descriptor): For deferred length
1267 length components use the ss_info string length instead of
1268 gfc_get_expr_charlen. Make sure that the deferred string length
1269 is a variable before assigning to it. Otherwise use the expr.
1270 * trans-expr.c (gfc_conv_string_length): Make sure that the
1271 deferred string length is a variable before assigning to it.
1273 2021-03-12 Tobias Burnus <tobias@codesourcery.com>
1276 * resolve.c (resolve_symbol): Accept vars which are in DATA
1277 and hence (either) implicit SAVE (or in common).
1279 2021-03-10 Harald Anlauf <anlauf@gmx.de>
1282 * data.c (gfc_assign_data_value): Reject non-constant character
1284 * trans-array.c (gfc_conv_array_initializer): Restrict loop to
1285 elements which are defined to avoid NULL pointer dereference.
1287 2021-03-10 Tobias Burnus <tobias@codesourcery.com>
1289 * intrinsic.texi (MIN): Correct 'maximum' to 'minimum'.
1291 2021-03-10 Eric Botcazou <ebotcazou@adacore.com>
1294 * trans-intrinsic.c (build_round_expr): Do not implicitly assume
1295 that __float128 is the 128-bit floating-point type.
1297 2021-03-08 Harald Anlauf <anlauf@gmx.de>
1300 * data.c (gfc_assign_data_value): Reject variable with PARAMETER
1301 attribute in DATA statement.
1303 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
1307 * invoke.texi (-freal{4,8}-real-*): Extend description.
1308 * primary.c (match_real_constant): Also promote real literals
1309 with '_kind' number.
1311 2021-03-04 Tobias Burnus <tobias@codesourcery.com>
1314 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Avoid
1315 redoing kind conversions.
1316 * primary.c (match_real_constant): Likewise.
1318 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1321 * openmp.c (gfc_omp_requires_add_clause): Fix up diagnostic message
1323 (resolve_omp_clauses): Likewise.
1325 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1328 * frontend-passes.c (doloop_code): Replace double space in diagnostics
1329 with a single space.
1331 2021-02-24 Paul Thomas <pault@gcc.gnu.org>
1334 * trans-expr.c (gfc_conv_derived_to_class): Add optional arg.
1335 'derived_array' to hold the fixed, parmse expr in the case of
1336 assumed rank formal arguments. Deal with optional arguments.
1337 (gfc_conv_procedure_call): Null 'derived' array for each actual
1338 argument. Add its address to the call to gfc_conv_derived_to_
1339 class. Access the 'data' field of scalar descriptors before
1340 deallocating allocatable components. Also strip NOPs before the
1341 calls to gfc_deallocate_alloc_comp. Use 'derived' array as the
1342 input to gfc_deallocate_alloc_comp if it is available.
1343 * trans.h : Include the optional argument 'derived_array' to
1344 the prototype of gfc_conv_derived_to_class. The default value
1347 2021-02-23 Paul Thomas <pault@gcc.gnu.org>
1350 * resolve.c (resolve_fl_procedure): Include class results in
1351 the test for F2018, C15100.
1352 * trans-array.c (get_class_info_from_ss): Do not use the saved
1353 descriptor to obtain the class expression for variables. Use
1354 gfc_get_class_from_expr instead.
1356 2021-02-23 Harald Anlauf <anlauf@gmx.de>
1359 * simplify.c (gfc_simplify_reshape): Set string length for
1360 character arguments.
1362 2021-02-22 Tobias Burnus <tobias@codesourcery.com>
1365 * trans-openmp.c (gfc_omp_is_optional_argument): Regard optional
1366 dummy procs as nonoptional as no special treatment is needed.
1368 2021-02-21 Harald Anlauf <anlauf@gmx.de>
1370 * trans-expr.c (gfc_conv_procedure_call): Do not add clobber to
1371 allocatable intent(out) argument.
1373 2021-02-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1376 * match.c (gfc_match_namelist): If BT_UNKNOWN, check for
1377 IMPLICIT NONE and and issue an error, otherwise set the type
1378 to its IMPLICIT type so that any subsequent use of objects will
1379 will confirm their types.
1381 2021-02-19 Harald Anlauf <anlauf@gmx.de>
1383 * symbol.c (gfc_add_flavor): Reverse order of conditions.
1385 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1388 * dependency.c (gfc_dep_resolver): Fix coarray handling.
1390 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1395 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1398 * simplify.c (simplify_bound_dim): Honor DIMEN_ELEMENT
1401 2021-02-17 Julian Brown <julian@codesourcery.com>
1403 * openmp.c (resolve_omp_clauses): Disallow selecting components
1404 of arrays of derived type.
1406 2021-02-17 Julian Brown <julian@codesourcery.com>
1408 * trans-openmp.c (gfc_trans_omp_clauses): Handle element selection
1409 for arrays of derived types.
1411 2021-02-16 Tobias Burnus <tobias@codesourcery.com>
1413 * expr.c (gfc_is_simplify_contiguous): Handle REF_INQUIRY, i.e.
1414 %im and %re which are EXPR_VARIABLE.
1415 * openmp.c (resolve_omp_clauses): Diagnose %re/%im explicitly.
1417 2021-02-16 Tobias Burnus <tobias@codesourcery.com>
1420 * io.c (resolve_tag_format): Reject BT_DERIVED/CLASS/VOID
1421 as (array-valued) FORMAT tag.
1423 2021-02-12 Tobias Burnus <tobias@codesourcery.com>
1426 * trans-expr.c (gfc_conv_procedure_call): Don't reset
1427 rank of assumed-rank array.
1429 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
1432 * match.c (gfc_match_call): Include associate names as possible
1433 entities with typebound subroutines. The target needs to be
1434 resolved for the type.
1436 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
1439 * primary.c (gfc_match_varspec): Test for non-null 'previous'
1440 before using its name in the error message.
1442 2021-02-11 Tobias Burnus <tobias@codesourcery.com>
1444 * intrinsic.texi (FINDLOC): Add 'MASK' to argument table.
1445 (MAXLOC, MAXVAL, MINLOC, MINVAL): For 'MASK', remove 'an
1446 array' as scalars are also permitted.
1448 2021-02-10 Julian Brown <julian@codesourcery.com>
1451 * openmp.c (resolve_omp_clauses): Omit OpenACC update in
1452 contiguity check and stride-specified error.
1454 2021-02-04 Julian Brown <julian@codesourcery.com>
1456 * openmp.c (resolve_omp_clauses): Omit OpenACC update in
1457 contiguity check and stride-specified error.
1459 2021-02-04 Julian Brown <julian@codesourcery.com>
1461 * trans-openmp.c (gfc_trans_omp_clauses): Use class_pointer attribute
1464 2021-02-04 Julian Brown <julian@codesourcery.com>
1466 * trans-openmp.c (gfc_trans_omp_clauses): Fix dereferencing for
1469 2021-02-04 Tobias Burnus <tobias@codesourcery.com>
1471 * openmp.c (resolve_omp_clauses): Explicitly diagnose
1472 substrings as not permitted.
1474 2021-02-03 Jeff Law <law@redhat.com>
1476 * intrinsic.texi (ANINT): Fix typo.
1478 2021-02-03 Tobias Burnus <tobias@codesourcery.com>
1481 * dependency.c (gfc_dep_resolver): Treat local access
1482 to coarrays like any array access in dependency analysis.
1484 2021-01-28 Harald Anlauf <anlauf@gmx.de>
1487 * trans.c (gfc_call_malloc): Allocate area of size 1 if passed
1488 size is NULL (as documented).
1490 2021-01-27 Paul Thomas <pault@gcc.gnu.org>
1494 * trans-expr.c (gfc_conv_procedure_call): Suppress the call to
1495 gfc_conv_intrinsic_to_class for unlimited polymorphic procedure
1497 (gfc_trans_assignment_1): Similarly suppress class assignment
1498 for class valued procedure pointers.
1500 2021-01-27 Paul Thomas <pault@gcc.gnu.org>
1503 * trans-array.c (gfc_conv_expr_descriptor): Include elemental
1504 procedure pointers in the assert under the comment 'elemental
1505 function' and eliminate the second, spurious assert.
1507 2021-01-25 Harald Anlauf <anlauf@gmx.de>
1510 * data.c (create_character_initializer): Check substring indices
1512 (gfc_assign_data_value): Catch error returned from
1513 create_character_initializer.
1515 2021-01-25 Tobias Burnus <tobias@codesourcery.com>
1517 * intrinsic.texi (CO_BROADCAST, CO_MIN, CO_REDUCE, CO_SUM): Fix typos.
1519 2021-01-25 Steve Kargl <kargl@gcc.gnu.org>
1522 * resolve.c (resolve_charlen): Check that length expression is
1523 present before testing for scalar/integer..
1525 2021-01-22 Paul Thomas <pault@gcc.gnu.org>
1528 * trans-intrinsic.c (gfc_conv_associated): Do not add a _data
1529 component for scalar class function targets. Instead, fix the
1530 function result and access the _data from that.
1532 2021-01-21 Jorge D'Elia <jdelia@cimec.unl.edu.ar>
1534 * intrinsic.texi (CO_MAX): Fix typo.
1536 2021-01-21 Paul Thomas <pault@gcc.gnu.org>
1539 * decl.c (gfc_match_modproc): It is not an error to find a
1540 module procedure declaration within a contains block.
1541 * expr.c (gfc_check_vardef_context): Pure procedure result is
1542 assignable. Change 'own_scope' accordingly.
1543 * resolve.c (resolve_typebound_procedure): A procedure that
1544 has the module procedure attribute is almost certainly a
1545 module procedure, whatever its interface.
1547 2021-01-19 Tobias Burnus <tobias@codesourcery.com>
1550 * openmp.c (resolve_omp_clauses): Change use_device_ptr
1551 to use_device_addr for unless type(c_ptr); check all
1552 list item for is_device_ptr.
1554 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1556 * dump-parse-tree.c (show_omp_clauses): Handle detach clause.
1557 * frontend-passes.c (gfc_code_walker): Walk detach expression.
1558 * gfortran.h (struct gfc_omp_clauses): Add detach field.
1559 (gfc_c_intptr_kind): New.
1560 * openmp.c (gfc_free_omp_clauses): Free detach clause.
1561 (gfc_match_omp_detach): New.
1562 (enum omp_mask1): Add OMP_CLAUSE_DETACH.
1563 (enum omp_mask2): Remove OMP_CLAUSE_DETACH.
1564 (gfc_match_omp_clauses): Handle OMP_CLAUSE_DETACH for OpenMP.
1565 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DETACH.
1566 (resolve_omp_clauses): Prevent use of detach with mergeable and
1567 overriding the data sharing mode of the event handle.
1568 * trans-openmp.c (gfc_trans_omp_clauses): Handle detach clause.
1569 * trans-types.c (gfc_c_intptr_kind): New.
1570 (gfc_init_kinds): Initialize gfc_c_intptr_kind.
1572 (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT): Rename
1574 (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT_PTR):
1575 ...this. Add extra argument.
1577 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1579 * gfortran.h (gfc_resolve_substring): Add prototype.
1580 * primary.c (match_string_constant): Simplify substrings with
1581 constant starting and ending points.
1582 * resolve.c: Rename resolve_substring to gfc_resolve_substring.
1583 (gfc_resolve_ref): Use renamed function gfc_resolve_substring.
1585 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1588 * resolve.c (resolve_component): Derived type components with
1589 ALLOCATABLE or POINTER attribute shall have a deferred shape.
1591 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1594 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1597 * resolve.c (resolve_component): Derived type components with
1598 ALLOCATABLE or POINTER attribute shall have a deferred shape.
1600 2021-01-14 Harald Anlauf <anlauf@gmx.de>
1603 * resolve.c (resolve_component): Derived type components with
1604 ALLOCATABLE or POINTER attribute shall have a deferred shape.
1606 2021-01-08 Paul Thomas <pault@gcc.gnu.org>
1609 * trans-expr.c (gfc_conv_component_ref): Remove the condition
1610 that deferred character length components only be allocatable.
1612 2021-01-08 Paul Thomas <pault@gcc.gnu.org>
1615 * simplify.c (is_constant_array_expr): If an array constructor
1616 expression has elements other than constants or structures, try
1617 fixing the expression with gfc_reduce_init_expr. Also, if shape
1618 is NULL, obtain the array size and set it.
1620 2021-01-07 Paul Thomas <pault@gcc.gnu.org>
1623 * resolve.c (find_array_spec): Put static prototype for
1624 resolve_assoc_var before this function and call for associate
1627 2021-01-06 Harald Anlauf <anlauf@gmx.de>
1629 * resolve.c (resolve_component): Add check for valid CLASS
1630 reference before trying to access CLASS data.
1632 2021-01-04 Martin Liska <mliska@suse.cz>
1634 * ChangeLog-2018: Remove duplicate ChangeLog entries.
1636 2021-01-01 Harald Anlauf <anlauf@gmx.de>
1638 * class.c (gfc_find_vtab): Add check on attribute is_class.
1640 2021-01-01 Jakub Jelinek <jakub@redhat.com>
1642 * gfortranspec.c (lang_specific_driver): Update copyright notice
1644 * gfc-internals.texi: Bump @copying's copyright year.
1645 * gfortran.texi: Ditto.
1646 * intrinsic.texi: Ditto.
1647 * invoke.texi: Ditto.
1649 2021-01-01 Jakub Jelinek <jakub@redhat.com>
1651 * ChangeLog-2020: Rotate ChangeLog. New file.
1654 Copyright (C) 2021 Free Software Foundation, Inc.
1656 Copying and distribution of this file, with or without modification,
1657 are permitted in any medium without royalty provided the copyright
1658 notice and this notice are preserved.