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