Daily bump.
[official-gcc.git] / gcc / fortran / ChangeLog
blobea21a1eec881630cd93baacfc659ebb6189b7924
1 2021-10-18  Tobias Burnus  <tobias@codesourcery.com>
3         PR fortran/102086
4         PR fortran/92189
5         PR fortran/92621
6         PR fortran/101308
7         PR fortran/101309
8         PR fortran/101635
9         PR fortran/92482
10         * decl.c (gfc_verify_c_interop_param): Remove 'sorry' for
11         scalar allocatable/pointer and len=*.
12         * expr.c (is_CFI_desc): Return true for for those.
13         * gfortran.h (CFI_type_kind_shift, CFI_type_mask,
14         CFI_type_from_type_kind, CFI_VERSION, CFI_MAX_RANK,
15         CFI_attribute_pointer, CFI_attribute_allocatable,
16         CFI_attribute_other, CFI_type_Integer, CFI_type_Logical,
17         CFI_type_Real, CFI_type_Complex, CFI_type_Character,
18         CFI_type_ucs4_char, CFI_type_struct, CFI_type_cptr,
19         CFI_type_cfunptr, CFI_type_other): New #define.
20         * trans-array.c (CFI_FIELD_BASE_ADDR, CFI_FIELD_ELEM_LEN,
21         CFI_FIELD_VERSION, CFI_FIELD_RANK, CFI_FIELD_ATTRIBUTE,
22         CFI_FIELD_TYPE, CFI_FIELD_DIM, CFI_DIM_FIELD_LOWER_BOUND,
23         CFI_DIM_FIELD_EXTENT, CFI_DIM_FIELD_SM,
24         gfc_get_cfi_descriptor_field, gfc_get_cfi_desc_base_addr,
25         gfc_get_cfi_desc_elem_len, gfc_get_cfi_desc_version,
26         gfc_get_cfi_desc_rank, gfc_get_cfi_desc_type,
27         gfc_get_cfi_desc_attribute, gfc_get_cfi_dim_item,
28         gfc_get_cfi_dim_lbound, gfc_get_cfi_dim_extent, gfc_get_cfi_dim_sm):
29         New define/functions to access the CFI array descriptor.
30         (gfc_conv_descriptor_type): New function for the GFC descriptor.
31         (gfc_get_array_span): Handle expr of CFI descriptors and
32         assumed-type descriptors.
33         (gfc_trans_array_bounds): Remove 'static'.
34         (gfc_conv_expr_descriptor): For assumed type, use the dtype of
35         the actual argument.
36         (structure_alloc_comps): Remove ' ' inside tabs.
37         * trans-array.h (gfc_trans_array_bounds, gfc_conv_descriptor_type,
38         gfc_get_cfi_desc_base_addr, gfc_get_cfi_desc_elem_len,
39         gfc_get_cfi_desc_version, gfc_get_cfi_desc_rank,
40         gfc_get_cfi_desc_type, gfc_get_cfi_desc_attribute,
41         gfc_get_cfi_dim_lbound, gfc_get_cfi_dim_extent, gfc_get_cfi_dim_sm):
42         New prototypes.
43         * trans-decl.c (gfor_fndecl_cfi_to_gfc, gfor_fndecl_gfc_to_cfi):
44         Remove global vars.
45         (gfc_build_builtin_function_decls): Remove their initialization.
46         (gfc_get_symbol_decl, create_function_arglist,
47         gfc_trans_deferred_vars): Update for CFI.
48         (convert_CFI_desc): Remove and replace by ...
49         (gfc_conv_cfi_to_gfc): ... this function
50         (gfc_generate_function_code): Call it; create local GFC var for CFI.
51         * trans-expr.c (gfc_maybe_dereference_var): Handle CFI.
52         (gfc_conv_subref_array_arg): Handle the if-noncontigous-only copy in
53         when the result should be a descriptor.
54         (gfc_conv_gfc_desc_to_cfi_desc): Completely rewritten.
55         (gfc_conv_procedure_call): CFI fixes.
56         * trans-openmp.c (gfc_omp_is_optional_argument,
57         gfc_omp_check_optional_argument): Handle optional
58         CFI.
59         * trans-stmt.c (gfc_trans_select_rank_cases): Cleanup, avoid invalid
60         code for allocatable/pointer dummies, which cannot be assumed size.
61         * trans-types.c (gfc_cfi_descriptor_base): New global var.
62         (gfc_get_dtype_rank_type): Skip rank init for rank < 0.
63         (gfc_sym_type): Handle CFI dummies.
64         (gfc_get_function_type): Update call.
65         (gfc_get_cfi_dim_type, gfc_get_cfi_type): New.
66         * trans-types.h (gfc_sym_type): Update prototype.
67         (gfc_get_cfi_type): New prototype.
68         * trans.c (gfc_trans_runtime_check): Make conditions more consistent
69         to avoid '<logical> AND_THEN <long int>' in conditions.
70         * trans.h (gfor_fndecl_cfi_to_gfc, gfor_fndecl_gfc_to_cfi): Remove
71         global-var declaration.
73 2021-10-18  Tobias Burnus  <tobias@codesourcery.com>
75         PR fortran/102745
76         * intrinsic.c (gfc_convert_type_warn): Fix checks by checking CLASS
77         and do typcheck in correct order for type extension.
78         * misc.c (gfc_typename): Print proper not internal CLASS type name.
80 2021-10-15  Harald Anlauf  <anlauf@gmx.de>
81             Tobias Burnus  <tobias@codesourcery.com>
83         PR fortran/102685
84         * decl.c (match_clist_expr): Set rank/shape of clist initializer
85         to match LHS.
86         * resolve.c (resolve_structure_cons): In a structure constructor,
87         compare shapes of array components against declared shape.
89 2021-10-14  Harald Anlauf  <anlauf@gmx.de>
91         PR fortran/102717
92         * simplify.c (gfc_simplify_reshape): Replace assert by error
93         message for negative elements in SHAPE array.
95 2021-10-14  Harald Anlauf  <anlauf@gmx.de>
97         PR fortran/102716
98         * check.c (gfc_check_shape): Reorder checks so that invalid KIND
99         arguments can be detected.
101 2021-10-14  Kwok Cheung Yeung  <kcy@codesourcery.com>
103         * gfortran.h (enum gfc_statement): Add ST_OMP_DECLARE_VARIANT.
104         (enum gfc_omp_trait_property_kind): New.
105         (struct gfc_omp_trait_property): New.
106         (gfc_get_omp_trait_property): New macro.
107         (struct gfc_omp_selector): New.
108         (gfc_get_omp_selector): New macro.
109         (struct gfc_omp_set_selector): New.
110         (gfc_get_omp_set_selector): New macro.
111         (struct gfc_omp_declare_variant): New.
112         (gfc_get_omp_declare_variant): New macro.
113         (struct gfc_namespace): Add omp_declare_variant field.
114         (gfc_free_omp_declare_variant_list): New prototype.
115         * match.h (gfc_match_omp_declare_variant): New prototype.
116         * openmp.c (gfc_free_omp_trait_property_list): New.
117         (gfc_free_omp_selector_list): New.
118         (gfc_free_omp_set_selector_list): New.
119         (gfc_free_omp_declare_variant_list): New.
120         (gfc_match_omp_clauses): Add extra optional argument.  Handle end of
121         clauses for context selectors.
122         (omp_construct_selectors, omp_device_selectors,
123         omp_implementation_selectors, omp_user_selectors): New.
124         (gfc_match_omp_context_selector): New.
125         (gfc_match_omp_context_selector_specification): New.
126         (gfc_match_omp_declare_variant): New.
127         * parse.c: Include tree-core.h and omp-general.h.
128         (decode_omp_directive): Handle 'declare variant'.
129         (case_omp_decl): Include ST_OMP_DECLARE_VARIANT.
130         (gfc_ascii_statement): Handle ST_OMP_DECLARE_VARIANT.
131         (gfc_parse_file): Initialize omp_requires_mask.
132         * symbol.c (gfc_free_namespace): Call
133         gfc_free_omp_declare_variant_list.
134         * trans-decl.c (gfc_get_extern_function_decl): Call
135         gfc_trans_omp_declare_variant.
136         (gfc_create_function_decl): Call gfc_trans_omp_declare_variant.
137         * trans-openmp.c (gfc_trans_omp_declare_variant): New.
138         * trans-stmt.h (gfc_trans_omp_declare_variant): New prototype.
140 2021-10-13  Tobias Burnus  <tobias@codesourcery.com>
142         * dump-parse-tree.c (show_omp_clauses): Handle ancestor modifier,
143         avoid ICE for GFC_OMP_ATOMIC_SWAP.
144         * gfortran.h (gfc_omp_clauses): Change 'anecestor' into a bitfield.
146 2021-10-12  Tobias Burnus  <tobias@codesourcery.com>
148         PR fortran/102541
149         * check.c (gfc_check_present): Handle optional CLASS.
150         * interface.c (gfc_compare_actual_formal): Likewise.
151         * trans-array.c (gfc_trans_g77_array): Likewise.
152         * trans-decl.c (gfc_build_dummy_array_decl): Likewise.
153         * trans-types.c (gfc_sym_type): Likewise.
154         * primary.c (gfc_variable_attr): Fixes for dummy and
155         pointer when 'class%_data' is passed.
156         * trans-expr.c (set_dtype_for_unallocated, gfc_conv_procedure_call):
157         For assumed-rank dummy, fix setting rank for dealloc/notassoc actual
158         and setting ubound to -1 for assumed-size actuals.
160 2021-10-10  Harald Anlauf  <anlauf@gmx.de>
162         PR fortran/99348
163         PR fortran/102521
164         * decl.c (add_init_expr_to_sym): Extend initialization of
165         parameter arrays from scalars to handle derived types.
167 2021-10-09  Harald Anlauf  <anlauf@gmx.de>
169         PR fortran/65454
170         * module.c (read_module): Handle old and new-style relational
171         operators when used in USE module, ONLY: OPERATOR(op).
173 2021-10-08  Sandra Loosemore  <sandra@codesourcery.com>
175         PR fortran/54753
176         * interface.c (gfc_compare_actual_formal): Add diagnostic
177         for F2018:C839.  Refactor shared code and fix bugs with class
178         array info lookup, and extend similar diagnostic from PR94110
179         to also cover class types.
181 2021-10-08  Martin Liska  <mliska@suse.cz>
183         * options.c (gfc_post_options): Use new macro
184         OPTION_SET_P.
186 2021-10-06  Tobias Burnus  <tobias@codesourcery.com>
188         * resolve.c (resolve_values): Only show
189         deprecated warning if attr.referenced.
191 2021-10-04  Tobias Burnus  <tobias@codesourcery.com>
193         PR fortran/54753
194         * resolve.c (can_generate_init, resolve_fl_variable_derived,
195         resolve_symbol): Only do initialization with intent(out) if not
196         inside of an interface block.
198 2021-10-01  Martin Sebor  <msebor@redhat.com>
200         PR c/102103
201         * array.c: Remove an unnecessary test.
202         * trans-array.c: Same.
204 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
206         * gfortran.h (gfc_omp_clauses): Add order_reproducible bitfield.
207         * dump-parse-tree.c (show_omp_clauses): Print REPRODUCIBLE: for it.
208         * openmp.c (gfc_match_omp_clauses): Set order_reproducible for
209         explicit reproducible: modifier.
210         * trans-openmp.c (gfc_trans_omp_clauses): Set
211         OMP_CLAUSE_ORDER_REPRODUCIBLE for order_reproducible.
212         (gfc_split_omp_clauses): Also copy order_reproducible.
214 2021-09-30  Harald Anlauf  <anlauf@gmx.de>
216         PR fortran/102458
217         * simplify.c (simplify_size): Resolve expressions used in array
218         specifications so that SIZE can be simplified.
220 2021-09-30  Harald Anlauf  <anlauf@gmx.de>
222         * expr.c: The correct reference to Fortran standard is: F2018:10.1.12.
224 2021-09-30  Tobias Burnus  <tobias@codesourcery.com>
226         PR fortran/71703
227         PR fortran/84007
228         * trans-intrinsic.c (gfc_conv_same_type_as): Fix handling
229         of UNLIMITED_POLY.
230         * trans.h (gfc_vtpr_hash_get): Renamed prototype to ...
231         (gfc_vptr_hash_get): ... this to match function name.
233 2021-09-29  Harald Anlauf  <anlauf@gmx.de>
235         PR fortran/102520
236         * array.c (expand_constructor): Do not dereference NULL pointer.
238 2021-09-27  Tobias Burnus  <tobias@codesourcery.com>
240         PR fortran/94070
241         * trans-array.c (gfc_tree_array_size): New function to
242         find size inline (whole array or one dimension).
243         (array_parameter_size): Use it, take stmt_block as arg.
244         (gfc_conv_array_parameter): Update call.
245         * trans-array.h (gfc_tree_array_size): Add prototype.
246         * trans-decl.c (gfor_fndecl_size0, gfor_fndecl_size1): Remove
247         these global vars.
248         (gfc_build_intrinsic_function_decls): Remove their initialization.
249         * trans-expr.c (gfc_conv_procedure_call): Update
250         bounds of pointer/allocatable actual args to nonallocatable/nonpointer
251         dummies to be one based.
252         * trans-intrinsic.c (gfc_conv_intrinsic_shape): Fix case for
253         assumed rank with allocatable/pointer dummy.
254         (gfc_conv_intrinsic_size): Update to use inline function.
255         * trans.h (gfor_fndecl_size0, gfor_fndecl_size1): Remove var decl.
257 2021-09-26  Tobias Burnus  <tobias@codesourcery.com>
259         PR fortran/101334
260         * trans-intrinsic.c (gfc_conv_associated): Support assumed-rank
261         'pointer' with scalar/array 'target' argument.
263 2021-09-24  Harald Anlauf  <anlauf@gmx.de>
265         PR fortran/102458
266         * expr.c (is_non_constant_intrinsic): Check for intrinsics
267         excluded in constant expressions (F2018:10.1.2).
268         (gfc_is_constant_expr): Use that check.
270 2021-09-24  Sandra Loosemore  <sandra@codesourcery.com>
272         PR fortran/101333
273         * interface.c (compare_parameter): Enforce F2018 C711.
275 2021-09-24  Tobias Burnus  <tobias@codesourcery.com>
277         PR fortran/55534
278         * scanner.c (load_file): Return void, call (gfc_)fatal_error for
279         all errors.
280         (include_line, include_stmt, gfc_new_file): Remove exit call
281         for failed load_file run.
283 2021-09-23  Sandra Loosemore  <sandra@codesourcery.com>
285         PR fortran/101320
286         * decl.c (gfc_verify_c_interop_param): Handle F2018 C1557,
287         aka TS29113 C516.
289 2021-09-23  Harald Anlauf  <anlauf@gmx.de>
290             Tobias Burnus  <tobias@codesourcery.com>
292         PR fortran/93834
293         * trans-intrinsic.c (gfc_conv_allocated): Cleanup. Handle
294         coindexed scalar coarrays.
296 2021-09-23  Sandra Loosemore  <sandra@codesourcery.com>
298         PR fortran/101319
299         * interface.c (gfc_compare_actual_formal): Extend existing
300         assumed-type diagnostic to also check for argument with type
301         parameters.
303 2021-09-23  Sandra Loosemore  <sandra@codesourcery.com>
305         PR fortran/101334
306         * check.c (gfc_check_associated): Allow an assumed-rank
307         array for the pointer argument.
308         * interface.c (compare_parameter): Also give rank mismatch
309         error on assumed-rank array.
311 2021-09-23  Sandra Loosemore  <sandra@codesourcery.com>
313         * trans-stmt.c (trans_associate_var): Check that result of
314         GFC_DECL_SAVED_DESCRIPTOR is not null before using it.
316 2021-09-22  Tobias Burnus  <tobias@codesourcery.com>
318         PR fortran/55534
319         * cpp.c (gfc_cpp_register_include_paths, gfc_cpp_post_options):
320         Add new bool verbose_missing_dir_warn argument.
321         * cpp.h (gfc_cpp_post_options): Update prototype.
322         * f95-lang.c (gfc_init): Remove duplicated file-not found diag.
323         * gfortran.h (gfc_check_include_dirs): Takes bool
324         verbose_missing_dir_warn arg.
325         (gfc_new_file): Returns now void.
326         * options.c (gfc_post_options): Update to warn for -I and -J,
327         only, by default but for all when user requested.
328         * scanner.c (gfc_do_check_include_dir):
329         (gfc_do_check_include_dirs, gfc_check_include_dirs): Take bool
330         verbose warn arg and update to avoid printing the same message
331         twice or never.
332         (load_file): Fix indent.
333         (gfc_new_file): Return void and exit when load_file failed
334         as all other load_file users do.
336 2021-09-22  Tobias Burnus  <tobias@codesourcery.com>
338         * trans-expr.c (gfc_simple_for_loop): New.
339         * trans.h (gfc_simple_for_loop): New prototype.
341 2021-09-21  Tobias Burnus  <tobias@codesourcery.com>
343         PR fortran/55534
344         * cpp.c: Define GCC_C_COMMON_C for #include "options.h" to make
345         cpp_reason_option_codes available.
346         (gfc_cpp_register_include_paths): Make static, set pfile's
347         warn_missing_include_dirs and move before caller.
348         (gfc_cpp_init_cb): New, cb code moved from ...
349         (gfc_cpp_init_0): ... here.
350         (gfc_cpp_post_options): Call gfc_cpp_init_cb.
351         (cb_cpp_diagnostic_cpp_option): New. As implemented in c-family
352         to match CppReason flags to -W... names.
353         (cb_cpp_diagnostic): Use it to replace single special case.
354         * cpp.h (gfc_cpp_register_include_paths): Remove as now static.
355         * gfortran.h (gfc_check_include_dirs): New prototype.
356         (gfc_add_include_path): Add new bool arg.
357         * options.c (gfc_init_options): Don't set -Wmissing-include-dirs.
358         (gfc_post_options): Set it here after commandline processing. Call
359         gfc_add_include_path with defer_warn=false.
360         (gfc_handle_option): Call it with defer_warn=true.
361         * scanner.c (gfc_do_check_include_dir, gfc_do_check_include_dirs,
362         gfc_check_include_dirs): New. Diagnostic moved from ...
363         (add_path_to_list): ... here, which came before cmdline processing.
364         Take additional bool defer_warn argument.
365         (gfc_add_include_path): Take additional defer_warn arg.
366         * scanner.h (struct gfc_directorylist): Reorder for alignment issues,
367         add new 'bool warn'.
369 2021-09-20  Tobias Burnus  <tobias@codesourcery.com>
371         * gfortran.h (gfc_omp_clauses): Add order_unconstrained.
372         * dump-parse-tree.c (show_omp_clauses): Dump it.
373         * openmp.c (gfc_match_omp_clauses): Match unconstrained/reproducible
374         modifiers to ordered(concurrent).
375         (OMP_DISTRIBUTE_CLAUSES): Accept ordered clause.
376         (resolve_omp_clauses): Reject ordered + order on same directive.
377         * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses): Pass
378         on unconstrained modifier of ordered(concurrent).
380 2021-09-17  Harald Anlauf  <anlauf@gmx.de>
382         PR fortran/102366
383         * trans-decl.c (gfc_finish_var_decl): Disable the warning message
384         for variables moved from stack to static storange if they are
385         declared in the main, but allow the move to happen.
387 2021-09-17  Sandra Loosemore  <sandra@codesourcery.com>
389         * intrinsic.texi (ISO_C_BINDING): Change C_FLOAT128 to correspond
390         to _Float128 rather than __float128.
391         * iso-c-binding.def (c_float128): Update comments.
392         * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Likewise.
393         (build_round_expr): Likewise.
394         (gfc_build_intrinsic_lib_fndcecls): Likewise.
395         * trans-types.h (gfc_real16_is_float128): Likewise.
397 2021-09-16  Harald Anlauf  <anlauf@gmx.de>
399         PR fortran/102287
400         * trans-expr.c (gfc_conv_procedure_call): Wrap deallocation of
401         allocatable components of optional allocatable derived type
402         procedure arguments with INTENT(OUT) into a presence check.
404 2021-09-14  Harald Anlauf  <anlauf@gmx.de>
406         PR fortran/102311
407         * resolve.c (resolve_entries): Attempt to recover cleanly after
408         rejecting mismatched function entries.
410 2021-09-14  Tobias Burnus  <tobias@codesourcery.com>
412         PR fortran/102313
413         * parse.c (gfc_ascii_statement): Add missing ST_OMP_END_SCOPE.
415 2021-09-13  Harald Anlauf  <anlauf@gmx.de>
417         PR fortran/82314
418         * decl.c (add_init_expr_to_sym): For proper initialization of
419         array-valued named constants the array bounds need to be
420         simplified before adding the initializer.
422 2021-09-13  Harald Anlauf  <anlauf@gmx.de>
424         PR fortran/85130
425         * expr.c (find_substring_ref): Handle given substring start and
426         end indices as signed integers, not unsigned.
428 2021-09-09  Harald Anlauf  <anlauf@gmx.de>
430         PR fortran/98490
431         * trans-expr.c (gfc_conv_substring): Do not generate substring
432         bounds check for implied do loop index variable before it actually
433         becomes defined.
435 2021-09-08  liuhongt  <hongtao.liu@intel.com>
437         * options.c (gfc_post_options): Issue an error for
438         -fexcess-precision=16.
440 2021-09-07  Harald Anlauf  <anlauf@gmx.de>
442         PR fortran/101327
443         * expr.c (find_array_element): When bounds cannot be determined as
444         constant, return error instead of aborting.
446 2021-09-07  Marcel Vollweiler  <marcel@codesourcery.com>
448         * openmp.c (gfc_match_omp_flush): Parse 'seq_cst' clause on 'flush'
449         directive.
450         * trans-openmp.c (gfc_trans_omp_flush): Handle OMP_MEMORDER_SEQ_CST.
452 2021-09-03  Tobias Burnus  <tobias@codesourcery.com>
454         * decl.c (gfc_verify_c_interop_param): Reject pointer with
455         CONTIGUOUS attributes as dummy arg. Reject character len > 1
456         when passed as byte stream.
458 2021-09-01  Harald Anlauf  <anlauf@gmx.de>
460         PR fortran/56985
461         * resolve.c (resolve_common_vars): Fix grammar and improve wording
462         of error message rejecting an unlimited polymorphic in COMMON.
464 2021-08-31  Harald Anlauf  <anlauf@gmx.de>
466         PR fortran/100950
467         * simplify.c (substring_has_constant_len): Minimize checks for
468         substring expressions being allowed.
470 2021-08-31  Marcel Vollweiler  <marcel@codesourcery.com>
472         * gfortran.h: Add variable for 'ancestor' in struct gfc_omp_clauses.
473         * openmp.c (gfc_match_omp_clauses): Parse device-modifiers 'device_num'
474         and 'ancestor' in 'target device' clauses.
475         * trans-openmp.c (gfc_trans_omp_clauses): Set OMP_CLAUSE_DEVICE_ANCESTOR.
477 2021-08-30  Harald Anlauf  <anlauf@gmx.de>
479         PR fortran/102113
480         * match.c (gfc_match_goto): Allow for whitespace in parsing list
481         of labels.
483 2021-08-30  Harald Anlauf  <anlauf@gmx.de>
485         PR fortran/101349
486         * resolve.c (resolve_allocate_expr): An unlimited polymorphic
487         argument to ALLOCATE must be ALLOCATABLE or a POINTER.  Fix the
488         corresponding check.
490 2021-08-28  Harald Anlauf  <anlauf@gmx.de>
492         PR fortran/87737
493         * resolve.c (resolve_entries): For functions of type CHARACTER
494         tighten the checks for matching characteristics.
496 2021-08-25  Lewis Hyatt  <lhyatt@gmail.com>
498         PR other/93067
499         * cpp.c (gfc_cpp_post_options): Call new function
500         diagnostic_initialize_input_context().
502 2021-08-24  Harald Anlauf  <anlauf@gmx.de>
504         PR fortran/98411
505         * trans-decl.c (gfc_finish_var_decl): Adjust check to handle
506         implicit SAVE as well as variables in the main program.  Improve
507         warning message text.
509 2021-08-23  Tobias Burnus  <tobias@codesourcery.com>
511         * openmp.c (gfc_match_dupl_check, gfc_match_dupl_memorder,
512         gfc_match_dupl_atomic): New.
513         (gfc_match_omp_clauses): Use them; remove duplicate
514         'release'/'relaxed' clause matching; improve error dignostic
515         for 'default'.
517 2021-08-23  Tobias Burnus  <tobias@codesourcery.com>
519         * dump-parse-tree.c (show_omp_clauses): Handle 'strict' modifier
520         on grainsize/num_tasks
521         * gfortran.h (gfc_omp_clauses): Add grainsize_strict
522         and num_tasks_strict.
523         * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses):
524         Handle 'strict' modifier on grainsize/num_tasks.
525         * openmp.c (gfc_match_omp_clauses): Likewise.
527 2021-08-20  Tobias Burnus  <tobias@codesourcery.com>
529         * error.c
530         (error_uinteger): Take 'long long unsigned' instead
531         of 'long unsigned' as argumpent.
532         (error_integer): Take 'long long' instead of 'long'.
533         (error_hwuint, error_hwint): New.
534         (error_print): Update to handle 'll' and 'w'
535         length modifiers.
536         * simplify.c (substring_has_constant_len): Use '%wd'
537         in gfc_error.
539 2021-08-20  Harald Anlauf  <anlauf@gmx.de>
541         PR fortran/100950
542         * simplify.c (substring_has_constant_len): Fix format string of
543         gfc_error, pass HOST_WIDE_INT bounds values via char buffer.
545 2021-08-20  Tobias Burnus  <tobias@codesourcery.com>
547         * dump-parse-tree.c (show_omp_clauses): Handle 'at', 'severity'
548         and 'message' clauses.
549         (show_omp_node, show_code_node): Handle EXEC_OMP_ERROR.
550         * gfortran.h (gfc_statement): Add ST_OMP_ERROR.
551         (gfc_omp_severity_type, gfc_omp_at_type): New.
552         (gfc_omp_clauses): Add 'at', 'severity' and 'message' clause;
553         use more bitfields + ENUM_BITFIELD.
554         (gfc_exec_op): Add EXEC_OMP_ERROR.
555         * match.h (gfc_match_omp_error): New.
556         * openmp.c (enum omp_mask1): Add OMP_CLAUSE_(AT,SEVERITY,MESSAGE).
557         (gfc_match_omp_clauses): Handle new clauses.
558         (OMP_ERROR_CLAUSES, gfc_match_omp_error): New.
559         (resolve_omp_clauses): Resolve new clauses.
560         (omp_code_to_statement, gfc_resolve_omp_directive): Handle
561         EXEC_OMP_ERROR.
562         * parse.c (decode_omp_directive, next_statement,
563         gfc_ascii_statement): Handle 'omp error'.
564         * resolve.c (gfc_resolve_blocks): Likewise.
565         * st.c (gfc_free_statement): Likewise.
566         * trans-openmp.c (gfc_trans_omp_error): Likewise.
567         (gfc_trans_omp_directive): Likewise.
568         * trans.c (trans_code): Likewise.
570 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
572         * types.def (BT_FN_VOID_CONST_PTR_SIZE): New DEF_FUNCTION_TYPE_2.
573         * f95-lang.c (ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST): Define.
575 2021-08-19  Harald Anlauf  <anlauf@gmx.de>
577         PR fortran/100950
578         * simplify.c (substring_has_constant_len): New.
579         (gfc_simplify_len): Handle case of substrings with constant
580         bounds.
582 2021-08-18  Tobias Burnus  <tobias@codesourcery.com>
584         * match.h (gfc_match_omp_nothing): New.
585         * openmp.c (gfc_match_omp_nothing): New.
586         * parse.c (decode_omp_directive): Match 'nothing' directive.
588 2021-08-17  Tobias Burnus  <tobias@codesourcery.com>
590         * dump-parse-tree.c (show_omp_node, show_code_node): Handle
591         EXEC_OMP_SCOPE.
592         * gfortran.h (enum gfc_statement): Add ST_OMP_(END_)SCOPE.
593         (enum gfc_exec_op): Add EXEC_OMP_SCOPE.
594         * match.h (gfc_match_omp_scope): New.
595         * openmp.c (OMP_SCOPE_CLAUSES): Define
596         (gfc_match_omp_scope): New.
597         (gfc_match_omp_cancellation_point, gfc_match_omp_end_nowait):
598         Improve error diagnostic.
599         (omp_code_to_statement): Handle ST_OMP_SCOPE.
600         (gfc_resolve_omp_directive): Handle EXEC_OMP_SCOPE.
601         * parse.c (decode_omp_directive, next_statement,
602         gfc_ascii_statement, parse_omp_structured_block,
603         parse_executable): Handle OpenMP's scope construct.
604         * resolve.c (gfc_resolve_blocks): Likewise
605         * st.c (gfc_free_statement): Likewise
606         * trans-openmp.c (gfc_trans_omp_scope): New.
607         (gfc_trans_omp_directive): Call it.
608         * trans.c (trans_code): handle EXEC_OMP_SCOPE.
610 2021-08-16  Tobias Burnus  <tobias@codesourcery.com>
612         * dump-parse-tree.c (show_omp_clauses): Handle 'filter' clause.
613         (show_omp_node, show_code_node): Handle (combined) omp masked construct.
614         * frontend-passes.c (gfc_code_walker): Likewise.
615         * gfortran.h (enum gfc_statement): Add ST_OMP_*_MASKED*.
616         (enum gfc_exec_op): Add EXEC_OMP_*_MASKED*.
617         * match.h (gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
618         gfc_match_omp_masked_taskloop_simd, gfc_match_omp_parallel_masked,
619         gfc_match_omp_parallel_masked_taskloop,
620         gfc_match_omp_parallel_masked_taskloop_simd): New prototypes.
621         * openmp.c (enum omp_mask1): Add OMP_CLAUSE_FILTER.
622         (gfc_match_omp_clauses): Match it.
623         (OMP_MASKED_CLAUSES, gfc_match_omp_parallel_masked,
624         gfc_match_omp_parallel_masked_taskloop,
625         gfc_match_omp_parallel_masked_taskloop_simd,
626         gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
627         gfc_match_omp_masked_taskloop_simd): New.
628         (resolve_omp_clauses): Resolve filter clause.
629         (gfc_resolve_omp_parallel_blocks, resolve_omp_do,
630         omp_code_to_statement, gfc_resolve_omp_directive): Handle
631         omp masked constructs.
632         * parse.c (decode_omp_directive, case_exec_markers,
633         gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
634         parse_executable): Likewise.
635         * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
636         * st.c (gfc_free_statement): Likewise.
637         * trans-openmp.c (gfc_trans_omp_clauses): Handle filter clause.
638         (GFC_OMP_SPLIT_MASKED, GFC_OMP_MASK_MASKED): New enum values.
639         (gfc_trans_omp_masked): New.
640         (gfc_split_omp_clauses): Handle combined masked directives.
641         (gfc_trans_omp_master_taskloop): Rename to ...
642         (gfc_trans_omp_master_masked_taskloop): ... this; handle also
643         combined masked directives.
644         (gfc_trans_omp_parallel_master): Rename to ...
645         (gfc_trans_omp_parallel_master_masked): ... this; handle
646         combined masked directives.
647         (gfc_trans_omp_directive): Handle EXEC_OMP_*_MASKED*.
648         * trans.c (trans_code): Likewise.
650 2021-08-15  Harald Anlauf  <anlauf@gmx.de>
652         PR fortran/99351
653         * match.c (sync_statement): Replace %v code by %e in gfc_match to
654         allow for function references as STAT and ERRMSG arguments.
655         * resolve.c (resolve_sync): Adjust checks of STAT= and ERRMSG= to
656         being definable arguments.  Function references with a data
657         pointer result are accepted.
658         * trans-stmt.c (gfc_trans_sync): Adjust assertion.
660 2021-08-12  Tobias Burnus  <tobias@codesourcery.com>
662         * gfortran.h (gfc_omp_proc_bind_kind): Add OMP_PROC_BIND_PRIMARY.
663         * dump-parse-tree.c (show_omp_clauses): Add TODO comment to
664         change 'master' to 'primary' in proc_bind for OpenMP 5.1.
665         * intrinsic.texi (OMP_LIB): Mention OpenMP 5.1; add
666         omp_proc_bind_primary.
667         * openmp.c (gfc_match_omp_clauses): Accept
668         'primary' as alias for 'master'.
669         * trans-openmp.c (gfc_trans_omp_clauses): Handle
670         OMP_PROC_BIND_PRIMARY.
672 2021-08-11  Sandra Loosemore  <sandra@codesourcery.com>
674         * iso-c-binding.def (c_float128, c_float128_complex): Check
675         float128_type_node instead of gfc_float128_type_node.
676         * trans-types.c (gfc_init_kinds, gfc_build_real_type):
677         Update comments re supported 128-bit floating-point types.
679 2021-08-11  Richard Biener  <rguenther@suse.de>
681         * trans-common.c (create_common): Set TREE_THIS_VOLATILE on the
682         COMPONENT_REF if the field is volatile.
684 2021-08-07  Harald Anlauf  <anlauf@gmx.de>
686         PR fortran/68568
687         * primary.c (gfc_expr_attr): Variable attribute can only be
688         inquired when symtree is non-NULL.
690 2021-07-28  Harald Anlauf  <anlauf@gmx.de>
692         PR fortran/101564
693         * expr.c (gfc_check_vardef_context): Add check for KIND and LEN
694         parameter inquiries.
695         * match.c (gfc_match): Fix comment for %v code.
696         (gfc_match_allocate, gfc_match_deallocate): Replace use of %v code
697         by %e in gfc_match to allow for function references as STAT and
698         ERRMSG arguments.
699         * resolve.c (resolve_allocate_deallocate): Avoid NULL pointer
700         dereferences and shortcut for bad STAT and ERRMSG argument to
701         (DE)ALLOCATE.  Remove bogus parts of checks for STAT and ERRMSG.
703 2021-07-26  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
704             Tobias Burnus  <tobias@codesourcery.com>
706         PR fortran/93308
707         PR fortran/93963
708         PR fortran/94327
709         PR fortran/94331
710         PR fortran/97046
711         * trans-decl.c (convert_CFI_desc): Only copy out the descriptor
712         if necessary.
713         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Updated attribute
714         handling which reflect a previous intermediate version of the
715         standard. Only copy out the descriptor if necessary.
717 2021-07-23  Harald Anlauf  <anlauf@gmx.de>
719         PR fortran/101536
720         * check.c (array_check): Adjust check for the case of CLASS
721         arrays.
723 2021-07-21  Thomas Schwinge  <thomas@codesourcery.com>
724             Joseph Myers  <joseph@codesourcery.com>
725             Cesar Philippidis  <cesar@codesourcery.com>
727         * dump-parse-tree.c (show_attr): Update.
728         * gfortran.h (symbol_attribute): Add 'oacc_routine_nohost' member.
729         (gfc_omp_clauses): Add 'nohost' member.
730         * module.c (ab_attribute): Add 'AB_OACC_ROUTINE_NOHOST'.
731         (attr_bits, mio_symbol_attribute): Update.
732         * openmp.c (omp_mask2): Add 'OMP_CLAUSE_NOHOST'.
733         (gfc_match_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
734         (OACC_ROUTINE_CLAUSES): Add 'OMP_CLAUSE_NOHOST'.
735         (gfc_match_oacc_routine): Update.
736         * trans-decl.c (add_attributes_to_decl): Update.
737         * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
739 2021-07-21  Harald Anlauf  <anlauf@gmx.de>
741         PR fortran/101514
742         * target-memory.c (gfc_interpret_derived): Size of array component
743         of derived type can only be computed here for explicit shape.
744         * trans-types.c (gfc_get_nodesc_array_type): Do not dereference
745         NULL pointers.
747 2021-07-21  Tobias Burnus  <tobias@codesourcery.com>
749         * decl.c (gfc_verify_c_interop_param): Update for F2008 + F2018
750         changes; reject unsupported bits with 'Error: Sorry,'.
751         * trans-expr.c (gfc_conv_procedure_call): Fix condition to
752         For using CFI descriptor with characters.
754 2021-07-18  Harald Anlauf  <anlauf@gmx.de>
756         PR fortran/101084
757         * io.c (resolve_tag_format): Extend FORMAT check to unknown type.
759 2021-07-14  Harald Anlauf  <anlauf@gmx.de>
761         PR fortran/100949
762         * trans-expr.c (gfc_trans_class_init_assign): Call
763         gfc_conv_expr_present only for dummy variables.
765 2021-07-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
767         PR fortran/100227
768         * frontend-passes.c (traverse_io_block): Adjust test for
769         when a variable is eligible for the transformation to
770         array slice.
772 2021-06-28  Martin Sebor  <msebor@redhat.com>
774         * trans-array.c (trans_array_constructor): Replace direct uses
775         of TREE_NO_WARNING with warning_suppressed_p, and suppress_warning.
776         * trans-decl.c (gfc_build_qualified_array): Same.
777         (gfc_build_dummy_array_decl): Same.
778         (generate_local_decl): Same.
779         (gfc_generate_function_code): Same.
780         * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
781         (gfc_omp_clause_copy_ctor): Same.
782         * trans-types.c (get_dtype_type_node): Same.
783         (gfc_get_desc_dim_type): Same.
784         (gfc_get_array_descriptor_base): Same.
785         (gfc_get_caf_vector_type): Same.
786         (gfc_get_caf_reference_type): Same.
787         * trans.c (gfc_create_var_np): Same.
789 2021-06-23  Tobias Burnus  <tobias@codesourcery.com>
791         * dump-parse-tree.c (show_omp_clauses): Fix enum type used
792         for dumping gfc_omp_defaultmap_category.
794 2021-06-23  Andre Vehreschild  <vehre@gcc.gnu.org>
796         PR fortran/100337
797         * trans-intrinsic.c (conv_co_collective): Check stat for null ptr
798         before dereferrencing.
800 2021-06-18  Harald Anlauf  <anlauf@gmx.de>
802         PR fortran/100283
803         PR fortran/101123
804         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Unconditionally
805         convert result of min/max to result type.
807 2021-06-16  Harald Anlauf  <anlauf@gmx.de>
809         PR fortran/95501
810         PR fortran/95502
811         * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
812         dereference.
813         * match.c (gfc_match_pointer_assignment): Likewise.
814         * parse.c (gfc_check_do_variable): Avoid comparison with NULL
815         symtree.
817 2021-06-16  Harald Anlauf  <anlauf@gmx.de>
819         Revert:
820         2021-06-16  Harald Anlauf  <anlauf@gmx.de>
822         PR fortran/95501
823         PR fortran/95502
824         * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
825         dereference.
826         * match.c (gfc_match_pointer_assignment): Likewise.
827         * parse.c (gfc_check_do_variable): Avoid comparison with NULL
828         symtree.
830 2021-06-16  Harald Anlauf  <anlauf@gmx.de>
832         PR fortran/95501
833         PR fortran/95502
834         * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
835         dereference.
836         * match.c (gfc_match_pointer_assignment): Likewise.
837         * parse.c (gfc_check_do_variable): Avoid comparison with NULL
838         symtree.
840 2021-06-15  Tobias Burnus  <tobias@codesourcery.com>
842         PR fortran/92568
843         * dump-parse-tree.c (show_omp_clauses): Update for defaultmap.
844         * f95-lang.c (LANG_HOOKS_OMP_ALLOCATABLE_P,
845         LANG_HOOKS_OMP_SCALAR_TARGET_P): New.
846         * gfortran.h (enum gfc_omp_defaultmap,
847         enum gfc_omp_defaultmap_category): New.
848         * openmp.c (gfc_match_omp_clauses): Update defaultmap matching.
849         * trans-decl.c (gfc_finish_decl_attrs): Set GFC_DECL_SCALAR_TARGET.
850         * trans-openmp.c (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
851         (gfc_omp_scalar_p): Take 'ptr_alloc_ok' argument.
852         (gfc_trans_omp_clauses, gfc_split_omp_clauses): Update for
853         defaultmap changes.
854         * trans.h (gfc_omp_scalar_p): Update prototype.
855         (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
856         (struct lang_decl): Add scalar_target.
857         (GFC_DECL_SCALAR_TARGET, GFC_DECL_GET_SCALAR_TARGET): New.
859 2021-06-14  Tobias Burnus  <tobias@codesourcery.com>
861         * resolve.c (resolve_variable): Remove *XCNEW used to
862         nullify nullified memory.
864 2021-06-09  Martin Liska  <mliska@suse.cz>
866         * intrinsic.texi: Add missing @headitem to tables with a header.
868 2021-06-09  Jakub Jelinek  <jakub@redhat.com>
870         PR fortran/100965
871         * trans-openmp.c (gfc_omp_finish_clause): Gimplify OMP_CLAUSE_SIZE.
873 2021-06-08  Tobias Burnus  <tobias@codesourcery.com>
875         PR middle-end/99928
876         * trans-openmp.c (gfc_add_clause_implicitly): New.
877         (gfc_split_omp_clauses): Use it.
878         (gfc_free_split_omp_clauses): New.
879         (gfc_trans_omp_do_simd, gfc_trans_omp_parallel_do,
880         gfc_trans_omp_parallel_do_simd, gfc_trans_omp_distribute,
881         gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_taskloop,
882         gfc_trans_omp_master_taskloop, gfc_trans_omp_parallel_master): Use it.
884 2021-06-08  Martin Liska  <mliska@suse.cz>
886         * intrinsic.texi: Fix typo.
887         * trans-expr.c (gfc_trans_pointer_assignment): Likewise.
889 2021-06-05  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
891         PR fortran/100120
892         PR fortran/100816
893         PR fortran/100818
894         PR fortran/100819
895         PR fortran/100821
896         * trans-array.c (gfc_get_array_span): rework the way character
897         array "span" was calculated.
898         (gfc_conv_expr_descriptor): improve handling of character sections
899         and unlimited polymorphic objects.
900         * trans-expr.c (gfc_get_character_len): new function to calculate
901         character string length.
902         (gfc_get_character_len_in_bytes): new function to calculate
903         character string length in bytes.
904         (gfc_conv_scalar_to_descriptor): add call to set the "span".
905         (gfc_trans_pointer_assignment): set "_len" and antecipate the
906         initialization of the deferred character length hidden argument.
907         * trans-intrinsic.c (gfc_conv_associated): set "force_no_tmp" to
908         avoid the creation of a temporary.
909         * trans-types.c (gfc_get_dtype_rank_type): rework type detection
910         so that unlimited polymorphic objects get proper type infomation,
911         also important for bind(c).
912         (gfc_get_dtype): add argument to pass the rank if necessary.
913         (gfc_get_array_type_bounds): cosmetic change to have character
914         arrays called character instead of unknown.
915         * trans-types.h (gfc_get_dtype): modify prototype.
916         * trans.c (get_array_span): rework the way character array "span"
917         was calculated.
918         * trans.h (gfc_get_character_len): new prototype.
919         (gfc_get_character_len_in_bytes): new prototype.
920         Add "unlimited_polymorphic" flag to "gfc_se" type to signal when
921         expression carries an unlimited polymorphic object.
923 2021-06-04  Harald Anlauf  <anlauf@gmx.de>
925         PR fortran/99839
926         * frontend-passes.c (inline_matmul_assign): Do not inline matmul
927         if the assignment to the resulting array if it is not of canonical
928         type (real/integer/complex/logical).
930 2021-06-04  Tobias Burnus  <tobias@codesourcery.com>
932         * dump-parse-tree.c (show_code_node): Handle
933         EXEC_OMP_(TARGET_)(,PARALLEL_,TEAMS_)LOOP.
935 2021-06-04  Tobias Burnus  <tobias@codesourcery.com>
937         * scanner.c (skip_fixed_omp_sentinel): Set openacc_flag if
938         this is not an (OpenMP) continuation line.
939         (skip_fixed_oacc_sentinel): Likewise for openmp_flag and OpenACC.
940         (gfc_next_char_literal): gfc_error_now to force error for mixed OMP/ACC
941         continuation once per location and return '\n'.
943 2021-06-04  Tobias Burnus  <tobias@codesourcery.com>
945         PR middle-end/99928
946         * openmp.c (gfc_match_omp_clauses): Fix typo in error message.
948 2021-06-04  Tobias Burnus  <tobias@codesourcery.com>
950         PR middle-end/99928
951         * dump-parse-tree.c (show_omp_clauses): Handle bind clause.
952         (show_omp_node): Handle loop directive.
953         * frontend-passes.c (gfc_code_walker): Likewise.
954         * gfortran.h (enum gfc_statement): Add
955         ST_OMP_(END_)(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
956         (enum gfc_omp_bind_type): New.
957         (gfc_omp_clauses): Use it.
958         (enum gfc_exec_op): Add EXEC_OMP_(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
959         * match.h (gfc_match_omp_loop, gfc_match_omp_parallel_loop,
960         gfc_match_omp_target_parallel_loop, gfc_match_omp_target_teams_loop,
961         gfc_match_omp_teams_loop): New.
962         * openmp.c (enum omp_mask1): Add OMP_CLAUSE_BIND.
963         (gfc_match_omp_clauses): Handle it.
964         (OMP_LOOP_CLAUSES, gfc_match_omp_loop, gfc_match_omp_teams_loop,
965         gfc_match_omp_target_teams_loop, gfc_match_omp_parallel_loop,
966         gfc_match_omp_target_parallel_loop): New.
967         (resolve_omp_clauses, resolve_omp_do, omp_code_to_statement,
968         gfc_resolve_omp_directive): Handle omp loop.
969         * parse.c (decode_omp_directive case_exec_markers, gfc_ascii_statement,
970         parse_omp_do, parse_executable): Likewise.
971         (parse_omp_structured_block): Remove ST_ which use parse_omp_do.
972         * resolve.c (gfc_resolve_blocks): Add omp loop.
973         * st.c (gfc_free_statement): Likewise.
974         * trans-openmp.c (gfc_trans_omp_clauses): Handle bind clause.
975         (gfc_trans_omp_do, gfc_trans_omp_parallel_do, gfc_trans_omp_distribute,
976         gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_directive):
977         Handle loop directive.
978         (gfc_split_omp_clauses): Likewise; fix firstprivate/lastprivate
979         and (in_)reduction for taskloop.
980         * trans.c (trans_code): Handle omp loop directive.
982 2021-06-01  Tobias Burnus  <tobias@codesourcery.com>
984         PR middle-end/99928
985         * dump-parse-tree.c (show_omp_node, show_code_node): Handle
986         (parallel) master taskloop (simd).
987         * frontend-passes.c (gfc_code_walker): Set in_omp_workshare
988         to false for parallel master taskloop (simd).
989         * gfortran.h (enum gfc_statement):
990         Add ST_OMP_(END_)(PARALLEL_)MASTER_TASKLOOP(_SIMD).
991         (enum gfc_exec_op): EXEC_OMP_(PARALLEL_)MASTER_TASKLOOP(_SIMD).
992         * match.h (gfc_match_omp_master_taskloop,
993         gfc_match_omp_master_taskloop_simd,
994         gfc_match_omp_parallel_master_taskloop,
995         gfc_match_omp_parallel_master_taskloop_simd): New prototype.
996         * openmp.c (gfc_match_omp_parallel_master_taskloop,
997         gfc_match_omp_parallel_master_taskloop_simd,
998         gfc_match_omp_master_taskloop,
999         gfc_match_omp_master_taskloop_simd): New.
1000         (gfc_match_omp_taskloop_simd): Permit 'reduction' clause.
1001         (resolve_omp_clauses): Handle new combined directives; remove
1002         inscan-reduction check to reduce multiple errors; add
1003         task-reduction error for 'taskloop simd'.
1004         (gfc_resolve_omp_parallel_blocks,
1005         resolve_omp_do, omp_code_to_statement,
1006         gfc_resolve_omp_directive): Handle new combined constructs.
1007         * parse.c (decode_omp_directive, next_statement,
1008         gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
1009         parse_executable): Likewise.
1010         * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
1011         * st.c (gfc_free_statement): Likewise.
1012         * trans.c (trans_code): Likewise.
1013         * trans-openmp.c (gfc_split_omp_clauses,
1014         gfc_trans_omp_directive): Likewise.
1015         (gfc_trans_omp_parallel_master): Move after gfc_trans_omp_master_taskloop;
1016         handle parallel master taskloop (simd) as well.
1017         (gfc_trans_omp_taskloop): Take gfc_exec_op as arg.
1018         (gfc_trans_omp_master_taskloop): New.
1020 2021-05-30  Gerald Pfeifer  <gerald@pfeifer.com>
1022         * gfortran.texi (BOZ literal constants): Fix typo.
1024 2021-05-28  Tobias Burnus  <tobias@codesourcery.com>
1026         * dump-parse-tree.c (show_iterator): New.
1027         (show_omp_namelist): Handle iterators.
1028         (show_omp_clauses): Handle affinity.
1029         * gfortran.h (gfc_free_omp_namelist): New union with 'udr' and new 'ns'.
1030         * match.c (gfc_free_omp_namelist): Add are to choose union element.
1031         * openmp.c (gfc_free_omp_clauses, gfc_match_omp_detach,
1032         gfc_match_omp_clause_reduction, gfc_match_omp_flush): Update
1033         call to gfc_free_omp_namelist.
1034         (gfc_match_omp_variable_list): Likewise; permit preceeding whitespace.
1035         (enum omp_mask1): Add OMP_CLAUSE_AFFINITY.
1036         (gfc_match_iterator): New.
1037         (gfc_match_omp_clauses): Use it; update call to gfc_free_omp_namelist.
1038         (OMP_TASK_CLAUSES): Add OMP_CLAUSE_AFFINITY.
1039         (gfc_match_omp_taskwait): Match depend clause.
1040         (resolve_omp_clauses): Handle affinity; update for udr/union change.
1041         (gfc_resolve_omp_directive): Resolve clauses of taskwait.
1042         * st.c (gfc_free_statement): Update gfc_free_omp_namelist call.
1043         * trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Likewise
1044         (handle_iterator): New.
1045         (gfc_trans_omp_clauses): Handle iterators for depend/affinity clause.
1046         (gfc_trans_omp_taskwait): Handle depend clause.
1047         (gfc_trans_omp_directive): Update call.
1049 2021-05-27  Harald Anlauf  <anlauf@gmx.de>
1051         PR fortran/100602
1052         * trans-intrinsic.c (gfc_conv_intrinsic_size): Use CLASS data
1053         attributes for CLASS arrays for generation of runtime error.
1055 2021-05-27  Harald Anlauf  <anlauf@gmx.de>
1057         PR fortran/100656
1058         * trans-array.c (gfc_conv_ss_startstride): Do not call check for
1059         presence of a dummy argument when a symbol actually refers to a
1060         non-dummy.
1062 2021-05-25  Tobias Burnus  <tobias@codesourcery.com>
1063             Johannes Nendwich  <a08727063@unet.univie.ac.at>
1065         * intrinsic.texi (GERROR, GETARGS, GETLOG, NORM2, PARITY, RANDOM_INIT,
1066         RANDOM_NUMBER): Fix typos and copy'n'paste errors.
1068 2021-05-24  Tobias Burnus  <tobias@codesourcery.com>
1070         PR fortran/86470
1071         * trans-expr.c (gfc_copy_class_to_class): Add unshare_expr.
1072         * trans-openmp.c (gfc_is_polymorphic_nonptr,
1073         gfc_is_unlimited_polymorphic_nonptr): New.
1074         (gfc_omp_clause_copy_ctor, gfc_omp_clause_dtor): Handle
1075         polymorphic scalars.
1077 2021-05-23  Harald Anlauf  <anlauf@gmx.de>
1079         PR fortran/100551
1080         * trans-expr.c (gfc_conv_procedure_call): Adjust check for
1081         implicit conversion of actual argument to an unlimited polymorphic
1082         procedure argument.
1084 2021-05-23  Tobias Burnus  <tobias@codesourcery.com>
1086         * intrinsic.texi (ATOMIC_ADD, ATOMIC_FETCH_ADD): Use the
1087         proper variable name in the description.
1089 2021-05-22  Andre Vehreschild  <vehre@gcc.gnu.org>
1090             Steve Kargl  <kargl@gcc.gnu.org>
1092         PR fortran/98301
1093         * trans-decl.c (gfc_build_builtin_function_decls): Move decl.
1094         * trans-intrinsic.c (conv_intrinsic_random_init): Use bool for
1095         lib-call of caf_random_init instead of logical (4-byte).
1096         * trans.h: Add tree var for random_init.
1098 2021-05-20  Marcel Vollweiler  <marcel@codesourcery.com>
1100         * openmp.c (gfc_match_omp_clauses): Support map-type-modifier 'close'.
1102 2021-05-18  Tobias Burnus  <tobias@codesourcery.com>
1104         PR fortran/100642
1105         * openmp.c (omp_code_to_statement): Add missing EXEC_OMP_DEPOBJ.
1107 2021-05-17  Harald Anlauf  <anlauf@gmx.de>
1109         PR fortran/98411
1110         * trans-decl.c (gfc_finish_var_decl): Add check for explicit SAVE
1111         attribute.
1113 2021-05-17  Tobias Burnus  <tobias@codesourcery.com>
1115         PR fortran/100633
1116         * resolve.c (gfc_resolve_code): Reject nonintrinsic assignments in
1117         OMP WORKSHARE.
1119 2021-05-14  Tobias Burnus  <tobias@codesourcery.com>
1121         * dump-parse-tree.c (show_omp_node, show_code_node): Handle
1122         EXEC_OMP_PARALLEL_MASTER.
1123         * frontend-passes.c (gfc_code_walker): Likewise.
1124         * gfortran.h (enum gfc_statement): Add ST_OMP_PARALLEL_MASTER and
1125         ST_OMP_END_PARALLEL_MASTER.
1126         (enum gfc_exec_op): Add EXEC_OMP_PARALLEL_MASTER..
1127         * match.h (gfc_match_omp_parallel_master): Handle it.
1128         * openmp.c (gfc_match_omp_parallel_master, resolve_omp_clauses,
1129         omp_code_to_statement, gfc_resolve_omp_directive): Likewise.
1130         * parse.c (decode_omp_directive, case_exec_markers,
1131         gfc_ascii_statement, parse_omp_structured_block,
1132         parse_executable): Likewise.
1133         * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
1134         * st.c (gfc_free_statement): Likewise.
1135         * trans-openmp.c (gfc_trans_omp_parallel_master,
1136         gfc_trans_omp_workshare, gfc_trans_omp_directive): Likewise.
1137         * trans.c (trans_code): Likewise.
1139 2021-05-14  Tobias Burnus  <tobias@codesourcery.com>
1141         * resolve.c (resolve_symbol): Handle implicit SAVE of main-program
1142         for vars in 'omp threadprivate' and 'omp declare target'.
1144 2021-05-10  Martin Liska  <mliska@suse.cz>
1146         * decl.c (variable_decl): Use startswith
1147         function instead of strncmp.
1148         (gfc_match_end): Likewise.
1149         * gfortran.h (gfc_str_startswith): Likewise.
1150         * module.c (load_omp_udrs): Likewise.
1151         (read_module): Likewise.
1152         * options.c (gfc_handle_runtime_check_option): Likewise.
1153         * primary.c (match_arg_list_function): Likewise.
1154         * trans-decl.c (gfc_get_symbol_decl): Likewise.
1155         * trans-expr.c (gfc_conv_procedure_call): Likewise.
1156         * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Likewise.
1158 2021-05-06  Paul Thomas  <pault@gcc.gnu.org>
1160         PR fortran/46991
1161         PR fortran/99819
1162         * class.c (gfc_build_class_symbol): Remove the error that
1163         disables assumed size class arrays. Class array types that are
1164         not deferred shape or assumed rank are given a unique name and
1165         placed in the procedure namespace.
1166         * trans-array.c (gfc_trans_g77_array): Obtain the data pointer
1167         for class arrays.
1168         (gfc_trans_dummy_array_bias): Suppress the runtime error for
1169         extent violations in explicit shape class arrays because it
1170         always fails.
1171         * trans-expr.c (gfc_conv_procedure_call): Handle assumed size
1172         class actual arguments passed to non-descriptor formal args by
1173         using the data pointer, stored as the symbol's backend decl.
1175 2021-05-05  Harald Anlauf  <anlauf@gmx.de>
1177         PR fortran/100274
1178         * interface.c (gfc_compare_actual_formal): Continue checks after
1179         emitting warning for argument length mismatch.
1180         * trans-expr.c (gfc_conv_procedure_call): Check for NULL pointer
1181         dereference.
1183 2021-05-04  Tobias Burnus  <tobias@codesourcery.com>
1185         PR testsuite/100397
1186         * trans-openmp.c (gfc_trans_omp_depobj): Fix pasto in enum values.
1188 2021-04-28  Tobias Burnus  <tobias@codesourcery.com>
1190         * openmp.c (gfc_match_omp_variable_list): Gobble whitespace before
1191         checking whether a '%' or parenthesis-open follows as next character.
1193 2021-04-28  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
1195         PR fortran/82376
1196         * trans-expr.c (gfc_conv_procedure_call): Evaluate function result
1197         and then pass a pointer.
1199 2021-04-26  Thomas Schwinge  <thomas@codesourcery.com>
1200             Nathan Sidwell  <nathan@codesourcery.com>
1201             Tom de Vries  <vries@codesourcery.com>
1202             Julian Brown  <julian@codesourcery.com>
1203             Kwok Cheung Yeung  <kcy@codesourcery.com>
1205         * lang.opt (Wopenacc-parallelism): New.
1207 2021-04-24  Harald Anlauf  <anlauf@gmx.de>
1209         PR fortran/100154
1210         * check.c (variable_check): Allow function reference having a data
1211         pointer result.
1212         (arg_strlen_is_zero): New function.
1213         (gfc_check_fgetputc_sub): Add static check of character and status
1214         arguments.
1215         (gfc_check_fgetput_sub): Likewise.
1216         * intrinsic.c (add_subroutines): Fix argument name for the
1217         character argument to intrinsic subroutines fget[c], fput[c].
1219 2021-04-24  Harald Anlauf  <anlauf@gmx.de>
1221         PR fortran/100218
1222         * expr.c (gfc_check_vardef_context): Extend check to allow pointer
1223         from a function reference.
1225 2021-04-22  Martin Liska  <mliska@suse.cz>
1227         PR testsuite/100159
1228         PR testsuite/100192
1229         * frontend-passes.c (optimize_expr): Fix typos and missing comments.
1231 2021-04-22  Michael Meissner  <meissner@linux.ibm.com>
1233         PR fortran/96983
1234         * trans-intrinsic.c (build_round_expr): If int type is larger than
1235         long long, do the round and convert to the integer type.  Do not
1236         try to find a floating point type the exact size of the integer
1237         type.
1239 2021-04-21  Tobias Burnus  <tobias@codesourcery.com>
1241         * dump-parse-tree.c (show_omp_namelist): Handle depobj + mutexinoutset
1242         in the depend clause.
1243         (show_omp_clauses, show_omp_node, show_code_node): Handle depobj.
1244         * gfortran.h (enum gfc_statement): Add ST_OMP_DEPOBJ.
1245         (enum gfc_omp_depend_op): Add OMP_DEPEND_UNSET,
1246         OMP_DEPEND_MUTEXINOUTSET and OMP_DEPEND_DEPOBJ.
1247         (gfc_omp_clauses): Add destroy, depobj_update and depobj.
1248         (enum gfc_exec_op): Add EXEC_OMP_DEPOBJ
1249         * match.h (gfc_match_omp_depobj): Match 'omp depobj'.
1250         * openmp.c (gfc_match_omp_clauses): Add depobj + mutexinoutset
1251         to depend clause.
1252         (gfc_match_omp_depobj, resolve_omp_clauses, gfc_resolve_omp_directive):
1253         Handle 'omp depobj'.
1254         * parse.c (decode_omp_directive, next_statement, gfc_ascii_statement):
1255         Likewise.
1256         * resolve.c (gfc_resolve_code): Likewise.
1257         * st.c (gfc_free_statement): Likewise.
1258         * trans-openmp.c (gfc_trans_omp_clauses): Handle depobj + mutexinoutset
1259         in the depend clause.
1260         (gfc_trans_omp_depobj, gfc_trans_omp_directive): Handle EXEC_OMP_DEPOBJ.
1261         * trans.c (trans_code): Likewise.
1263 2021-04-20  Paul Thomas  <pault@gcc.gnu.org>
1265         PR fortran/100110
1266         * trans-decl.c (gfc_get_symbol_decl): Replace test for host
1267         association with a check that the current and symbol namespaces
1268         are the same.
1270 2021-04-19  Thomas Schwinge  <thomas@codesourcery.com>
1272         * lang.opt (fopenacc-kernels=): Remove.
1274 2021-04-16  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
1276         PR fortran/100094
1277         * trans-array.c (gfc_trans_deferred_array): Add code to initialize
1278         pointers and allocatables with correct TKR parameters.
1280 2021-04-16  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
1282         PR fortran/100018
1283         * resolve.c: Add association check before de-referencing pointer.
1285 2021-04-16  Harald Anlauf  <anlauf@gmx.de>
1286             Paul Thomas  <pault@gcc.gnu.org>
1288         PR fortran/63797
1289         * module.c (write_symtree): Do not write interface of intrinsic
1290         procedure to module file for F2003 and newer.
1292 2021-04-15  Paul Thomas  <pault@gcc.gnu.org>
1294         PR fortran/99307
1295         * symbol.c: Remove trailing white space.
1296         * trans-array.c (gfc_trans_create_temp_array): Create a class
1297         temporary for class expressions and assign the new descriptor
1298         to the data field.
1299         (build_class_array_ref): If the class expr can be extracted,
1300         then use that for 'decl'. Class function results are reliably
1301         handled this way. Call gfc_find_and_cut_at_last_class_ref to
1302         eliminate largely redundant code. Remove dead code and recast
1303         the rest of the code to extract 'decl' for remaining cases.
1304         Call gfc_build_spanned_array_ref.
1305         (gfc_alloc_allocatable_for_assignment): Use class descriptor
1306         element length for 'elemsize1'. Eliminate repeat set of dtype
1307         for class expressions.
1308         * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Include
1309         additional code from build_class_array_ref, and use optional
1310         gfc_typespec pointer argument.
1311         (gfc_trans_scalar_assign): Make use of pre and post blocks for
1312         all class expressions.
1313         * trans.c (get_array_span): For unlimited polymorphic exprs
1314         multiply the span by the value of the _len field.
1315         (gfc_build_spanned_array_ref): New function.
1316         (gfc_build_array_ref): Call gfc_build_spanned_array_ref and
1317         eliminate repeated code.
1318         * trans.h: Add arg to gfc_find_and_cut_at_last_class_ref and
1319         add prototype for gfc_build_spanned_array_ref.
1321 2021-04-14  Martin Liska  <mliska@suse.cz>
1323         * intrinsic.texi: The table has first column empty and it makes
1324         trouble when processing makeinfo --xml output.
1326 2021-04-09  Tobias Burnus  <tobias@codesourcery.com>
1328         PR fortran/99817
1329         * trans-types.c (gfc_get_function_type): Also generate hidden
1330         coarray argument for character arguments.
1332 2021-04-03  Paul Thomas  <pault@gcc.gnu.org>
1334         PR fortran/99818
1335         * interface.c (compare_parameter): The codimension attribute is
1336         applied to the _data field of class formal arguments.
1338 2021-04-01  Harald Anlauf  <anlauf@gmx.de>
1340         PR fortran/99840
1341         * simplify.c (gfc_simplify_transpose): Properly initialize
1342         resulting shape.
1344 2021-03-28  Paul Thomas  <pault@gcc.gnu.org>
1346         PR fortran/99602
1347         * trans-expr.c (gfc_conv_procedure_call): Use the _data attrs
1348         for class expressions and detect proc pointer evaluations by
1349         the non-null actual argument list.
1351 2021-03-27  Steve Kargl  <kargl@gcc.gnu.org>
1353         * misc.c (gfc_typename): Fix off-by-one in buffer sizes.
1355 2021-03-26  Tobias Burnus  <tobias@codesourcery.com>
1357         PR fortran/99651
1358         * intrinsic.c (gfc_intrinsic_func_interface): Set
1359         attr.proc = PROC_INTRINSIC if FL_PROCEDURE.
1361 2021-03-24  Tobias Burnus  <tobias@codesourcery.com>
1363         PR fortran/99369
1364         * resolve.c (resolve_operator): Make 'msg' buffer larger
1365         and use snprintf.
1367 2021-03-23  Tobias Burnus  <tobias@codesourcery.com>
1369         PR fortran/93660
1370         * trans-decl.c (build_function_decl): Add comment;
1371         increment hidden_typelist for caf_token/caf_offset.
1372         * trans-types.c (gfc_get_function_type): Add comment;
1373         add missing caf_token/caf_offset args.
1375 2021-03-22  Tobias Burnus  <tobias@codesourcery.com>
1377         PR fortran/99688
1378         * match.c (select_type_set_tmp, gfc_match_select_type,
1379         gfc_match_select_rank): Fix 'name' buffersize to avoid out of bounds.
1380         * resolve.c (resolve_select_type): Likewise.
1382 2021-03-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
1384         * frontend-passes.c (inline_limit_check): Add rank_a
1385         argument. If a is rank 1, set the second dimension to 1.
1386         (inline_matmul_assign): Pass rank_a argument to inline_limit_check.
1387         (call_external_blas): Likewise.
1389 2021-03-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
1391         PR fortran/99345
1392         * frontend-passes.c (doloop_contained_procedure_code):
1393         Properly handle EXEC_IOLENGTH.
1395 2021-03-15  Paul Thomas  <pault@gcc.gnu.org>
1397         PR fortran/99545
1398         * trans-stmt.c (gfc_trans_allocate): Mark the initialization
1399         assignment by setting init_flag.
1401 2021-03-14  Harald Anlauf  <anlauf@gmx.de>
1402             Paul Thomas  <pault@gcc.gnu.org>
1404         * trans-expr.c (gfc_conv_procedure_call): Fix runtime checks for
1405         CLASS arguments.
1406         * trans-intrinsic.c (gfc_conv_intrinsic_size): Likewise.
1408 2021-03-13  Paul Thomas  <pault@gcc.gnu.org>
1410         PR fortran/99125
1411         * trans-array.c (gfc_conv_expr_descriptor): For deferred length
1412         length components use the ss_info string length instead of
1413         gfc_get_expr_charlen. Make sure that the deferred string length
1414         is a variable before assigning to it. Otherwise use the expr.
1415         * trans-expr.c (gfc_conv_string_length): Make sure that the
1416         deferred string length is a variable before assigning to it.
1418 2021-03-12  Tobias Burnus  <tobias@codesourcery.com>
1420         PR fortran/99514
1421         * resolve.c (resolve_symbol): Accept vars which are in DATA
1422         and hence (either) implicit SAVE (or in common).
1424 2021-03-10  Harald Anlauf  <anlauf@gmx.de>
1426         PR fortran/99205
1427         * data.c (gfc_assign_data_value): Reject non-constant character
1428         length for lvalue.
1429         * trans-array.c (gfc_conv_array_initializer): Restrict loop to
1430         elements which are defined to avoid NULL pointer dereference.
1432 2021-03-10  Tobias Burnus  <tobias@codesourcery.com>
1434         * intrinsic.texi (MIN): Correct 'maximum' to 'minimum'.
1436 2021-03-10  Eric Botcazou  <ebotcazou@adacore.com>
1438         PR fortran/96983
1439         * trans-intrinsic.c (build_round_expr): Do not implicitly assume
1440         that __float128 is the 128-bit floating-point type.
1442 2021-03-08  Harald Anlauf  <anlauf@gmx.de>
1444         PR fortran/49278
1445         * data.c (gfc_assign_data_value): Reject variable with PARAMETER
1446         attribute in DATA statement.
1448 2021-03-05  Tobias Burnus  <tobias@codesourcery.com>
1450         PR fortran/99355
1451         PR fortran/57871
1452         * invoke.texi (-freal{4,8}-real-*): Extend description.
1453         * primary.c (match_real_constant): Also promote real literals
1454         with '_kind' number.
1456 2021-03-04  Tobias Burnus  <tobias@codesourcery.com>
1458         PR fortran/99355
1459         * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Avoid
1460         redoing kind conversions.
1461         * primary.c (match_real_constant): Likewise.
1463 2021-02-28  Jakub Jelinek  <jakub@redhat.com>
1465         PR fortran/99303
1466         * openmp.c (gfc_omp_requires_add_clause): Fix up diagnostic message
1467         wordings.
1468         (resolve_omp_clauses): Likewise.
1470 2021-02-28  Jakub Jelinek  <jakub@redhat.com>
1472         PR fortran/99300
1473         * frontend-passes.c (doloop_code): Replace double space in diagnostics
1474         with a single space.
1476 2021-02-24  Paul Thomas  <pault@gcc.gnu.org>
1478         PR fortran/98342
1479         * trans-expr.c (gfc_conv_derived_to_class): Add optional arg.
1480         'derived_array' to hold the fixed, parmse expr in the case of
1481         assumed rank formal arguments. Deal with optional arguments.
1482         (gfc_conv_procedure_call): Null 'derived' array for each actual
1483         argument. Add its address to the call to gfc_conv_derived_to_
1484         class. Access the 'data' field of scalar descriptors before
1485         deallocating allocatable components. Also strip NOPs before the
1486         calls to gfc_deallocate_alloc_comp. Use 'derived' array as the
1487         input to gfc_deallocate_alloc_comp if it is available.
1488         * trans.h : Include the optional argument 'derived_array' to
1489         the prototype of gfc_conv_derived_to_class. The default value
1490         is NULL_TREE.
1492 2021-02-23  Paul Thomas  <pault@gcc.gnu.org>
1494         PR fortran/99124
1495         * resolve.c (resolve_fl_procedure): Include class results in
1496         the test for F2018, C15100.
1497         * trans-array.c (get_class_info_from_ss): Do not use the saved
1498         descriptor to obtain the class expression for variables. Use
1499         gfc_get_class_from_expr instead.
1501 2021-02-23  Harald Anlauf  <anlauf@gmx.de>
1503         PR fortran/99206
1504         * simplify.c (gfc_simplify_reshape): Set string length for
1505         character arguments.
1507 2021-02-22  Tobias Burnus  <tobias@codesourcery.com>
1509         PR fortran/99171
1510         * trans-openmp.c (gfc_omp_is_optional_argument): Regard optional
1511         dummy procs as nonoptional as no special treatment is needed.
1513 2021-02-21  Harald Anlauf  <anlauf@gmx.de>
1515         * trans-expr.c (gfc_conv_procedure_call): Do not add clobber to
1516         allocatable intent(out) argument.
1518 2021-02-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1520         PR fortran/98686
1521         * match.c (gfc_match_namelist): If BT_UNKNOWN, check for
1522         IMPLICIT NONE and and issue an error, otherwise set the type
1523         to its IMPLICIT type so that any subsequent use of objects will
1524         will confirm their types.
1526 2021-02-19  Harald Anlauf  <anlauf@gmx.de>
1528         * symbol.c (gfc_add_flavor): Reverse order of conditions.
1530 2021-02-19  Tobias Burnus  <tobias@codesourcery.com>
1532         PR fortran/99010
1533         * dependency.c (gfc_dep_resolver): Fix coarray handling.
1535 2021-02-19  Tobias Burnus  <tobias@codesourcery.com>
1537         PR fortran/99146
1538         * interface.c:
1540 2021-02-19  Tobias Burnus  <tobias@codesourcery.com>
1542         PR fortran/99027
1543         * simplify.c (simplify_bound_dim): Honor DIMEN_ELEMENT
1544         when using dim=.
1546 2021-02-17  Julian Brown  <julian@codesourcery.com>
1548         * openmp.c (resolve_omp_clauses): Disallow selecting components
1549         of arrays of derived type.
1551 2021-02-17  Julian Brown  <julian@codesourcery.com>
1553         * trans-openmp.c (gfc_trans_omp_clauses): Handle element selection
1554         for arrays of derived types.
1556 2021-02-16  Tobias Burnus  <tobias@codesourcery.com>
1558         * expr.c (gfc_is_simplify_contiguous): Handle REF_INQUIRY, i.e.
1559         %im and %re which are EXPR_VARIABLE.
1560         * openmp.c (resolve_omp_clauses): Diagnose %re/%im explicitly.
1562 2021-02-16  Tobias Burnus  <tobias@codesourcery.com>
1564         PR fortran/99111
1565         * io.c (resolve_tag_format): Reject BT_DERIVED/CLASS/VOID
1566         as (array-valued) FORMAT tag.
1568 2021-02-12  Tobias Burnus  <tobias@codesourcery.com>
1570         PR fortran/99043
1571         * trans-expr.c (gfc_conv_procedure_call): Don't reset
1572         rank of assumed-rank array.
1574 2021-02-11  Paul Thomas  <pault@gcc.gnu.org>
1576         PR fortran/98897
1577         * match.c (gfc_match_call): Include associate names as possible
1578         entities with typebound subroutines. The target needs to be
1579         resolved for the type.
1581 2021-02-11  Paul Thomas  <pault@gcc.gnu.org>
1583         PR fortran/99060
1584         * primary.c (gfc_match_varspec): Test for non-null 'previous'
1585         before using its name in the error message.
1587 2021-02-11  Tobias Burnus  <tobias@codesourcery.com>
1589         * intrinsic.texi (FINDLOC): Add 'MASK' to argument table.
1590         (MAXLOC, MAXVAL, MINLOC, MINVAL): For 'MASK', remove 'an
1591         array' as scalars are also permitted.
1593 2021-02-10  Julian Brown  <julian@codesourcery.com>
1595         PR fortran/98979
1596         * openmp.c (resolve_omp_clauses): Omit OpenACC update in
1597         contiguity check and stride-specified error.
1599 2021-02-04  Julian Brown  <julian@codesourcery.com>
1601         * openmp.c (resolve_omp_clauses): Omit OpenACC update in
1602         contiguity check and stride-specified error.
1604 2021-02-04  Julian Brown  <julian@codesourcery.com>
1606         * trans-openmp.c (gfc_trans_omp_clauses): Use class_pointer attribute
1607         for BT_CLASS.
1609 2021-02-04  Julian Brown  <julian@codesourcery.com>
1611         * trans-openmp.c (gfc_trans_omp_clauses): Fix dereferencing for
1612         BT_DERIVED members.
1614 2021-02-04  Tobias Burnus  <tobias@codesourcery.com>
1616         * openmp.c (resolve_omp_clauses): Explicitly diagnose
1617         substrings as not permitted.
1619 2021-02-03  Jeff Law  <law@redhat.com>
1621         * intrinsic.texi (ANINT): Fix typo.
1623 2021-02-03  Tobias Burnus  <tobias@codesourcery.com>
1625         PR fortran/98913
1626         * dependency.c (gfc_dep_resolver): Treat local access
1627         to coarrays like any array access in dependency analysis.
1629 2021-01-28  Harald Anlauf  <anlauf@gmx.de>
1631         PR fortran/86470
1632         * trans.c (gfc_call_malloc): Allocate area of size 1 if passed
1633         size is NULL (as documented).
1635 2021-01-27  Paul Thomas  <pault@gcc.gnu.org>
1637         PR fortran/93924
1638         PR fortran/93925
1639         * trans-expr.c (gfc_conv_procedure_call): Suppress the call to
1640         gfc_conv_intrinsic_to_class for unlimited polymorphic procedure
1641         pointers.
1642         (gfc_trans_assignment_1): Similarly suppress class assignment
1643         for class valued procedure pointers.
1645 2021-01-27  Paul Thomas  <pault@gcc.gnu.org>
1647         PR fortran/98472
1648         * trans-array.c (gfc_conv_expr_descriptor): Include elemental
1649         procedure pointers in the assert under the comment 'elemental
1650         function' and eliminate the second, spurious assert.
1652 2021-01-25  Harald Anlauf  <anlauf@gmx.de>
1654         PR fortran/70070
1655         * data.c (create_character_initializer): Check substring indices
1656         against bounds.
1657         (gfc_assign_data_value): Catch error returned from
1658         create_character_initializer.
1660 2021-01-25  Tobias Burnus  <tobias@codesourcery.com>
1662         * intrinsic.texi (CO_BROADCAST, CO_MIN, CO_REDUCE, CO_SUM): Fix typos.
1664 2021-01-25  Steve Kargl  <kargl@gcc.gnu.org>
1666         PR fortran/98517
1667         * resolve.c (resolve_charlen): Check that length expression is
1668         present before testing for scalar/integer..
1670 2021-01-22  Paul Thomas  <pault@gcc.gnu.org>
1672         PR fortran/98565
1673         * trans-intrinsic.c (gfc_conv_associated): Do not add a _data
1674         component for scalar class function targets. Instead, fix the
1675         function result and access the _data from that.
1677 2021-01-21  Jorge D'Elia  <jdelia@cimec.unl.edu.ar>
1679         * intrinsic.texi (CO_MAX): Fix typo.
1681 2021-01-21  Paul Thomas  <pault@gcc.gnu.org>
1683         PR fortran/96320
1684         * decl.c (gfc_match_modproc): It is not an error to find a
1685         module procedure declaration within a contains block.
1686         * expr.c (gfc_check_vardef_context): Pure procedure result is
1687         assignable. Change 'own_scope' accordingly.
1688         * resolve.c (resolve_typebound_procedure): A procedure that
1689         has the module procedure attribute is almost certainly a
1690         module procedure, whatever its interface.
1692 2021-01-19  Tobias Burnus  <tobias@codesourcery.com>
1694         PR fortran/98476
1695         * openmp.c (resolve_omp_clauses): Change use_device_ptr
1696         to use_device_addr for unless type(c_ptr); check all
1697         list item for is_device_ptr.
1699 2021-01-16  Kwok Cheung Yeung  <kcy@codesourcery.com>
1701         * dump-parse-tree.c (show_omp_clauses): Handle detach clause.
1702         * frontend-passes.c (gfc_code_walker): Walk detach expression.
1703         * gfortran.h (struct gfc_omp_clauses): Add detach field.
1704         (gfc_c_intptr_kind): New.
1705         * openmp.c (gfc_free_omp_clauses): Free detach clause.
1706         (gfc_match_omp_detach): New.
1707         (enum omp_mask1): Add OMP_CLAUSE_DETACH.
1708         (enum omp_mask2): Remove OMP_CLAUSE_DETACH.
1709         (gfc_match_omp_clauses): Handle OMP_CLAUSE_DETACH for OpenMP.
1710         (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DETACH.
1711         (resolve_omp_clauses): Prevent use of detach with mergeable and
1712         overriding the data sharing mode of the event handle.
1713         * trans-openmp.c (gfc_trans_omp_clauses): Handle detach clause.
1714         * trans-types.c (gfc_c_intptr_kind): New.
1715         (gfc_init_kinds): Initialize gfc_c_intptr_kind.
1716         * types.def
1717         (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT): Rename
1718         to...
1719         (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT_PTR):
1720         ...this.  Add extra argument.
1722 2021-01-14  Harald Anlauf  <anlauf@gmx.de>
1724         * gfortran.h (gfc_resolve_substring): Add prototype.
1725         * primary.c (match_string_constant): Simplify substrings with
1726         constant starting and ending points.
1727         * resolve.c: Rename resolve_substring to gfc_resolve_substring.
1728         (gfc_resolve_ref): Use renamed function gfc_resolve_substring.
1730 2021-01-14  Harald Anlauf  <anlauf@gmx.de>
1732         PR fortran/98661
1733         * resolve.c (resolve_component): Derived type components with
1734         ALLOCATABLE or POINTER attribute shall have a deferred shape.
1736 2021-01-14  Harald Anlauf  <anlauf@gmx.de>
1738         Revert:
1739         2021-01-14  Harald Anlauf  <anlauf@gmx.de>
1741         PR fortran/98661
1742         * resolve.c (resolve_component): Derived type components with
1743         ALLOCATABLE or POINTER attribute shall have a deferred shape.
1745 2021-01-14  Harald Anlauf  <anlauf@gmx.de>
1747         PR fortran/98661
1748         * resolve.c (resolve_component): Derived type components with
1749         ALLOCATABLE or POINTER attribute shall have a deferred shape.
1751 2021-01-08  Paul Thomas  <pault@gcc.gnu.org>
1753         PR fortran/93794
1754         * trans-expr.c (gfc_conv_component_ref): Remove the condition
1755         that deferred character length components only be allocatable.
1757 2021-01-08  Paul Thomas  <pault@gcc.gnu.org>
1759         PR fortran/98458
1760         * simplify.c (is_constant_array_expr): If an array constructor
1761         expression has elements other than constants or structures, try
1762         fixing the expression with gfc_reduce_init_expr. Also, if shape
1763         is NULL, obtain the array size and set it.
1765 2021-01-07  Paul Thomas  <pault@gcc.gnu.org>
1767         PR fortran/93701
1768         * resolve.c (find_array_spec): Put static prototype for
1769         resolve_assoc_var before this function and call for associate
1770         variables.
1772 2021-01-06  Harald Anlauf  <anlauf@gmx.de>
1774         * resolve.c (resolve_component): Add check for valid CLASS
1775         reference before trying to access CLASS data.
1777 2021-01-04  Martin Liska  <mliska@suse.cz>
1779         * ChangeLog-2018: Remove duplicate ChangeLog entries.
1781 2021-01-01  Harald Anlauf  <anlauf@gmx.de>
1783         * class.c (gfc_find_vtab): Add check on attribute is_class.
1785 2021-01-01  Jakub Jelinek  <jakub@redhat.com>
1787         * gfortranspec.c (lang_specific_driver): Update copyright notice
1788         dates.
1789         * gfc-internals.texi: Bump @copying's copyright year.
1790         * gfortran.texi: Ditto.
1791         * intrinsic.texi: Ditto.
1792         * invoke.texi: Ditto.
1794 2021-01-01  Jakub Jelinek  <jakub@redhat.com>
1796         * ChangeLog-2020: Rotate ChangeLog.  New file.
1799 Copyright (C) 2021 Free Software Foundation, Inc.
1801 Copying and distribution of this file, with or without modification,
1802 are permitted in any medium without royalty provided the copyright
1803 notice and this notice are preserved.