Daily bump.
[official-gcc.git] / gcc / fortran / ChangeLog
blob2d3d33a13b06ee25e22e797779c27508cfb99b2c
1 2021-10-15  Harald Anlauf  <anlauf@gmx.de>
2             Tobias Burnus  <tobias@codesourcery.com>
4         PR fortran/102685
5         * decl.c (match_clist_expr): Set rank/shape of clist initializer
6         to match LHS.
7         * resolve.c (resolve_structure_cons): In a structure constructor,
8         compare shapes of array components against declared shape.
10 2021-10-14  Harald Anlauf  <anlauf@gmx.de>
12         PR fortran/102717
13         * simplify.c (gfc_simplify_reshape): Replace assert by error
14         message for negative elements in SHAPE array.
16 2021-10-14  Harald Anlauf  <anlauf@gmx.de>
18         PR fortran/102716
19         * check.c (gfc_check_shape): Reorder checks so that invalid KIND
20         arguments can be detected.
22 2021-10-14  Kwok Cheung Yeung  <kcy@codesourcery.com>
24         * gfortran.h (enum gfc_statement): Add ST_OMP_DECLARE_VARIANT.
25         (enum gfc_omp_trait_property_kind): New.
26         (struct gfc_omp_trait_property): New.
27         (gfc_get_omp_trait_property): New macro.
28         (struct gfc_omp_selector): New.
29         (gfc_get_omp_selector): New macro.
30         (struct gfc_omp_set_selector): New.
31         (gfc_get_omp_set_selector): New macro.
32         (struct gfc_omp_declare_variant): New.
33         (gfc_get_omp_declare_variant): New macro.
34         (struct gfc_namespace): Add omp_declare_variant field.
35         (gfc_free_omp_declare_variant_list): New prototype.
36         * match.h (gfc_match_omp_declare_variant): New prototype.
37         * openmp.c (gfc_free_omp_trait_property_list): New.
38         (gfc_free_omp_selector_list): New.
39         (gfc_free_omp_set_selector_list): New.
40         (gfc_free_omp_declare_variant_list): New.
41         (gfc_match_omp_clauses): Add extra optional argument.  Handle end of
42         clauses for context selectors.
43         (omp_construct_selectors, omp_device_selectors,
44         omp_implementation_selectors, omp_user_selectors): New.
45         (gfc_match_omp_context_selector): New.
46         (gfc_match_omp_context_selector_specification): New.
47         (gfc_match_omp_declare_variant): New.
48         * parse.c: Include tree-core.h and omp-general.h.
49         (decode_omp_directive): Handle 'declare variant'.
50         (case_omp_decl): Include ST_OMP_DECLARE_VARIANT.
51         (gfc_ascii_statement): Handle ST_OMP_DECLARE_VARIANT.
52         (gfc_parse_file): Initialize omp_requires_mask.
53         * symbol.c (gfc_free_namespace): Call
54         gfc_free_omp_declare_variant_list.
55         * trans-decl.c (gfc_get_extern_function_decl): Call
56         gfc_trans_omp_declare_variant.
57         (gfc_create_function_decl): Call gfc_trans_omp_declare_variant.
58         * trans-openmp.c (gfc_trans_omp_declare_variant): New.
59         * trans-stmt.h (gfc_trans_omp_declare_variant): New prototype.
61 2021-10-13  Tobias Burnus  <tobias@codesourcery.com>
63         * dump-parse-tree.c (show_omp_clauses): Handle ancestor modifier,
64         avoid ICE for GFC_OMP_ATOMIC_SWAP.
65         * gfortran.h (gfc_omp_clauses): Change 'anecestor' into a bitfield.
67 2021-10-12  Tobias Burnus  <tobias@codesourcery.com>
69         PR fortran/102541
70         * check.c (gfc_check_present): Handle optional CLASS.
71         * interface.c (gfc_compare_actual_formal): Likewise.
72         * trans-array.c (gfc_trans_g77_array): Likewise.
73         * trans-decl.c (gfc_build_dummy_array_decl): Likewise.
74         * trans-types.c (gfc_sym_type): Likewise.
75         * primary.c (gfc_variable_attr): Fixes for dummy and
76         pointer when 'class%_data' is passed.
77         * trans-expr.c (set_dtype_for_unallocated, gfc_conv_procedure_call):
78         For assumed-rank dummy, fix setting rank for dealloc/notassoc actual
79         and setting ubound to -1 for assumed-size actuals.
81 2021-10-10  Harald Anlauf  <anlauf@gmx.de>
83         PR fortran/99348
84         PR fortran/102521
85         * decl.c (add_init_expr_to_sym): Extend initialization of
86         parameter arrays from scalars to handle derived types.
88 2021-10-09  Harald Anlauf  <anlauf@gmx.de>
90         PR fortran/65454
91         * module.c (read_module): Handle old and new-style relational
92         operators when used in USE module, ONLY: OPERATOR(op).
94 2021-10-08  Sandra Loosemore  <sandra@codesourcery.com>
96         PR fortran/54753
97         * interface.c (gfc_compare_actual_formal): Add diagnostic
98         for F2018:C839.  Refactor shared code and fix bugs with class
99         array info lookup, and extend similar diagnostic from PR94110
100         to also cover class types.
102 2021-10-08  Martin Liska  <mliska@suse.cz>
104         * options.c (gfc_post_options): Use new macro
105         OPTION_SET_P.
107 2021-10-06  Tobias Burnus  <tobias@codesourcery.com>
109         * resolve.c (resolve_values): Only show
110         deprecated warning if attr.referenced.
112 2021-10-04  Tobias Burnus  <tobias@codesourcery.com>
114         PR fortran/54753
115         * resolve.c (can_generate_init, resolve_fl_variable_derived,
116         resolve_symbol): Only do initialization with intent(out) if not
117         inside of an interface block.
119 2021-10-01  Martin Sebor  <msebor@redhat.com>
121         PR c/102103
122         * array.c: Remove an unnecessary test.
123         * trans-array.c: Same.
125 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
127         * gfortran.h (gfc_omp_clauses): Add order_reproducible bitfield.
128         * dump-parse-tree.c (show_omp_clauses): Print REPRODUCIBLE: for it.
129         * openmp.c (gfc_match_omp_clauses): Set order_reproducible for
130         explicit reproducible: modifier.
131         * trans-openmp.c (gfc_trans_omp_clauses): Set
132         OMP_CLAUSE_ORDER_REPRODUCIBLE for order_reproducible.
133         (gfc_split_omp_clauses): Also copy order_reproducible.
135 2021-09-30  Harald Anlauf  <anlauf@gmx.de>
137         PR fortran/102458
138         * simplify.c (simplify_size): Resolve expressions used in array
139         specifications so that SIZE can be simplified.
141 2021-09-30  Harald Anlauf  <anlauf@gmx.de>
143         * expr.c: The correct reference to Fortran standard is: F2018:10.1.12.
145 2021-09-30  Tobias Burnus  <tobias@codesourcery.com>
147         PR fortran/71703
148         PR fortran/84007
149         * trans-intrinsic.c (gfc_conv_same_type_as): Fix handling
150         of UNLIMITED_POLY.
151         * trans.h (gfc_vtpr_hash_get): Renamed prototype to ...
152         (gfc_vptr_hash_get): ... this to match function name.
154 2021-09-29  Harald Anlauf  <anlauf@gmx.de>
156         PR fortran/102520
157         * array.c (expand_constructor): Do not dereference NULL pointer.
159 2021-09-27  Tobias Burnus  <tobias@codesourcery.com>
161         PR fortran/94070
162         * trans-array.c (gfc_tree_array_size): New function to
163         find size inline (whole array or one dimension).
164         (array_parameter_size): Use it, take stmt_block as arg.
165         (gfc_conv_array_parameter): Update call.
166         * trans-array.h (gfc_tree_array_size): Add prototype.
167         * trans-decl.c (gfor_fndecl_size0, gfor_fndecl_size1): Remove
168         these global vars.
169         (gfc_build_intrinsic_function_decls): Remove their initialization.
170         * trans-expr.c (gfc_conv_procedure_call): Update
171         bounds of pointer/allocatable actual args to nonallocatable/nonpointer
172         dummies to be one based.
173         * trans-intrinsic.c (gfc_conv_intrinsic_shape): Fix case for
174         assumed rank with allocatable/pointer dummy.
175         (gfc_conv_intrinsic_size): Update to use inline function.
176         * trans.h (gfor_fndecl_size0, gfor_fndecl_size1): Remove var decl.
178 2021-09-26  Tobias Burnus  <tobias@codesourcery.com>
180         PR fortran/101334
181         * trans-intrinsic.c (gfc_conv_associated): Support assumed-rank
182         'pointer' with scalar/array 'target' argument.
184 2021-09-24  Harald Anlauf  <anlauf@gmx.de>
186         PR fortran/102458
187         * expr.c (is_non_constant_intrinsic): Check for intrinsics
188         excluded in constant expressions (F2018:10.1.2).
189         (gfc_is_constant_expr): Use that check.
191 2021-09-24  Sandra Loosemore  <sandra@codesourcery.com>
193         PR fortran/101333
194         * interface.c (compare_parameter): Enforce F2018 C711.
196 2021-09-24  Tobias Burnus  <tobias@codesourcery.com>
198         PR fortran/55534
199         * scanner.c (load_file): Return void, call (gfc_)fatal_error for
200         all errors.
201         (include_line, include_stmt, gfc_new_file): Remove exit call
202         for failed load_file run.
204 2021-09-23  Sandra Loosemore  <sandra@codesourcery.com>
206         PR fortran/101320
207         * decl.c (gfc_verify_c_interop_param): Handle F2018 C1557,
208         aka TS29113 C516.
210 2021-09-23  Harald Anlauf  <anlauf@gmx.de>
211             Tobias Burnus  <tobias@codesourcery.com>
213         PR fortran/93834
214         * trans-intrinsic.c (gfc_conv_allocated): Cleanup. Handle
215         coindexed scalar coarrays.
217 2021-09-23  Sandra Loosemore  <sandra@codesourcery.com>
219         PR fortran/101319
220         * interface.c (gfc_compare_actual_formal): Extend existing
221         assumed-type diagnostic to also check for argument with type
222         parameters.
224 2021-09-23  Sandra Loosemore  <sandra@codesourcery.com>
226         PR fortran/101334
227         * check.c (gfc_check_associated): Allow an assumed-rank
228         array for the pointer argument.
229         * interface.c (compare_parameter): Also give rank mismatch
230         error on assumed-rank array.
232 2021-09-23  Sandra Loosemore  <sandra@codesourcery.com>
234         * trans-stmt.c (trans_associate_var): Check that result of
235         GFC_DECL_SAVED_DESCRIPTOR is not null before using it.
237 2021-09-22  Tobias Burnus  <tobias@codesourcery.com>
239         PR fortran/55534
240         * cpp.c (gfc_cpp_register_include_paths, gfc_cpp_post_options):
241         Add new bool verbose_missing_dir_warn argument.
242         * cpp.h (gfc_cpp_post_options): Update prototype.
243         * f95-lang.c (gfc_init): Remove duplicated file-not found diag.
244         * gfortran.h (gfc_check_include_dirs): Takes bool
245         verbose_missing_dir_warn arg.
246         (gfc_new_file): Returns now void.
247         * options.c (gfc_post_options): Update to warn for -I and -J,
248         only, by default but for all when user requested.
249         * scanner.c (gfc_do_check_include_dir):
250         (gfc_do_check_include_dirs, gfc_check_include_dirs): Take bool
251         verbose warn arg and update to avoid printing the same message
252         twice or never.
253         (load_file): Fix indent.
254         (gfc_new_file): Return void and exit when load_file failed
255         as all other load_file users do.
257 2021-09-22  Tobias Burnus  <tobias@codesourcery.com>
259         * trans-expr.c (gfc_simple_for_loop): New.
260         * trans.h (gfc_simple_for_loop): New prototype.
262 2021-09-21  Tobias Burnus  <tobias@codesourcery.com>
264         PR fortran/55534
265         * cpp.c: Define GCC_C_COMMON_C for #include "options.h" to make
266         cpp_reason_option_codes available.
267         (gfc_cpp_register_include_paths): Make static, set pfile's
268         warn_missing_include_dirs and move before caller.
269         (gfc_cpp_init_cb): New, cb code moved from ...
270         (gfc_cpp_init_0): ... here.
271         (gfc_cpp_post_options): Call gfc_cpp_init_cb.
272         (cb_cpp_diagnostic_cpp_option): New. As implemented in c-family
273         to match CppReason flags to -W... names.
274         (cb_cpp_diagnostic): Use it to replace single special case.
275         * cpp.h (gfc_cpp_register_include_paths): Remove as now static.
276         * gfortran.h (gfc_check_include_dirs): New prototype.
277         (gfc_add_include_path): Add new bool arg.
278         * options.c (gfc_init_options): Don't set -Wmissing-include-dirs.
279         (gfc_post_options): Set it here after commandline processing. Call
280         gfc_add_include_path with defer_warn=false.
281         (gfc_handle_option): Call it with defer_warn=true.
282         * scanner.c (gfc_do_check_include_dir, gfc_do_check_include_dirs,
283         gfc_check_include_dirs): New. Diagnostic moved from ...
284         (add_path_to_list): ... here, which came before cmdline processing.
285         Take additional bool defer_warn argument.
286         (gfc_add_include_path): Take additional defer_warn arg.
287         * scanner.h (struct gfc_directorylist): Reorder for alignment issues,
288         add new 'bool warn'.
290 2021-09-20  Tobias Burnus  <tobias@codesourcery.com>
292         * gfortran.h (gfc_omp_clauses): Add order_unconstrained.
293         * dump-parse-tree.c (show_omp_clauses): Dump it.
294         * openmp.c (gfc_match_omp_clauses): Match unconstrained/reproducible
295         modifiers to ordered(concurrent).
296         (OMP_DISTRIBUTE_CLAUSES): Accept ordered clause.
297         (resolve_omp_clauses): Reject ordered + order on same directive.
298         * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses): Pass
299         on unconstrained modifier of ordered(concurrent).
301 2021-09-17  Harald Anlauf  <anlauf@gmx.de>
303         PR fortran/102366
304         * trans-decl.c (gfc_finish_var_decl): Disable the warning message
305         for variables moved from stack to static storange if they are
306         declared in the main, but allow the move to happen.
308 2021-09-17  Sandra Loosemore  <sandra@codesourcery.com>
310         * intrinsic.texi (ISO_C_BINDING): Change C_FLOAT128 to correspond
311         to _Float128 rather than __float128.
312         * iso-c-binding.def (c_float128): Update comments.
313         * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Likewise.
314         (build_round_expr): Likewise.
315         (gfc_build_intrinsic_lib_fndcecls): Likewise.
316         * trans-types.h (gfc_real16_is_float128): Likewise.
318 2021-09-16  Harald Anlauf  <anlauf@gmx.de>
320         PR fortran/102287
321         * trans-expr.c (gfc_conv_procedure_call): Wrap deallocation of
322         allocatable components of optional allocatable derived type
323         procedure arguments with INTENT(OUT) into a presence check.
325 2021-09-14  Harald Anlauf  <anlauf@gmx.de>
327         PR fortran/102311
328         * resolve.c (resolve_entries): Attempt to recover cleanly after
329         rejecting mismatched function entries.
331 2021-09-14  Tobias Burnus  <tobias@codesourcery.com>
333         PR fortran/102313
334         * parse.c (gfc_ascii_statement): Add missing ST_OMP_END_SCOPE.
336 2021-09-13  Harald Anlauf  <anlauf@gmx.de>
338         PR fortran/82314
339         * decl.c (add_init_expr_to_sym): For proper initialization of
340         array-valued named constants the array bounds need to be
341         simplified before adding the initializer.
343 2021-09-13  Harald Anlauf  <anlauf@gmx.de>
345         PR fortran/85130
346         * expr.c (find_substring_ref): Handle given substring start and
347         end indices as signed integers, not unsigned.
349 2021-09-09  Harald Anlauf  <anlauf@gmx.de>
351         PR fortran/98490
352         * trans-expr.c (gfc_conv_substring): Do not generate substring
353         bounds check for implied do loop index variable before it actually
354         becomes defined.
356 2021-09-08  liuhongt  <hongtao.liu@intel.com>
358         * options.c (gfc_post_options): Issue an error for
359         -fexcess-precision=16.
361 2021-09-07  Harald Anlauf  <anlauf@gmx.de>
363         PR fortran/101327
364         * expr.c (find_array_element): When bounds cannot be determined as
365         constant, return error instead of aborting.
367 2021-09-07  Marcel Vollweiler  <marcel@codesourcery.com>
369         * openmp.c (gfc_match_omp_flush): Parse 'seq_cst' clause on 'flush'
370         directive.
371         * trans-openmp.c (gfc_trans_omp_flush): Handle OMP_MEMORDER_SEQ_CST.
373 2021-09-03  Tobias Burnus  <tobias@codesourcery.com>
375         * decl.c (gfc_verify_c_interop_param): Reject pointer with
376         CONTIGUOUS attributes as dummy arg. Reject character len > 1
377         when passed as byte stream.
379 2021-09-01  Harald Anlauf  <anlauf@gmx.de>
381         PR fortran/56985
382         * resolve.c (resolve_common_vars): Fix grammar and improve wording
383         of error message rejecting an unlimited polymorphic in COMMON.
385 2021-08-31  Harald Anlauf  <anlauf@gmx.de>
387         PR fortran/100950
388         * simplify.c (substring_has_constant_len): Minimize checks for
389         substring expressions being allowed.
391 2021-08-31  Marcel Vollweiler  <marcel@codesourcery.com>
393         * gfortran.h: Add variable for 'ancestor' in struct gfc_omp_clauses.
394         * openmp.c (gfc_match_omp_clauses): Parse device-modifiers 'device_num'
395         and 'ancestor' in 'target device' clauses.
396         * trans-openmp.c (gfc_trans_omp_clauses): Set OMP_CLAUSE_DEVICE_ANCESTOR.
398 2021-08-30  Harald Anlauf  <anlauf@gmx.de>
400         PR fortran/102113
401         * match.c (gfc_match_goto): Allow for whitespace in parsing list
402         of labels.
404 2021-08-30  Harald Anlauf  <anlauf@gmx.de>
406         PR fortran/101349
407         * resolve.c (resolve_allocate_expr): An unlimited polymorphic
408         argument to ALLOCATE must be ALLOCATABLE or a POINTER.  Fix the
409         corresponding check.
411 2021-08-28  Harald Anlauf  <anlauf@gmx.de>
413         PR fortran/87737
414         * resolve.c (resolve_entries): For functions of type CHARACTER
415         tighten the checks for matching characteristics.
417 2021-08-25  Lewis Hyatt  <lhyatt@gmail.com>
419         PR other/93067
420         * cpp.c (gfc_cpp_post_options): Call new function
421         diagnostic_initialize_input_context().
423 2021-08-24  Harald Anlauf  <anlauf@gmx.de>
425         PR fortran/98411
426         * trans-decl.c (gfc_finish_var_decl): Adjust check to handle
427         implicit SAVE as well as variables in the main program.  Improve
428         warning message text.
430 2021-08-23  Tobias Burnus  <tobias@codesourcery.com>
432         * openmp.c (gfc_match_dupl_check, gfc_match_dupl_memorder,
433         gfc_match_dupl_atomic): New.
434         (gfc_match_omp_clauses): Use them; remove duplicate
435         'release'/'relaxed' clause matching; improve error dignostic
436         for 'default'.
438 2021-08-23  Tobias Burnus  <tobias@codesourcery.com>
440         * dump-parse-tree.c (show_omp_clauses): Handle 'strict' modifier
441         on grainsize/num_tasks
442         * gfortran.h (gfc_omp_clauses): Add grainsize_strict
443         and num_tasks_strict.
444         * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses):
445         Handle 'strict' modifier on grainsize/num_tasks.
446         * openmp.c (gfc_match_omp_clauses): Likewise.
448 2021-08-20  Tobias Burnus  <tobias@codesourcery.com>
450         * error.c
451         (error_uinteger): Take 'long long unsigned' instead
452         of 'long unsigned' as argumpent.
453         (error_integer): Take 'long long' instead of 'long'.
454         (error_hwuint, error_hwint): New.
455         (error_print): Update to handle 'll' and 'w'
456         length modifiers.
457         * simplify.c (substring_has_constant_len): Use '%wd'
458         in gfc_error.
460 2021-08-20  Harald Anlauf  <anlauf@gmx.de>
462         PR fortran/100950
463         * simplify.c (substring_has_constant_len): Fix format string of
464         gfc_error, pass HOST_WIDE_INT bounds values via char buffer.
466 2021-08-20  Tobias Burnus  <tobias@codesourcery.com>
468         * dump-parse-tree.c (show_omp_clauses): Handle 'at', 'severity'
469         and 'message' clauses.
470         (show_omp_node, show_code_node): Handle EXEC_OMP_ERROR.
471         * gfortran.h (gfc_statement): Add ST_OMP_ERROR.
472         (gfc_omp_severity_type, gfc_omp_at_type): New.
473         (gfc_omp_clauses): Add 'at', 'severity' and 'message' clause;
474         use more bitfields + ENUM_BITFIELD.
475         (gfc_exec_op): Add EXEC_OMP_ERROR.
476         * match.h (gfc_match_omp_error): New.
477         * openmp.c (enum omp_mask1): Add OMP_CLAUSE_(AT,SEVERITY,MESSAGE).
478         (gfc_match_omp_clauses): Handle new clauses.
479         (OMP_ERROR_CLAUSES, gfc_match_omp_error): New.
480         (resolve_omp_clauses): Resolve new clauses.
481         (omp_code_to_statement, gfc_resolve_omp_directive): Handle
482         EXEC_OMP_ERROR.
483         * parse.c (decode_omp_directive, next_statement,
484         gfc_ascii_statement): Handle 'omp error'.
485         * resolve.c (gfc_resolve_blocks): Likewise.
486         * st.c (gfc_free_statement): Likewise.
487         * trans-openmp.c (gfc_trans_omp_error): Likewise.
488         (gfc_trans_omp_directive): Likewise.
489         * trans.c (trans_code): Likewise.
491 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
493         * types.def (BT_FN_VOID_CONST_PTR_SIZE): New DEF_FUNCTION_TYPE_2.
494         * f95-lang.c (ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST): Define.
496 2021-08-19  Harald Anlauf  <anlauf@gmx.de>
498         PR fortran/100950
499         * simplify.c (substring_has_constant_len): New.
500         (gfc_simplify_len): Handle case of substrings with constant
501         bounds.
503 2021-08-18  Tobias Burnus  <tobias@codesourcery.com>
505         * match.h (gfc_match_omp_nothing): New.
506         * openmp.c (gfc_match_omp_nothing): New.
507         * parse.c (decode_omp_directive): Match 'nothing' directive.
509 2021-08-17  Tobias Burnus  <tobias@codesourcery.com>
511         * dump-parse-tree.c (show_omp_node, show_code_node): Handle
512         EXEC_OMP_SCOPE.
513         * gfortran.h (enum gfc_statement): Add ST_OMP_(END_)SCOPE.
514         (enum gfc_exec_op): Add EXEC_OMP_SCOPE.
515         * match.h (gfc_match_omp_scope): New.
516         * openmp.c (OMP_SCOPE_CLAUSES): Define
517         (gfc_match_omp_scope): New.
518         (gfc_match_omp_cancellation_point, gfc_match_omp_end_nowait):
519         Improve error diagnostic.
520         (omp_code_to_statement): Handle ST_OMP_SCOPE.
521         (gfc_resolve_omp_directive): Handle EXEC_OMP_SCOPE.
522         * parse.c (decode_omp_directive, next_statement,
523         gfc_ascii_statement, parse_omp_structured_block,
524         parse_executable): Handle OpenMP's scope construct.
525         * resolve.c (gfc_resolve_blocks): Likewise
526         * st.c (gfc_free_statement): Likewise
527         * trans-openmp.c (gfc_trans_omp_scope): New.
528         (gfc_trans_omp_directive): Call it.
529         * trans.c (trans_code): handle EXEC_OMP_SCOPE.
531 2021-08-16  Tobias Burnus  <tobias@codesourcery.com>
533         * dump-parse-tree.c (show_omp_clauses): Handle 'filter' clause.
534         (show_omp_node, show_code_node): Handle (combined) omp masked construct.
535         * frontend-passes.c (gfc_code_walker): Likewise.
536         * gfortran.h (enum gfc_statement): Add ST_OMP_*_MASKED*.
537         (enum gfc_exec_op): Add EXEC_OMP_*_MASKED*.
538         * match.h (gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
539         gfc_match_omp_masked_taskloop_simd, gfc_match_omp_parallel_masked,
540         gfc_match_omp_parallel_masked_taskloop,
541         gfc_match_omp_parallel_masked_taskloop_simd): New prototypes.
542         * openmp.c (enum omp_mask1): Add OMP_CLAUSE_FILTER.
543         (gfc_match_omp_clauses): Match it.
544         (OMP_MASKED_CLAUSES, gfc_match_omp_parallel_masked,
545         gfc_match_omp_parallel_masked_taskloop,
546         gfc_match_omp_parallel_masked_taskloop_simd,
547         gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
548         gfc_match_omp_masked_taskloop_simd): New.
549         (resolve_omp_clauses): Resolve filter clause.
550         (gfc_resolve_omp_parallel_blocks, resolve_omp_do,
551         omp_code_to_statement, gfc_resolve_omp_directive): Handle
552         omp masked constructs.
553         * parse.c (decode_omp_directive, case_exec_markers,
554         gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
555         parse_executable): Likewise.
556         * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
557         * st.c (gfc_free_statement): Likewise.
558         * trans-openmp.c (gfc_trans_omp_clauses): Handle filter clause.
559         (GFC_OMP_SPLIT_MASKED, GFC_OMP_MASK_MASKED): New enum values.
560         (gfc_trans_omp_masked): New.
561         (gfc_split_omp_clauses): Handle combined masked directives.
562         (gfc_trans_omp_master_taskloop): Rename to ...
563         (gfc_trans_omp_master_masked_taskloop): ... this; handle also
564         combined masked directives.
565         (gfc_trans_omp_parallel_master): Rename to ...
566         (gfc_trans_omp_parallel_master_masked): ... this; handle
567         combined masked directives.
568         (gfc_trans_omp_directive): Handle EXEC_OMP_*_MASKED*.
569         * trans.c (trans_code): Likewise.
571 2021-08-15  Harald Anlauf  <anlauf@gmx.de>
573         PR fortran/99351
574         * match.c (sync_statement): Replace %v code by %e in gfc_match to
575         allow for function references as STAT and ERRMSG arguments.
576         * resolve.c (resolve_sync): Adjust checks of STAT= and ERRMSG= to
577         being definable arguments.  Function references with a data
578         pointer result are accepted.
579         * trans-stmt.c (gfc_trans_sync): Adjust assertion.
581 2021-08-12  Tobias Burnus  <tobias@codesourcery.com>
583         * gfortran.h (gfc_omp_proc_bind_kind): Add OMP_PROC_BIND_PRIMARY.
584         * dump-parse-tree.c (show_omp_clauses): Add TODO comment to
585         change 'master' to 'primary' in proc_bind for OpenMP 5.1.
586         * intrinsic.texi (OMP_LIB): Mention OpenMP 5.1; add
587         omp_proc_bind_primary.
588         * openmp.c (gfc_match_omp_clauses): Accept
589         'primary' as alias for 'master'.
590         * trans-openmp.c (gfc_trans_omp_clauses): Handle
591         OMP_PROC_BIND_PRIMARY.
593 2021-08-11  Sandra Loosemore  <sandra@codesourcery.com>
595         * iso-c-binding.def (c_float128, c_float128_complex): Check
596         float128_type_node instead of gfc_float128_type_node.
597         * trans-types.c (gfc_init_kinds, gfc_build_real_type):
598         Update comments re supported 128-bit floating-point types.
600 2021-08-11  Richard Biener  <rguenther@suse.de>
602         * trans-common.c (create_common): Set TREE_THIS_VOLATILE on the
603         COMPONENT_REF if the field is volatile.
605 2021-08-07  Harald Anlauf  <anlauf@gmx.de>
607         PR fortran/68568
608         * primary.c (gfc_expr_attr): Variable attribute can only be
609         inquired when symtree is non-NULL.
611 2021-07-28  Harald Anlauf  <anlauf@gmx.de>
613         PR fortran/101564
614         * expr.c (gfc_check_vardef_context): Add check for KIND and LEN
615         parameter inquiries.
616         * match.c (gfc_match): Fix comment for %v code.
617         (gfc_match_allocate, gfc_match_deallocate): Replace use of %v code
618         by %e in gfc_match to allow for function references as STAT and
619         ERRMSG arguments.
620         * resolve.c (resolve_allocate_deallocate): Avoid NULL pointer
621         dereferences and shortcut for bad STAT and ERRMSG argument to
622         (DE)ALLOCATE.  Remove bogus parts of checks for STAT and ERRMSG.
624 2021-07-26  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
625             Tobias Burnus  <tobias@codesourcery.com>
627         PR fortran/93308
628         PR fortran/93963
629         PR fortran/94327
630         PR fortran/94331
631         PR fortran/97046
632         * trans-decl.c (convert_CFI_desc): Only copy out the descriptor
633         if necessary.
634         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Updated attribute
635         handling which reflect a previous intermediate version of the
636         standard. Only copy out the descriptor if necessary.
638 2021-07-23  Harald Anlauf  <anlauf@gmx.de>
640         PR fortran/101536
641         * check.c (array_check): Adjust check for the case of CLASS
642         arrays.
644 2021-07-21  Thomas Schwinge  <thomas@codesourcery.com>
645             Joseph Myers  <joseph@codesourcery.com>
646             Cesar Philippidis  <cesar@codesourcery.com>
648         * dump-parse-tree.c (show_attr): Update.
649         * gfortran.h (symbol_attribute): Add 'oacc_routine_nohost' member.
650         (gfc_omp_clauses): Add 'nohost' member.
651         * module.c (ab_attribute): Add 'AB_OACC_ROUTINE_NOHOST'.
652         (attr_bits, mio_symbol_attribute): Update.
653         * openmp.c (omp_mask2): Add 'OMP_CLAUSE_NOHOST'.
654         (gfc_match_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
655         (OACC_ROUTINE_CLAUSES): Add 'OMP_CLAUSE_NOHOST'.
656         (gfc_match_oacc_routine): Update.
657         * trans-decl.c (add_attributes_to_decl): Update.
658         * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
660 2021-07-21  Harald Anlauf  <anlauf@gmx.de>
662         PR fortran/101514
663         * target-memory.c (gfc_interpret_derived): Size of array component
664         of derived type can only be computed here for explicit shape.
665         * trans-types.c (gfc_get_nodesc_array_type): Do not dereference
666         NULL pointers.
668 2021-07-21  Tobias Burnus  <tobias@codesourcery.com>
670         * decl.c (gfc_verify_c_interop_param): Update for F2008 + F2018
671         changes; reject unsupported bits with 'Error: Sorry,'.
672         * trans-expr.c (gfc_conv_procedure_call): Fix condition to
673         For using CFI descriptor with characters.
675 2021-07-18  Harald Anlauf  <anlauf@gmx.de>
677         PR fortran/101084
678         * io.c (resolve_tag_format): Extend FORMAT check to unknown type.
680 2021-07-14  Harald Anlauf  <anlauf@gmx.de>
682         PR fortran/100949
683         * trans-expr.c (gfc_trans_class_init_assign): Call
684         gfc_conv_expr_present only for dummy variables.
686 2021-07-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
688         PR fortran/100227
689         * frontend-passes.c (traverse_io_block): Adjust test for
690         when a variable is eligible for the transformation to
691         array slice.
693 2021-06-28  Martin Sebor  <msebor@redhat.com>
695         * trans-array.c (trans_array_constructor): Replace direct uses
696         of TREE_NO_WARNING with warning_suppressed_p, and suppress_warning.
697         * trans-decl.c (gfc_build_qualified_array): Same.
698         (gfc_build_dummy_array_decl): Same.
699         (generate_local_decl): Same.
700         (gfc_generate_function_code): Same.
701         * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
702         (gfc_omp_clause_copy_ctor): Same.
703         * trans-types.c (get_dtype_type_node): Same.
704         (gfc_get_desc_dim_type): Same.
705         (gfc_get_array_descriptor_base): Same.
706         (gfc_get_caf_vector_type): Same.
707         (gfc_get_caf_reference_type): Same.
708         * trans.c (gfc_create_var_np): Same.
710 2021-06-23  Tobias Burnus  <tobias@codesourcery.com>
712         * dump-parse-tree.c (show_omp_clauses): Fix enum type used
713         for dumping gfc_omp_defaultmap_category.
715 2021-06-23  Andre Vehreschild  <vehre@gcc.gnu.org>
717         PR fortran/100337
718         * trans-intrinsic.c (conv_co_collective): Check stat for null ptr
719         before dereferrencing.
721 2021-06-18  Harald Anlauf  <anlauf@gmx.de>
723         PR fortran/100283
724         PR fortran/101123
725         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Unconditionally
726         convert result of min/max to result type.
728 2021-06-16  Harald Anlauf  <anlauf@gmx.de>
730         PR fortran/95501
731         PR fortran/95502
732         * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
733         dereference.
734         * match.c (gfc_match_pointer_assignment): Likewise.
735         * parse.c (gfc_check_do_variable): Avoid comparison with NULL
736         symtree.
738 2021-06-16  Harald Anlauf  <anlauf@gmx.de>
740         Revert:
741         2021-06-16  Harald Anlauf  <anlauf@gmx.de>
743         PR fortran/95501
744         PR fortran/95502
745         * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
746         dereference.
747         * match.c (gfc_match_pointer_assignment): Likewise.
748         * parse.c (gfc_check_do_variable): Avoid comparison with NULL
749         symtree.
751 2021-06-16  Harald Anlauf  <anlauf@gmx.de>
753         PR fortran/95501
754         PR fortran/95502
755         * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
756         dereference.
757         * match.c (gfc_match_pointer_assignment): Likewise.
758         * parse.c (gfc_check_do_variable): Avoid comparison with NULL
759         symtree.
761 2021-06-15  Tobias Burnus  <tobias@codesourcery.com>
763         PR fortran/92568
764         * dump-parse-tree.c (show_omp_clauses): Update for defaultmap.
765         * f95-lang.c (LANG_HOOKS_OMP_ALLOCATABLE_P,
766         LANG_HOOKS_OMP_SCALAR_TARGET_P): New.
767         * gfortran.h (enum gfc_omp_defaultmap,
768         enum gfc_omp_defaultmap_category): New.
769         * openmp.c (gfc_match_omp_clauses): Update defaultmap matching.
770         * trans-decl.c (gfc_finish_decl_attrs): Set GFC_DECL_SCALAR_TARGET.
771         * trans-openmp.c (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
772         (gfc_omp_scalar_p): Take 'ptr_alloc_ok' argument.
773         (gfc_trans_omp_clauses, gfc_split_omp_clauses): Update for
774         defaultmap changes.
775         * trans.h (gfc_omp_scalar_p): Update prototype.
776         (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
777         (struct lang_decl): Add scalar_target.
778         (GFC_DECL_SCALAR_TARGET, GFC_DECL_GET_SCALAR_TARGET): New.
780 2021-06-14  Tobias Burnus  <tobias@codesourcery.com>
782         * resolve.c (resolve_variable): Remove *XCNEW used to
783         nullify nullified memory.
785 2021-06-09  Martin Liska  <mliska@suse.cz>
787         * intrinsic.texi: Add missing @headitem to tables with a header.
789 2021-06-09  Jakub Jelinek  <jakub@redhat.com>
791         PR fortran/100965
792         * trans-openmp.c (gfc_omp_finish_clause): Gimplify OMP_CLAUSE_SIZE.
794 2021-06-08  Tobias Burnus  <tobias@codesourcery.com>
796         PR middle-end/99928
797         * trans-openmp.c (gfc_add_clause_implicitly): New.
798         (gfc_split_omp_clauses): Use it.
799         (gfc_free_split_omp_clauses): New.
800         (gfc_trans_omp_do_simd, gfc_trans_omp_parallel_do,
801         gfc_trans_omp_parallel_do_simd, gfc_trans_omp_distribute,
802         gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_taskloop,
803         gfc_trans_omp_master_taskloop, gfc_trans_omp_parallel_master): Use it.
805 2021-06-08  Martin Liska  <mliska@suse.cz>
807         * intrinsic.texi: Fix typo.
808         * trans-expr.c (gfc_trans_pointer_assignment): Likewise.
810 2021-06-05  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
812         PR fortran/100120
813         PR fortran/100816
814         PR fortran/100818
815         PR fortran/100819
816         PR fortran/100821
817         * trans-array.c (gfc_get_array_span): rework the way character
818         array "span" was calculated.
819         (gfc_conv_expr_descriptor): improve handling of character sections
820         and unlimited polymorphic objects.
821         * trans-expr.c (gfc_get_character_len): new function to calculate
822         character string length.
823         (gfc_get_character_len_in_bytes): new function to calculate
824         character string length in bytes.
825         (gfc_conv_scalar_to_descriptor): add call to set the "span".
826         (gfc_trans_pointer_assignment): set "_len" and antecipate the
827         initialization of the deferred character length hidden argument.
828         * trans-intrinsic.c (gfc_conv_associated): set "force_no_tmp" to
829         avoid the creation of a temporary.
830         * trans-types.c (gfc_get_dtype_rank_type): rework type detection
831         so that unlimited polymorphic objects get proper type infomation,
832         also important for bind(c).
833         (gfc_get_dtype): add argument to pass the rank if necessary.
834         (gfc_get_array_type_bounds): cosmetic change to have character
835         arrays called character instead of unknown.
836         * trans-types.h (gfc_get_dtype): modify prototype.
837         * trans.c (get_array_span): rework the way character array "span"
838         was calculated.
839         * trans.h (gfc_get_character_len): new prototype.
840         (gfc_get_character_len_in_bytes): new prototype.
841         Add "unlimited_polymorphic" flag to "gfc_se" type to signal when
842         expression carries an unlimited polymorphic object.
844 2021-06-04  Harald Anlauf  <anlauf@gmx.de>
846         PR fortran/99839
847         * frontend-passes.c (inline_matmul_assign): Do not inline matmul
848         if the assignment to the resulting array if it is not of canonical
849         type (real/integer/complex/logical).
851 2021-06-04  Tobias Burnus  <tobias@codesourcery.com>
853         * dump-parse-tree.c (show_code_node): Handle
854         EXEC_OMP_(TARGET_)(,PARALLEL_,TEAMS_)LOOP.
856 2021-06-04  Tobias Burnus  <tobias@codesourcery.com>
858         * scanner.c (skip_fixed_omp_sentinel): Set openacc_flag if
859         this is not an (OpenMP) continuation line.
860         (skip_fixed_oacc_sentinel): Likewise for openmp_flag and OpenACC.
861         (gfc_next_char_literal): gfc_error_now to force error for mixed OMP/ACC
862         continuation once per location and return '\n'.
864 2021-06-04  Tobias Burnus  <tobias@codesourcery.com>
866         PR middle-end/99928
867         * openmp.c (gfc_match_omp_clauses): Fix typo in error message.
869 2021-06-04  Tobias Burnus  <tobias@codesourcery.com>
871         PR middle-end/99928
872         * dump-parse-tree.c (show_omp_clauses): Handle bind clause.
873         (show_omp_node): Handle loop directive.
874         * frontend-passes.c (gfc_code_walker): Likewise.
875         * gfortran.h (enum gfc_statement): Add
876         ST_OMP_(END_)(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
877         (enum gfc_omp_bind_type): New.
878         (gfc_omp_clauses): Use it.
879         (enum gfc_exec_op): Add EXEC_OMP_(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
880         * match.h (gfc_match_omp_loop, gfc_match_omp_parallel_loop,
881         gfc_match_omp_target_parallel_loop, gfc_match_omp_target_teams_loop,
882         gfc_match_omp_teams_loop): New.
883         * openmp.c (enum omp_mask1): Add OMP_CLAUSE_BIND.
884         (gfc_match_omp_clauses): Handle it.
885         (OMP_LOOP_CLAUSES, gfc_match_omp_loop, gfc_match_omp_teams_loop,
886         gfc_match_omp_target_teams_loop, gfc_match_omp_parallel_loop,
887         gfc_match_omp_target_parallel_loop): New.
888         (resolve_omp_clauses, resolve_omp_do, omp_code_to_statement,
889         gfc_resolve_omp_directive): Handle omp loop.
890         * parse.c (decode_omp_directive case_exec_markers, gfc_ascii_statement,
891         parse_omp_do, parse_executable): Likewise.
892         (parse_omp_structured_block): Remove ST_ which use parse_omp_do.
893         * resolve.c (gfc_resolve_blocks): Add omp loop.
894         * st.c (gfc_free_statement): Likewise.
895         * trans-openmp.c (gfc_trans_omp_clauses): Handle bind clause.
896         (gfc_trans_omp_do, gfc_trans_omp_parallel_do, gfc_trans_omp_distribute,
897         gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_directive):
898         Handle loop directive.
899         (gfc_split_omp_clauses): Likewise; fix firstprivate/lastprivate
900         and (in_)reduction for taskloop.
901         * trans.c (trans_code): Handle omp loop directive.
903 2021-06-01  Tobias Burnus  <tobias@codesourcery.com>
905         PR middle-end/99928
906         * dump-parse-tree.c (show_omp_node, show_code_node): Handle
907         (parallel) master taskloop (simd).
908         * frontend-passes.c (gfc_code_walker): Set in_omp_workshare
909         to false for parallel master taskloop (simd).
910         * gfortran.h (enum gfc_statement):
911         Add ST_OMP_(END_)(PARALLEL_)MASTER_TASKLOOP(_SIMD).
912         (enum gfc_exec_op): EXEC_OMP_(PARALLEL_)MASTER_TASKLOOP(_SIMD).
913         * match.h (gfc_match_omp_master_taskloop,
914         gfc_match_omp_master_taskloop_simd,
915         gfc_match_omp_parallel_master_taskloop,
916         gfc_match_omp_parallel_master_taskloop_simd): New prototype.
917         * openmp.c (gfc_match_omp_parallel_master_taskloop,
918         gfc_match_omp_parallel_master_taskloop_simd,
919         gfc_match_omp_master_taskloop,
920         gfc_match_omp_master_taskloop_simd): New.
921         (gfc_match_omp_taskloop_simd): Permit 'reduction' clause.
922         (resolve_omp_clauses): Handle new combined directives; remove
923         inscan-reduction check to reduce multiple errors; add
924         task-reduction error for 'taskloop simd'.
925         (gfc_resolve_omp_parallel_blocks,
926         resolve_omp_do, omp_code_to_statement,
927         gfc_resolve_omp_directive): Handle new combined constructs.
928         * parse.c (decode_omp_directive, next_statement,
929         gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
930         parse_executable): Likewise.
931         * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
932         * st.c (gfc_free_statement): Likewise.
933         * trans.c (trans_code): Likewise.
934         * trans-openmp.c (gfc_split_omp_clauses,
935         gfc_trans_omp_directive): Likewise.
936         (gfc_trans_omp_parallel_master): Move after gfc_trans_omp_master_taskloop;
937         handle parallel master taskloop (simd) as well.
938         (gfc_trans_omp_taskloop): Take gfc_exec_op as arg.
939         (gfc_trans_omp_master_taskloop): New.
941 2021-05-30  Gerald Pfeifer  <gerald@pfeifer.com>
943         * gfortran.texi (BOZ literal constants): Fix typo.
945 2021-05-28  Tobias Burnus  <tobias@codesourcery.com>
947         * dump-parse-tree.c (show_iterator): New.
948         (show_omp_namelist): Handle iterators.
949         (show_omp_clauses): Handle affinity.
950         * gfortran.h (gfc_free_omp_namelist): New union with 'udr' and new 'ns'.
951         * match.c (gfc_free_omp_namelist): Add are to choose union element.
952         * openmp.c (gfc_free_omp_clauses, gfc_match_omp_detach,
953         gfc_match_omp_clause_reduction, gfc_match_omp_flush): Update
954         call to gfc_free_omp_namelist.
955         (gfc_match_omp_variable_list): Likewise; permit preceeding whitespace.
956         (enum omp_mask1): Add OMP_CLAUSE_AFFINITY.
957         (gfc_match_iterator): New.
958         (gfc_match_omp_clauses): Use it; update call to gfc_free_omp_namelist.
959         (OMP_TASK_CLAUSES): Add OMP_CLAUSE_AFFINITY.
960         (gfc_match_omp_taskwait): Match depend clause.
961         (resolve_omp_clauses): Handle affinity; update for udr/union change.
962         (gfc_resolve_omp_directive): Resolve clauses of taskwait.
963         * st.c (gfc_free_statement): Update gfc_free_omp_namelist call.
964         * trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Likewise
965         (handle_iterator): New.
966         (gfc_trans_omp_clauses): Handle iterators for depend/affinity clause.
967         (gfc_trans_omp_taskwait): Handle depend clause.
968         (gfc_trans_omp_directive): Update call.
970 2021-05-27  Harald Anlauf  <anlauf@gmx.de>
972         PR fortran/100602
973         * trans-intrinsic.c (gfc_conv_intrinsic_size): Use CLASS data
974         attributes for CLASS arrays for generation of runtime error.
976 2021-05-27  Harald Anlauf  <anlauf@gmx.de>
978         PR fortran/100656
979         * trans-array.c (gfc_conv_ss_startstride): Do not call check for
980         presence of a dummy argument when a symbol actually refers to a
981         non-dummy.
983 2021-05-25  Tobias Burnus  <tobias@codesourcery.com>
984             Johannes Nendwich  <a08727063@unet.univie.ac.at>
986         * intrinsic.texi (GERROR, GETARGS, GETLOG, NORM2, PARITY, RANDOM_INIT,
987         RANDOM_NUMBER): Fix typos and copy'n'paste errors.
989 2021-05-24  Tobias Burnus  <tobias@codesourcery.com>
991         PR fortran/86470
992         * trans-expr.c (gfc_copy_class_to_class): Add unshare_expr.
993         * trans-openmp.c (gfc_is_polymorphic_nonptr,
994         gfc_is_unlimited_polymorphic_nonptr): New.
995         (gfc_omp_clause_copy_ctor, gfc_omp_clause_dtor): Handle
996         polymorphic scalars.
998 2021-05-23  Harald Anlauf  <anlauf@gmx.de>
1000         PR fortran/100551
1001         * trans-expr.c (gfc_conv_procedure_call): Adjust check for
1002         implicit conversion of actual argument to an unlimited polymorphic
1003         procedure argument.
1005 2021-05-23  Tobias Burnus  <tobias@codesourcery.com>
1007         * intrinsic.texi (ATOMIC_ADD, ATOMIC_FETCH_ADD): Use the
1008         proper variable name in the description.
1010 2021-05-22  Andre Vehreschild  <vehre@gcc.gnu.org>
1011             Steve Kargl  <kargl@gcc.gnu.org>
1013         PR fortran/98301
1014         * trans-decl.c (gfc_build_builtin_function_decls): Move decl.
1015         * trans-intrinsic.c (conv_intrinsic_random_init): Use bool for
1016         lib-call of caf_random_init instead of logical (4-byte).
1017         * trans.h: Add tree var for random_init.
1019 2021-05-20  Marcel Vollweiler  <marcel@codesourcery.com>
1021         * openmp.c (gfc_match_omp_clauses): Support map-type-modifier 'close'.
1023 2021-05-18  Tobias Burnus  <tobias@codesourcery.com>
1025         PR fortran/100642
1026         * openmp.c (omp_code_to_statement): Add missing EXEC_OMP_DEPOBJ.
1028 2021-05-17  Harald Anlauf  <anlauf@gmx.de>
1030         PR fortran/98411
1031         * trans-decl.c (gfc_finish_var_decl): Add check for explicit SAVE
1032         attribute.
1034 2021-05-17  Tobias Burnus  <tobias@codesourcery.com>
1036         PR fortran/100633
1037         * resolve.c (gfc_resolve_code): Reject nonintrinsic assignments in
1038         OMP WORKSHARE.
1040 2021-05-14  Tobias Burnus  <tobias@codesourcery.com>
1042         * dump-parse-tree.c (show_omp_node, show_code_node): Handle
1043         EXEC_OMP_PARALLEL_MASTER.
1044         * frontend-passes.c (gfc_code_walker): Likewise.
1045         * gfortran.h (enum gfc_statement): Add ST_OMP_PARALLEL_MASTER and
1046         ST_OMP_END_PARALLEL_MASTER.
1047         (enum gfc_exec_op): Add EXEC_OMP_PARALLEL_MASTER..
1048         * match.h (gfc_match_omp_parallel_master): Handle it.
1049         * openmp.c (gfc_match_omp_parallel_master, resolve_omp_clauses,
1050         omp_code_to_statement, gfc_resolve_omp_directive): Likewise.
1051         * parse.c (decode_omp_directive, case_exec_markers,
1052         gfc_ascii_statement, parse_omp_structured_block,
1053         parse_executable): Likewise.
1054         * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
1055         * st.c (gfc_free_statement): Likewise.
1056         * trans-openmp.c (gfc_trans_omp_parallel_master,
1057         gfc_trans_omp_workshare, gfc_trans_omp_directive): Likewise.
1058         * trans.c (trans_code): Likewise.
1060 2021-05-14  Tobias Burnus  <tobias@codesourcery.com>
1062         * resolve.c (resolve_symbol): Handle implicit SAVE of main-program
1063         for vars in 'omp threadprivate' and 'omp declare target'.
1065 2021-05-10  Martin Liska  <mliska@suse.cz>
1067         * decl.c (variable_decl): Use startswith
1068         function instead of strncmp.
1069         (gfc_match_end): Likewise.
1070         * gfortran.h (gfc_str_startswith): Likewise.
1071         * module.c (load_omp_udrs): Likewise.
1072         (read_module): Likewise.
1073         * options.c (gfc_handle_runtime_check_option): Likewise.
1074         * primary.c (match_arg_list_function): Likewise.
1075         * trans-decl.c (gfc_get_symbol_decl): Likewise.
1076         * trans-expr.c (gfc_conv_procedure_call): Likewise.
1077         * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Likewise.
1079 2021-05-06  Paul Thomas  <pault@gcc.gnu.org>
1081         PR fortran/46991
1082         PR fortran/99819
1083         * class.c (gfc_build_class_symbol): Remove the error that
1084         disables assumed size class arrays. Class array types that are
1085         not deferred shape or assumed rank are given a unique name and
1086         placed in the procedure namespace.
1087         * trans-array.c (gfc_trans_g77_array): Obtain the data pointer
1088         for class arrays.
1089         (gfc_trans_dummy_array_bias): Suppress the runtime error for
1090         extent violations in explicit shape class arrays because it
1091         always fails.
1092         * trans-expr.c (gfc_conv_procedure_call): Handle assumed size
1093         class actual arguments passed to non-descriptor formal args by
1094         using the data pointer, stored as the symbol's backend decl.
1096 2021-05-05  Harald Anlauf  <anlauf@gmx.de>
1098         PR fortran/100274
1099         * interface.c (gfc_compare_actual_formal): Continue checks after
1100         emitting warning for argument length mismatch.
1101         * trans-expr.c (gfc_conv_procedure_call): Check for NULL pointer
1102         dereference.
1104 2021-05-04  Tobias Burnus  <tobias@codesourcery.com>
1106         PR testsuite/100397
1107         * trans-openmp.c (gfc_trans_omp_depobj): Fix pasto in enum values.
1109 2021-04-28  Tobias Burnus  <tobias@codesourcery.com>
1111         * openmp.c (gfc_match_omp_variable_list): Gobble whitespace before
1112         checking whether a '%' or parenthesis-open follows as next character.
1114 2021-04-28  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
1116         PR fortran/82376
1117         * trans-expr.c (gfc_conv_procedure_call): Evaluate function result
1118         and then pass a pointer.
1120 2021-04-26  Thomas Schwinge  <thomas@codesourcery.com>
1121             Nathan Sidwell  <nathan@codesourcery.com>
1122             Tom de Vries  <vries@codesourcery.com>
1123             Julian Brown  <julian@codesourcery.com>
1124             Kwok Cheung Yeung  <kcy@codesourcery.com>
1126         * lang.opt (Wopenacc-parallelism): New.
1128 2021-04-24  Harald Anlauf  <anlauf@gmx.de>
1130         PR fortran/100154
1131         * check.c (variable_check): Allow function reference having a data
1132         pointer result.
1133         (arg_strlen_is_zero): New function.
1134         (gfc_check_fgetputc_sub): Add static check of character and status
1135         arguments.
1136         (gfc_check_fgetput_sub): Likewise.
1137         * intrinsic.c (add_subroutines): Fix argument name for the
1138         character argument to intrinsic subroutines fget[c], fput[c].
1140 2021-04-24  Harald Anlauf  <anlauf@gmx.de>
1142         PR fortran/100218
1143         * expr.c (gfc_check_vardef_context): Extend check to allow pointer
1144         from a function reference.
1146 2021-04-22  Martin Liska  <mliska@suse.cz>
1148         PR testsuite/100159
1149         PR testsuite/100192
1150         * frontend-passes.c (optimize_expr): Fix typos and missing comments.
1152 2021-04-22  Michael Meissner  <meissner@linux.ibm.com>
1154         PR fortran/96983
1155         * trans-intrinsic.c (build_round_expr): If int type is larger than
1156         long long, do the round and convert to the integer type.  Do not
1157         try to find a floating point type the exact size of the integer
1158         type.
1160 2021-04-21  Tobias Burnus  <tobias@codesourcery.com>
1162         * dump-parse-tree.c (show_omp_namelist): Handle depobj + mutexinoutset
1163         in the depend clause.
1164         (show_omp_clauses, show_omp_node, show_code_node): Handle depobj.
1165         * gfortran.h (enum gfc_statement): Add ST_OMP_DEPOBJ.
1166         (enum gfc_omp_depend_op): Add OMP_DEPEND_UNSET,
1167         OMP_DEPEND_MUTEXINOUTSET and OMP_DEPEND_DEPOBJ.
1168         (gfc_omp_clauses): Add destroy, depobj_update and depobj.
1169         (enum gfc_exec_op): Add EXEC_OMP_DEPOBJ
1170         * match.h (gfc_match_omp_depobj): Match 'omp depobj'.
1171         * openmp.c (gfc_match_omp_clauses): Add depobj + mutexinoutset
1172         to depend clause.
1173         (gfc_match_omp_depobj, resolve_omp_clauses, gfc_resolve_omp_directive):
1174         Handle 'omp depobj'.
1175         * parse.c (decode_omp_directive, next_statement, gfc_ascii_statement):
1176         Likewise.
1177         * resolve.c (gfc_resolve_code): Likewise.
1178         * st.c (gfc_free_statement): Likewise.
1179         * trans-openmp.c (gfc_trans_omp_clauses): Handle depobj + mutexinoutset
1180         in the depend clause.
1181         (gfc_trans_omp_depobj, gfc_trans_omp_directive): Handle EXEC_OMP_DEPOBJ.
1182         * trans.c (trans_code): Likewise.
1184 2021-04-20  Paul Thomas  <pault@gcc.gnu.org>
1186         PR fortran/100110
1187         * trans-decl.c (gfc_get_symbol_decl): Replace test for host
1188         association with a check that the current and symbol namespaces
1189         are the same.
1191 2021-04-19  Thomas Schwinge  <thomas@codesourcery.com>
1193         * lang.opt (fopenacc-kernels=): Remove.
1195 2021-04-16  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
1197         PR fortran/100094
1198         * trans-array.c (gfc_trans_deferred_array): Add code to initialize
1199         pointers and allocatables with correct TKR parameters.
1201 2021-04-16  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
1203         PR fortran/100018
1204         * resolve.c: Add association check before de-referencing pointer.
1206 2021-04-16  Harald Anlauf  <anlauf@gmx.de>
1207             Paul Thomas  <pault@gcc.gnu.org>
1209         PR fortran/63797
1210         * module.c (write_symtree): Do not write interface of intrinsic
1211         procedure to module file for F2003 and newer.
1213 2021-04-15  Paul Thomas  <pault@gcc.gnu.org>
1215         PR fortran/99307
1216         * symbol.c: Remove trailing white space.
1217         * trans-array.c (gfc_trans_create_temp_array): Create a class
1218         temporary for class expressions and assign the new descriptor
1219         to the data field.
1220         (build_class_array_ref): If the class expr can be extracted,
1221         then use that for 'decl'. Class function results are reliably
1222         handled this way. Call gfc_find_and_cut_at_last_class_ref to
1223         eliminate largely redundant code. Remove dead code and recast
1224         the rest of the code to extract 'decl' for remaining cases.
1225         Call gfc_build_spanned_array_ref.
1226         (gfc_alloc_allocatable_for_assignment): Use class descriptor
1227         element length for 'elemsize1'. Eliminate repeat set of dtype
1228         for class expressions.
1229         * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Include
1230         additional code from build_class_array_ref, and use optional
1231         gfc_typespec pointer argument.
1232         (gfc_trans_scalar_assign): Make use of pre and post blocks for
1233         all class expressions.
1234         * trans.c (get_array_span): For unlimited polymorphic exprs
1235         multiply the span by the value of the _len field.
1236         (gfc_build_spanned_array_ref): New function.
1237         (gfc_build_array_ref): Call gfc_build_spanned_array_ref and
1238         eliminate repeated code.
1239         * trans.h: Add arg to gfc_find_and_cut_at_last_class_ref and
1240         add prototype for gfc_build_spanned_array_ref.
1242 2021-04-14  Martin Liska  <mliska@suse.cz>
1244         * intrinsic.texi: The table has first column empty and it makes
1245         trouble when processing makeinfo --xml output.
1247 2021-04-09  Tobias Burnus  <tobias@codesourcery.com>
1249         PR fortran/99817
1250         * trans-types.c (gfc_get_function_type): Also generate hidden
1251         coarray argument for character arguments.
1253 2021-04-03  Paul Thomas  <pault@gcc.gnu.org>
1255         PR fortran/99818
1256         * interface.c (compare_parameter): The codimension attribute is
1257         applied to the _data field of class formal arguments.
1259 2021-04-01  Harald Anlauf  <anlauf@gmx.de>
1261         PR fortran/99840
1262         * simplify.c (gfc_simplify_transpose): Properly initialize
1263         resulting shape.
1265 2021-03-28  Paul Thomas  <pault@gcc.gnu.org>
1267         PR fortran/99602
1268         * trans-expr.c (gfc_conv_procedure_call): Use the _data attrs
1269         for class expressions and detect proc pointer evaluations by
1270         the non-null actual argument list.
1272 2021-03-27  Steve Kargl  <kargl@gcc.gnu.org>
1274         * misc.c (gfc_typename): Fix off-by-one in buffer sizes.
1276 2021-03-26  Tobias Burnus  <tobias@codesourcery.com>
1278         PR fortran/99651
1279         * intrinsic.c (gfc_intrinsic_func_interface): Set
1280         attr.proc = PROC_INTRINSIC if FL_PROCEDURE.
1282 2021-03-24  Tobias Burnus  <tobias@codesourcery.com>
1284         PR fortran/99369
1285         * resolve.c (resolve_operator): Make 'msg' buffer larger
1286         and use snprintf.
1288 2021-03-23  Tobias Burnus  <tobias@codesourcery.com>
1290         PR fortran/93660
1291         * trans-decl.c (build_function_decl): Add comment;
1292         increment hidden_typelist for caf_token/caf_offset.
1293         * trans-types.c (gfc_get_function_type): Add comment;
1294         add missing caf_token/caf_offset args.
1296 2021-03-22  Tobias Burnus  <tobias@codesourcery.com>
1298         PR fortran/99688
1299         * match.c (select_type_set_tmp, gfc_match_select_type,
1300         gfc_match_select_rank): Fix 'name' buffersize to avoid out of bounds.
1301         * resolve.c (resolve_select_type): Likewise.
1303 2021-03-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
1305         * frontend-passes.c (inline_limit_check): Add rank_a
1306         argument. If a is rank 1, set the second dimension to 1.
1307         (inline_matmul_assign): Pass rank_a argument to inline_limit_check.
1308         (call_external_blas): Likewise.
1310 2021-03-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
1312         PR fortran/99345
1313         * frontend-passes.c (doloop_contained_procedure_code):
1314         Properly handle EXEC_IOLENGTH.
1316 2021-03-15  Paul Thomas  <pault@gcc.gnu.org>
1318         PR fortran/99545
1319         * trans-stmt.c (gfc_trans_allocate): Mark the initialization
1320         assignment by setting init_flag.
1322 2021-03-14  Harald Anlauf  <anlauf@gmx.de>
1323             Paul Thomas  <pault@gcc.gnu.org>
1325         * trans-expr.c (gfc_conv_procedure_call): Fix runtime checks for
1326         CLASS arguments.
1327         * trans-intrinsic.c (gfc_conv_intrinsic_size): Likewise.
1329 2021-03-13  Paul Thomas  <pault@gcc.gnu.org>
1331         PR fortran/99125
1332         * trans-array.c (gfc_conv_expr_descriptor): For deferred length
1333         length components use the ss_info string length instead of
1334         gfc_get_expr_charlen. Make sure that the deferred string length
1335         is a variable before assigning to it. Otherwise use the expr.
1336         * trans-expr.c (gfc_conv_string_length): Make sure that the
1337         deferred string length is a variable before assigning to it.
1339 2021-03-12  Tobias Burnus  <tobias@codesourcery.com>
1341         PR fortran/99514
1342         * resolve.c (resolve_symbol): Accept vars which are in DATA
1343         and hence (either) implicit SAVE (or in common).
1345 2021-03-10  Harald Anlauf  <anlauf@gmx.de>
1347         PR fortran/99205
1348         * data.c (gfc_assign_data_value): Reject non-constant character
1349         length for lvalue.
1350         * trans-array.c (gfc_conv_array_initializer): Restrict loop to
1351         elements which are defined to avoid NULL pointer dereference.
1353 2021-03-10  Tobias Burnus  <tobias@codesourcery.com>
1355         * intrinsic.texi (MIN): Correct 'maximum' to 'minimum'.
1357 2021-03-10  Eric Botcazou  <ebotcazou@adacore.com>
1359         PR fortran/96983
1360         * trans-intrinsic.c (build_round_expr): Do not implicitly assume
1361         that __float128 is the 128-bit floating-point type.
1363 2021-03-08  Harald Anlauf  <anlauf@gmx.de>
1365         PR fortran/49278
1366         * data.c (gfc_assign_data_value): Reject variable with PARAMETER
1367         attribute in DATA statement.
1369 2021-03-05  Tobias Burnus  <tobias@codesourcery.com>
1371         PR fortran/99355
1372         PR fortran/57871
1373         * invoke.texi (-freal{4,8}-real-*): Extend description.
1374         * primary.c (match_real_constant): Also promote real literals
1375         with '_kind' number.
1377 2021-03-04  Tobias Burnus  <tobias@codesourcery.com>
1379         PR fortran/99355
1380         * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Avoid
1381         redoing kind conversions.
1382         * primary.c (match_real_constant): Likewise.
1384 2021-02-28  Jakub Jelinek  <jakub@redhat.com>
1386         PR fortran/99303
1387         * openmp.c (gfc_omp_requires_add_clause): Fix up diagnostic message
1388         wordings.
1389         (resolve_omp_clauses): Likewise.
1391 2021-02-28  Jakub Jelinek  <jakub@redhat.com>
1393         PR fortran/99300
1394         * frontend-passes.c (doloop_code): Replace double space in diagnostics
1395         with a single space.
1397 2021-02-24  Paul Thomas  <pault@gcc.gnu.org>
1399         PR fortran/98342
1400         * trans-expr.c (gfc_conv_derived_to_class): Add optional arg.
1401         'derived_array' to hold the fixed, parmse expr in the case of
1402         assumed rank formal arguments. Deal with optional arguments.
1403         (gfc_conv_procedure_call): Null 'derived' array for each actual
1404         argument. Add its address to the call to gfc_conv_derived_to_
1405         class. Access the 'data' field of scalar descriptors before
1406         deallocating allocatable components. Also strip NOPs before the
1407         calls to gfc_deallocate_alloc_comp. Use 'derived' array as the
1408         input to gfc_deallocate_alloc_comp if it is available.
1409         * trans.h : Include the optional argument 'derived_array' to
1410         the prototype of gfc_conv_derived_to_class. The default value
1411         is NULL_TREE.
1413 2021-02-23  Paul Thomas  <pault@gcc.gnu.org>
1415         PR fortran/99124
1416         * resolve.c (resolve_fl_procedure): Include class results in
1417         the test for F2018, C15100.
1418         * trans-array.c (get_class_info_from_ss): Do not use the saved
1419         descriptor to obtain the class expression for variables. Use
1420         gfc_get_class_from_expr instead.
1422 2021-02-23  Harald Anlauf  <anlauf@gmx.de>
1424         PR fortran/99206
1425         * simplify.c (gfc_simplify_reshape): Set string length for
1426         character arguments.
1428 2021-02-22  Tobias Burnus  <tobias@codesourcery.com>
1430         PR fortran/99171
1431         * trans-openmp.c (gfc_omp_is_optional_argument): Regard optional
1432         dummy procs as nonoptional as no special treatment is needed.
1434 2021-02-21  Harald Anlauf  <anlauf@gmx.de>
1436         * trans-expr.c (gfc_conv_procedure_call): Do not add clobber to
1437         allocatable intent(out) argument.
1439 2021-02-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1441         PR fortran/98686
1442         * match.c (gfc_match_namelist): If BT_UNKNOWN, check for
1443         IMPLICIT NONE and and issue an error, otherwise set the type
1444         to its IMPLICIT type so that any subsequent use of objects will
1445         will confirm their types.
1447 2021-02-19  Harald Anlauf  <anlauf@gmx.de>
1449         * symbol.c (gfc_add_flavor): Reverse order of conditions.
1451 2021-02-19  Tobias Burnus  <tobias@codesourcery.com>
1453         PR fortran/99010
1454         * dependency.c (gfc_dep_resolver): Fix coarray handling.
1456 2021-02-19  Tobias Burnus  <tobias@codesourcery.com>
1458         PR fortran/99146
1459         * interface.c:
1461 2021-02-19  Tobias Burnus  <tobias@codesourcery.com>
1463         PR fortran/99027
1464         * simplify.c (simplify_bound_dim): Honor DIMEN_ELEMENT
1465         when using dim=.
1467 2021-02-17  Julian Brown  <julian@codesourcery.com>
1469         * openmp.c (resolve_omp_clauses): Disallow selecting components
1470         of arrays of derived type.
1472 2021-02-17  Julian Brown  <julian@codesourcery.com>
1474         * trans-openmp.c (gfc_trans_omp_clauses): Handle element selection
1475         for arrays of derived types.
1477 2021-02-16  Tobias Burnus  <tobias@codesourcery.com>
1479         * expr.c (gfc_is_simplify_contiguous): Handle REF_INQUIRY, i.e.
1480         %im and %re which are EXPR_VARIABLE.
1481         * openmp.c (resolve_omp_clauses): Diagnose %re/%im explicitly.
1483 2021-02-16  Tobias Burnus  <tobias@codesourcery.com>
1485         PR fortran/99111
1486         * io.c (resolve_tag_format): Reject BT_DERIVED/CLASS/VOID
1487         as (array-valued) FORMAT tag.
1489 2021-02-12  Tobias Burnus  <tobias@codesourcery.com>
1491         PR fortran/99043
1492         * trans-expr.c (gfc_conv_procedure_call): Don't reset
1493         rank of assumed-rank array.
1495 2021-02-11  Paul Thomas  <pault@gcc.gnu.org>
1497         PR fortran/98897
1498         * match.c (gfc_match_call): Include associate names as possible
1499         entities with typebound subroutines. The target needs to be
1500         resolved for the type.
1502 2021-02-11  Paul Thomas  <pault@gcc.gnu.org>
1504         PR fortran/99060
1505         * primary.c (gfc_match_varspec): Test for non-null 'previous'
1506         before using its name in the error message.
1508 2021-02-11  Tobias Burnus  <tobias@codesourcery.com>
1510         * intrinsic.texi (FINDLOC): Add 'MASK' to argument table.
1511         (MAXLOC, MAXVAL, MINLOC, MINVAL): For 'MASK', remove 'an
1512         array' as scalars are also permitted.
1514 2021-02-10  Julian Brown  <julian@codesourcery.com>
1516         PR fortran/98979
1517         * openmp.c (resolve_omp_clauses): Omit OpenACC update in
1518         contiguity check and stride-specified error.
1520 2021-02-04  Julian Brown  <julian@codesourcery.com>
1522         * openmp.c (resolve_omp_clauses): Omit OpenACC update in
1523         contiguity check and stride-specified error.
1525 2021-02-04  Julian Brown  <julian@codesourcery.com>
1527         * trans-openmp.c (gfc_trans_omp_clauses): Use class_pointer attribute
1528         for BT_CLASS.
1530 2021-02-04  Julian Brown  <julian@codesourcery.com>
1532         * trans-openmp.c (gfc_trans_omp_clauses): Fix dereferencing for
1533         BT_DERIVED members.
1535 2021-02-04  Tobias Burnus  <tobias@codesourcery.com>
1537         * openmp.c (resolve_omp_clauses): Explicitly diagnose
1538         substrings as not permitted.
1540 2021-02-03  Jeff Law  <law@redhat.com>
1542         * intrinsic.texi (ANINT): Fix typo.
1544 2021-02-03  Tobias Burnus  <tobias@codesourcery.com>
1546         PR fortran/98913
1547         * dependency.c (gfc_dep_resolver): Treat local access
1548         to coarrays like any array access in dependency analysis.
1550 2021-01-28  Harald Anlauf  <anlauf@gmx.de>
1552         PR fortran/86470
1553         * trans.c (gfc_call_malloc): Allocate area of size 1 if passed
1554         size is NULL (as documented).
1556 2021-01-27  Paul Thomas  <pault@gcc.gnu.org>
1558         PR fortran/93924
1559         PR fortran/93925
1560         * trans-expr.c (gfc_conv_procedure_call): Suppress the call to
1561         gfc_conv_intrinsic_to_class for unlimited polymorphic procedure
1562         pointers.
1563         (gfc_trans_assignment_1): Similarly suppress class assignment
1564         for class valued procedure pointers.
1566 2021-01-27  Paul Thomas  <pault@gcc.gnu.org>
1568         PR fortran/98472
1569         * trans-array.c (gfc_conv_expr_descriptor): Include elemental
1570         procedure pointers in the assert under the comment 'elemental
1571         function' and eliminate the second, spurious assert.
1573 2021-01-25  Harald Anlauf  <anlauf@gmx.de>
1575         PR fortran/70070
1576         * data.c (create_character_initializer): Check substring indices
1577         against bounds.
1578         (gfc_assign_data_value): Catch error returned from
1579         create_character_initializer.
1581 2021-01-25  Tobias Burnus  <tobias@codesourcery.com>
1583         * intrinsic.texi (CO_BROADCAST, CO_MIN, CO_REDUCE, CO_SUM): Fix typos.
1585 2021-01-25  Steve Kargl  <kargl@gcc.gnu.org>
1587         PR fortran/98517
1588         * resolve.c (resolve_charlen): Check that length expression is
1589         present before testing for scalar/integer..
1591 2021-01-22  Paul Thomas  <pault@gcc.gnu.org>
1593         PR fortran/98565
1594         * trans-intrinsic.c (gfc_conv_associated): Do not add a _data
1595         component for scalar class function targets. Instead, fix the
1596         function result and access the _data from that.
1598 2021-01-21  Jorge D'Elia  <jdelia@cimec.unl.edu.ar>
1600         * intrinsic.texi (CO_MAX): Fix typo.
1602 2021-01-21  Paul Thomas  <pault@gcc.gnu.org>
1604         PR fortran/96320
1605         * decl.c (gfc_match_modproc): It is not an error to find a
1606         module procedure declaration within a contains block.
1607         * expr.c (gfc_check_vardef_context): Pure procedure result is
1608         assignable. Change 'own_scope' accordingly.
1609         * resolve.c (resolve_typebound_procedure): A procedure that
1610         has the module procedure attribute is almost certainly a
1611         module procedure, whatever its interface.
1613 2021-01-19  Tobias Burnus  <tobias@codesourcery.com>
1615         PR fortran/98476
1616         * openmp.c (resolve_omp_clauses): Change use_device_ptr
1617         to use_device_addr for unless type(c_ptr); check all
1618         list item for is_device_ptr.
1620 2021-01-16  Kwok Cheung Yeung  <kcy@codesourcery.com>
1622         * dump-parse-tree.c (show_omp_clauses): Handle detach clause.
1623         * frontend-passes.c (gfc_code_walker): Walk detach expression.
1624         * gfortran.h (struct gfc_omp_clauses): Add detach field.
1625         (gfc_c_intptr_kind): New.
1626         * openmp.c (gfc_free_omp_clauses): Free detach clause.
1627         (gfc_match_omp_detach): New.
1628         (enum omp_mask1): Add OMP_CLAUSE_DETACH.
1629         (enum omp_mask2): Remove OMP_CLAUSE_DETACH.
1630         (gfc_match_omp_clauses): Handle OMP_CLAUSE_DETACH for OpenMP.
1631         (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DETACH.
1632         (resolve_omp_clauses): Prevent use of detach with mergeable and
1633         overriding the data sharing mode of the event handle.
1634         * trans-openmp.c (gfc_trans_omp_clauses): Handle detach clause.
1635         * trans-types.c (gfc_c_intptr_kind): New.
1636         (gfc_init_kinds): Initialize gfc_c_intptr_kind.
1637         * types.def
1638         (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT): Rename
1639         to...
1640         (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT_PTR):
1641         ...this.  Add extra argument.
1643 2021-01-14  Harald Anlauf  <anlauf@gmx.de>
1645         * gfortran.h (gfc_resolve_substring): Add prototype.
1646         * primary.c (match_string_constant): Simplify substrings with
1647         constant starting and ending points.
1648         * resolve.c: Rename resolve_substring to gfc_resolve_substring.
1649         (gfc_resolve_ref): Use renamed function gfc_resolve_substring.
1651 2021-01-14  Harald Anlauf  <anlauf@gmx.de>
1653         PR fortran/98661
1654         * resolve.c (resolve_component): Derived type components with
1655         ALLOCATABLE or POINTER attribute shall have a deferred shape.
1657 2021-01-14  Harald Anlauf  <anlauf@gmx.de>
1659         Revert:
1660         2021-01-14  Harald Anlauf  <anlauf@gmx.de>
1662         PR fortran/98661
1663         * resolve.c (resolve_component): Derived type components with
1664         ALLOCATABLE or POINTER attribute shall have a deferred shape.
1666 2021-01-14  Harald Anlauf  <anlauf@gmx.de>
1668         PR fortran/98661
1669         * resolve.c (resolve_component): Derived type components with
1670         ALLOCATABLE or POINTER attribute shall have a deferred shape.
1672 2021-01-08  Paul Thomas  <pault@gcc.gnu.org>
1674         PR fortran/93794
1675         * trans-expr.c (gfc_conv_component_ref): Remove the condition
1676         that deferred character length components only be allocatable.
1678 2021-01-08  Paul Thomas  <pault@gcc.gnu.org>
1680         PR fortran/98458
1681         * simplify.c (is_constant_array_expr): If an array constructor
1682         expression has elements other than constants or structures, try
1683         fixing the expression with gfc_reduce_init_expr. Also, if shape
1684         is NULL, obtain the array size and set it.
1686 2021-01-07  Paul Thomas  <pault@gcc.gnu.org>
1688         PR fortran/93701
1689         * resolve.c (find_array_spec): Put static prototype for
1690         resolve_assoc_var before this function and call for associate
1691         variables.
1693 2021-01-06  Harald Anlauf  <anlauf@gmx.de>
1695         * resolve.c (resolve_component): Add check for valid CLASS
1696         reference before trying to access CLASS data.
1698 2021-01-04  Martin Liska  <mliska@suse.cz>
1700         * ChangeLog-2018: Remove duplicate ChangeLog entries.
1702 2021-01-01  Harald Anlauf  <anlauf@gmx.de>
1704         * class.c (gfc_find_vtab): Add check on attribute is_class.
1706 2021-01-01  Jakub Jelinek  <jakub@redhat.com>
1708         * gfortranspec.c (lang_specific_driver): Update copyright notice
1709         dates.
1710         * gfc-internals.texi: Bump @copying's copyright year.
1711         * gfortran.texi: Ditto.
1712         * intrinsic.texi: Ditto.
1713         * invoke.texi: Ditto.
1715 2021-01-01  Jakub Jelinek  <jakub@redhat.com>
1717         * ChangeLog-2020: Rotate ChangeLog.  New file.
1720 Copyright (C) 2021 Free Software Foundation, Inc.
1722 Copying and distribution of this file, with or without modification,
1723 are permitted in any medium without royalty provided the copyright
1724 notice and this notice are preserved.