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