Daily bump.
[official-gcc.git] / gcc / fortran / ChangeLog
blobab6584c4af2d36573dfab202738aeef62b21dc76
1 2021-11-23  Harald Anlauf  <anlauf@gmx.de>
3         PR fortran/103392
4         * simplify.c (simplify_bound): Do not try to simplify
5         LBOUND/UBOUND for arrays with POINTER or ALLOCATABLE attribute.
7 2021-11-23  Harald Anlauf  <anlauf@gmx.de>
9         PR fortran/87711
10         PR fortran/87851
11         * trans-array.c (arg_evaluated_for_scalarization): Add LEN_TRIM to
12         list of intrinsics for which an optional KIND argument needs to be
13         removed before scalarization.
15 2021-11-21  Jakub Jelinek  <jakub@redhat.com>
17         PR debug/103315
18         * trans-types.c (gfc_get_array_descr_info): Use DW_OP_deref_size 1
19         instead of DW_OP_deref for DW_AT_rank.
21 2021-11-21  Harald Anlauf  <anlauf@gmx.de>
22             Steven G. Kargl  <kargl@gcc.gnu.org>
24         PR fortran/99061
25         * trans-intrinsic.c (gfc_lookup_intrinsic): Helper function for
26         looking up gfortran builtin intrinsics.
27         (gfc_conv_intrinsic_atrigd): Use it.
28         (gfc_conv_intrinsic_cotan): Likewise.
29         (gfc_conv_intrinsic_cotand): Likewise.
30         (gfc_conv_intrinsic_atan2d): Likewise.
32 2021-11-18  Harald Anlauf  <anlauf@gmx.de>
33             Steven G. Kargl  <kargl@gcc.gnu.org>
35         PR fortran/101329
36         * check.c (is_c_interoperable): Reject NULL() as it is not
37         interoperable.
39 2021-11-16  Harald Anlauf  <anlauf@gmx.de>
41         PR fortran/103286
42         * resolve.c (resolve_select): Choose appropriate range limit to
43         avoid NULL pointer dereference when generating error message.
45 2021-11-16  Mikael Morin  <mikael@gcc.gnu.org>
47         * interface.c (gfc_dummy_arg_get_name): New function.
48         * gfortran.h (gfc_dummy_arg_get_name): Declare it.
49         * trans-array.c (arg_evaluated_for_scalarization): Pass a dummy
50         argument wrapper as argument instead of an actual argument
51         and an index number.  Check it’s non-NULL.  Use its name
52         to identify it.
53         (gfc_walk_elemental_function_args): Update call to
54         arg_evaluated for scalarization.  Remove argument counting.
56 2021-11-16  Mikael Morin  <mikael@gcc.gnu.org>
58         * gfortran.h (gfc_actual_arglist::missing_arg_type): Remove.
59         * interface.c (gfc_compare_actual_formal): Remove
60         missing_arg_type initialization.
61         * intrinsic.c (sort_actual): Ditto.
62         * trans-expr.c (gfc_conv_procedure_call): Use associated_dummy
63         and gfc_dummy_arg_get_typespec to get the dummy argument type.
65 2021-11-16  Mikael Morin  <mikael@gcc.gnu.org>
67         * interface.c (gfc_dummy_arg_get_typespec,
68         gfc_dummy_arg_is_optional): New functions.
69         * gfortran.h (gfc_dummy_arg_get_typespec,
70         gfc_dummy_arg_is_optional): Declare them.
71         * trans.h (gfc_ss_info::dummy_arg): Use the wrapper type
72         as declaration type.
73         * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
74         use gfc_dummy_arg_get_typespec function to get the type.
75         (gfc_walk_elemental_function_args): Remove proc_ifc argument.
76         Get info about the dummy arg using the associated_dummy field.
77         * trans-array.h (gfc_walk_elemental_function_args): Update declaration.
78         * trans-intrinsic.c (gfc_walk_intrinsic_function):
79         Update call to gfc_walk_elemental_function_args.
80         * trans-stmt.c (gfc_trans_call): Ditto.
81         (get_proc_ifc_for_call): Remove.
83 2021-11-16  Mikael Morin  <mikael@gcc.gnu.org>
85         * gfortran.h (gfc_dummy_arg_kind, gfc_dummy_arg): New.
86         (gfc_actual_arglist): New field associated_dummy.
87         (gfc_intrinsic_arg): Remove field actual.
88         * interface.c (get_nonintrinsic_dummy_arg): New.
89         (gfc_compare_actual): Initialize associated_dummy.
90         * intrinsic.c (get_intrinsic_dummy_arg): New.
91         (sort_actual):  Add argument vectors.
92         Use loops with indices on argument vectors.
93         Initialize associated_dummy.
95 2021-11-16  Mikael Morin  <mikael@gcc.gnu.org>
97         * intrinsic.c (sort_actual): initialise variable and use it earlier.
99 2021-11-15  Tobias Burnus  <tobias@codesourcery.com>
101         * openmp.c (OMP_TARGET_CLAUSES): Add thread_limit.
102         * trans-openmp.c (gfc_split_omp_clauses): Add thread_limit also to
103         teams.
105 2021-11-12  Tobias Burnus  <tobias@codesourcery.com>
107         * parse.c (decode_omp_directive): Fix permitting 'nowait' for some
108         combined directives, add missing 'omp end ... loop'.
109         (gfc_ascii_statement): Fix ST_OMP_END_TEAMS_LOOP result.
110         * openmp.c (resolve_omp_clauses): Add missing combined loop constructs
111         case values to the 'if(directive-name: ...)' check.
112         * trans-openmp.c (gfc_split_omp_clauses): Put nowait on target if
113         first leaf construct accepting it.
115 2021-11-12  Martin Jambor  <mjambor@suse.cz>
117         * trans-types.c (gfc_get_array_descr_info): Use build_debug_expr_decl
118         instead of building DEBUG_EXPR_DECL manually.
120 2021-11-12  Mikael Morin  <mikael@gcc.gnu.org>
122         PR fortran/97896
123         * intrinsic.c (add_sym_4ind): Remove.
124         (add_functions): Use add_sym4 instead of add_sym4ind.
125         Don’t special case the index intrinsic.
126         * iresolve.c (gfc_resolve_index_func): Use the individual arguments
127         directly instead of the full argument list.
128         * intrinsic.h (gfc_resolve_index_func): Update the declaration
129         accordingly.
130         * trans-decl.c (gfc_get_extern_function_decl): Don’t modify the
131         list of arguments in the case of the index intrinsic.
132         * trans-array.h (gfc_get_intrinsic_for_expr,
133         gfc_get_proc_ifc_for_expr): New.
134         * trans-array.c (gfc_get_intrinsic_for_expr,
135         arg_evaluated_for_scalarization): New.
136         (gfc_walk_elemental_function_args): Add intrinsic procedure
137         as argument.  Count arguments.  Check arg_evaluated_for_scalarization.
138         * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
139         * trans-stmt.c (get_intrinsic_for_code): New.
140         (gfc_trans_call): Update call.
142 2021-11-12  Jakub Jelinek  <jakub@redhat.com>
144         * types.def (BT_FN_VOID_UINT_UINT): Remove.
145         (BT_FN_BOOL_UINT_UINT_UINT_BOOL): New.
147 2021-11-11  Tobias Burnus  <tobias@codesourcery.com>
149         * gfortran.h (struct gfc_omp_clauses): Rename num_teams to
150         num_teams_upper, add num_teams_upper.
151         * dump-parse-tree.c (show_omp_clauses): Update to handle
152         lower-bound num_teams clause.
153         * frontend-passes.c (gfc_code_walker): Likewise
154         * openmp.c (gfc_free_omp_clauses, gfc_match_omp_clauses,
155         resolve_omp_clauses): Likewise.
156         * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses,
157         gfc_trans_omp_target): Likewise.
159 2021-11-11  Jakub Jelinek  <jakub@redhat.com>
161         * trans-openmp.c (gfc_trans_omp_clauses): Use
162         OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of OMP_CLAUSE_NUM_TEAMS_EXPR.
164 2021-11-10  Harald Anlauf  <anlauf@gmx.de>
166         PR fortran/103137
167         PR fortran/103138
168         * check.c (gfc_check_shape): Avoid NULL pointer dereference on
169         missing ref.
170         * simplify.c (gfc_simplify_cshift): Avoid NULL pointer dereference
171         when shape not set.
172         (gfc_simplify_transpose): Likewise.
174 2021-11-09  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
176         PR fortran/68800
177         * class.c (generate_finalization_wrapper): Do not leak
178         finalization wrappers if they will not be used.
179         * expr.c (gfc_free_actual_arglist): Formatting fix.
180         * gfortran.h (gfc_free_symbol): Pass argument by reference.
181         (gfc_release_symbol): Likewise.
182         (gfc_free_namespace): Likewise.
183         * symbol.c (gfc_release_symbol): Adjust acordingly.
184         (free_components): Set procedure pointer components
185         of derived types to NULL after freeing.
186         (free_tb_tree): Likewise.
187         (gfc_free_symbol): Set sym to NULL after freeing.
188         (gfc_free_namespace): Set namespace to NULL after freeing.
190 2021-11-09  Martin Liska  <mliska@suse.cz>
192         * symbol.c (gfc_get_ultimate_derived_super_type): Remove.
194 2021-11-09  Aldy Hernandez  <aldyh@redhat.com>
196         * misc.c (gfc_dummy_typename): Make sure ts->kind is
197         non-negative.
199 2021-11-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
201         * intrinsic.c (add_subroutines): Change keyword "operator"
202         to the correct one, "operation".
203         * check.c (gfc_check_co_reduce): Change OPERATOR to
204         OPERATION in error messages.
205         * intrinsic.texi: Change OPERATOR to OPERATION in
206         documentation.
208 2021-11-07  Sandra Loosemore  <sandra@codesourcery.com>
210         * interface.c (gfc_compare_actual_formal): Continue checking
211         all arguments after encountering an error.
212         * intrinsic.c (do_ts29113_check): Likewise.
213         * resolve.c (resolve_operator): Continue resolving on op2 error.
215 2021-11-06  Harald Anlauf  <anlauf@gmx.de>
217         PR fortran/102715
218         * decl.c (add_init_expr_to_sym): Reject rank mismatch between
219         array and its initializer.
221 2021-11-05  Harald Anlauf  <anlauf@gmx.de>
223         PR fortran/102817
224         * expr.c (simplify_parameter_variable): Copy shape of referenced
225         subobject when simplifying.
227 2021-11-05  Harald Anlauf  <anlauf@gmx.de>
229         PR fortran/69419
230         * match.c (gfc_match_common): Check array spec of a symbol in a
231         COMMON object list and reject it if it is a coarray.
233 2021-11-05  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
235         PR fortran/100972
236         * decl.c (gfc_match_implicit_none): Fix typo in warning.
237         * resolve.c (resolve_unknown_f): Reject external procedures
238         without explicit EXTERNAL attribute whe IMPLICIT none (external)
239         is in effect.
241 2021-11-05  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
243         * decl.c (gfc_insert_kind_parameter_exprs): Make static.
244         * expr.c (gfc_build_init_expr): Make static
245         (gfc_build_default_init_expr): Move below its static helper.
246         * gfortran.h (gfc_insert_kind_parameter_exprs, gfc_add_saved_common,
247         gfc_add_common, gfc_use_derived_tree, gfc_free_charlen,
248         gfc_get_ultimate_derived_super_type,
249         gfc_resolve_oacc_parallel_loop_blocks, gfc_build_init_expr,
250         gfc_iso_c_sub_interface): Delete.
251         * symbol.c (gfc_new_charlen, gfc_get_derived_super_type): Make
252         static.
254 2021-11-05  Sandra Loosemore  <sandra@codesourcery.com>
256         PR fortran/35276
257         * gfortran.texi (Mixed-Language Programming): Talk about C++,
258         and how to link.
260 2021-11-04  Sandra Loosemore  <sandra@codesourcery.com>
262         * gfortran.texi (Projects): Add bullet for helping with
263         incomplete standards compliance.
264         (Proposed Extensions): Delete section.
266 2021-11-04  Sandra Loosemore  <sandra@codesourcery.com>
268         * intrinsic.texi (Introduction to Intrinsics): Genericize
269         references to standard versions.
270         * invoke.texi (-fall-intrinsics): Likewise.
271         (-fmax-identifier-length=): Likewise.
273 2021-11-04  Sandra Loosemore  <sandra@codesourcery.com>
275         * gfortran.texi (Interoperability with C): Copy-editing.  Add
276         more index entries.
277         (Intrinsic Types): Likewise.
278         (Derived Types and struct): Likewise.
279         (Interoperable Global Variables): Likewise.
280         (Interoperable Subroutines and Functions): Likewise.
281         (Working with C Pointers): Likewise.
282         (Further Interoperability of Fortran with C): Likewise.  Rewrite
283         to reflect that this is now fully supported by gfortran.
285 2021-11-04  Sandra Loosemore  <sandra@codesourcery.com>
287         * gfortran.texi (About GNU Fortran): Consolidate material
288         formerly in other sections.  Copy-editing.
289         (Preprocessing and conditional compilation): Delete, moving
290         most material to invoke.texi.
291         (GNU Fortran and G77): Delete.
292         (Project Status): Delete.
293         (Standards): Update.
294         (Fortran 95 status): Mention conditional compilation here.
295         (Fortran 2003 status): Rewrite to mention the 1 missing feature
296         instead of all the ones implemented.
297         (Fortran 2008 status): Similarly for the 2 missing features.
298         (Fortran 2018 status): Rewrite to reflect completion of TS29113
299         feature support.
300         * invoke.texi (Preprocessing Options): Move material formerly
301         in introductory chapter here.
303 2021-11-04  Sandra Loosemore  <sandra@codesourcery.com>
305         * gfortran.texi (Standards): Move discussion of specific
306         standard versions here....
307         (Fortran standards status): ...from here, and delete this node.
309 2021-10-31  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
311         * symbol.c (gfc_get_typebound_proc): Revert memcpy.
313 2021-10-31  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
315         * resolve.c (resolve_fl_procedure): Initialize
316         allocatable_or_pointer.
318 2021-10-30  Manfred Schwarb  <manfred99@gmx.ch>
320         * intrinsic.texi: Remove entries for SHORT and LONG intrinsics.
322 2021-10-30  Manfred Schwarb  <manfred99@gmx.ch>
324         * check.c (gfc_check_intconv): Change error message.
326 2021-10-30  Manfred Schwarb  <manfred99@gmx.ch>
328         * intrinsic.texi (REAL): Fix entries in Specific names table.
330 2021-10-30  Manfred Schwarb  <manfred99@gmx.ch>
332         * intrinsic.texi: Adjust @columnfractions commands to improve
333         appearance for narrow 80 character terminals.
335 2021-10-30  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
337         * parse.c (clean_up_modules): Free gsym.
339 2021-10-30  Harald Anlauf  <anlauf@gmx.de>
341         * gfortran.texi (bug reports): credit Gerhard Steinmetz for
342           numerous bug reports.
344 2021-10-30  Steve Kargl  <kargl@gcc.gnu.org>
346         PR fortran/99853
347         * resolve.c (resolve_select): Generate regular gfc_error on
348         invalid conversions instead of an gfc_internal_error.
350 2021-10-29  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
352         * symbol.c (free_tb_tree): Free type-bound procedure struct.
353         (gfc_get_typebound_proc): Use explicit memcpy for clarity.
355 2021-10-27  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
357         * intrinsic.h (gfc_check_sum, gfc_resolve_atan2d, gfc_resolve_kill,
358         gfc_resolve_kill_sub): Delete declaration.
360 2021-10-27  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
362         * trans-types.h (gfc_convert_function_code): Delete.
364 2021-10-27  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
366         * trans-stmt.h (gfc_trans_deallocate_array): Delete.
368 2021-10-27  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
370         * trans-array.c (gfc_trans_scalarized_loop_end): Make static.
371         * trans-array.h (gfc_trans_scalarized_loop_end,
372         gfc_conv_tmp_ref, gfc_conv_array_transpose): Delete declaration.
374 2021-10-27  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
376         * constructor.c (gfc_constructor_get_base): Make static.
377         (gfc_constructor_expr_foreach, gfc_constructor_swap): Delete.
378         * constructor.h (gfc_constructor_get_base): Remove declaration.
379         (gfc_constructor_expr_foreach, gfc_constructor_swap): Delete.
381 2021-10-27  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
383         * decl.c (gfc_match_old_kind_spec, set_com_block_bind_c,
384         set_verify_bind_c_sym, set_verify_bind_c_com_block,
385         get_bind_c_idents, gfc_match_suffix, gfc_get_type_attr_spec,
386         check_extended_derived_type): Make static.
387         (gfc_match_gcc_unroll): Add comment.
388         * match.c (gfc_match_small_int_expr): Delete definition.
389         * match.h (gfc_match_small_int_expr): Delete declaration.
390         (gfc_match_name_C, gfc_match_old_kind_spec, set_com_block_bind_c,
391         set_verify_bind_c_sym, set_verify_bind_c_com_block,
392         get_bind_c_idents, gfc_match_suffix,
393         gfc_get_type_attr_spec): Delete declaration.
395 2021-10-27  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
397         * expr.c (is_non_empty_structure_constructor): Make static.
398         * gfortran.h (gfc_check_any_c_kind): Delete.
399         * match.c (gfc_match_label): Make static.
400         * match.h (gfc_match_label): Delete declaration.
401         * scanner.c (file_changes_cur, file_changes_count,
402         file_changes_allocated): Make static.
403         * trans-expr.c (gfc_get_character_len): Make static.
404         (gfc_class_len_or_zero_get): Make static.
405         (VTAB_GET_FIELD_GEN): Undefine.
406         (gfc_get_class_array_ref): Make static.
407         (gfc_finish_interface_mapping): Make static.
408         * trans-types.c (gfc_check_any_c_kind): Delete.
409         (pfunc_type_node, dtype_type_node, gfc_get_ppc_type): Make static.
410         * trans-types.h (gfc_get_ppc_type): Delete declaration.
411         * trans.c (gfc_msg_wrong_return): Delete.
412         * trans.h (gfc_class_len_or_zero_get, gfc_class_vtab_extends_get,
413         gfc_vptr_extends_get, gfc_get_class_array_ref, gfc_get_character_len,
414         gfc_finish_interface_mapping, gfc_msg_wrong_return,
415         gfc_get_function_decl): Delete declaration.
417 2021-10-27  Tobias Burnus  <tobias@codesourcery.com>
419         * trans-stmt.c (gfc_trans_select_rank_cases): Fix condition
420         for allocatables/pointers.
422 2021-10-26  Harald Anlauf  <anlauf@gmx.de>
424         PR fortran/102956
425         * symbol.c (gfc_check_conflict): Add conflict check for PDT KIND
426         and LEN type parameters.
428 2021-10-26  Harald Anlauf  <anlauf@gmx.de>
430         PR fortran/102917
431         * decl.c (match_attr_spec): Remove invalid integer kind checks on
432         KIND and LEN attributes of PDTs.
434 2021-10-26  Harald Anlauf  <anlauf@gmx.de>
436         PR fortran/102816
437         * resolve.c (resolve_structure_cons): Reject invalid array spec of
438         a DT component referenced in a structure constructor.
440 2021-10-26  Tobias Burnus  <tobias@codesourcery.com>
442         PR fortran/102885
443         * trans-decl.c (gfc_conv_cfi_to_gfc): Properly handle nonconstant
444         character lenghts.
446 2021-10-25  Andrew MacLeod  <amacleod@redhat.com>
448         * trans-decl.c (gfc_conv_cfi_to_gfc): Initialize rank to NULL_TREE.
450 2021-10-22  Eric Gallager  <egallager@gcc.gnu.org>
452         PR other/102663
453         * Make-lang.in: Allow dvi-formatted documentation
454         to be installed.
456 2021-10-22  Tobias Burnus  <tobias@codesourcery.com>
458         PR fortran/92621
459         * trans-expr.c (gfc_trans_assignment_1): Add STRIP_NOPS.
461 2021-10-21  Chung-Lin Tang  <cltang@codesourcery.com>
463         * decl.c (gfc_match_end): Add COMP_OMP_STRICTLY_STRUCTURED_BLOCK case
464         together with COMP_BLOCK.
465         * parse.c (parse_omp_structured_block): Change return type to
466         'gfc_statement', add handling for strictly-structured block case, adjust
467         recursive calls to parse_omp_structured_block.
468         (parse_executable): Adjust calls to parse_omp_structured_block.
469         * parse.h (enum gfc_compile_state): Add
470         COMP_OMP_STRICTLY_STRUCTURED_BLOCK.
471         * trans-openmp.c (gfc_trans_omp_workshare): Add EXEC_BLOCK case
472         handling.
474 2021-10-21  Sandra Loosemore  <sandra@codesourcery.com>
476         PR fortran/94070
477         * expr.c (gfc_simplify_expr): Handle GFC_ISYM_SHAPE along with
478         GFC_ISYM_LBOUND and GFC_ISYM_UBOUND.
479         * trans-array.c (gfc_conv_ss_startstride): Likewise.
480         (set_loop_bounds): Likewise.
481         * trans-intrinsic.c (gfc_trans_intrinsic_bound): Extend to
482         handle SHAPE.  Correct logic for zero-size special cases and
483         detecting assumed-rank arrays associated with an assumed-size
484         argument.
485         (gfc_conv_intrinsic_shape): Deleted.
486         (gfc_conv_intrinsic_function): Handle GFC_ISYM_SHAPE like
487         GFC_ISYM_LBOUND and GFC_ISYM_UBOUND.
488         (gfc_add_intrinsic_ss_code): Likewise.
489         (gfc_walk_intrinsic_bound): Likewise.
491 2021-10-20  Chung-Lin Tang  <cltang@codesourcery.com>
493         * openmp.c (gfc_match_omp_clause_reduction): Add 'openmp_target' default
494         false parameter. Add 'always,tofrom' map for OMP_LIST_IN_REDUCTION case.
495         (gfc_match_omp_clauses): Add 'openmp_target' default false parameter,
496         adjust call to gfc_match_omp_clause_reduction.
497         (match_omp): Adjust call to gfc_match_omp_clauses
498         * trans-openmp.c (gfc_trans_omp_taskgroup): Add call to
499         gfc_match_omp_clause, create and return block.
501 2021-10-19  Tobias Burnus  <tobias@codesourcery.com>
503         * trans-types.c (create_fn_spec): For allocatable/pointer
504         character(len=:), use 'w' not 'R' as fn spec for the length dummy
505         argument.
507 2021-10-19  Tobias Burnus  <tobias@codesourcery.com>
509         PR fortran/92482
510         * trans-expr.c (gfc_conv_procedure_call): Use TREE_OPERAND not
511         build_fold_indirect_ref_loc to undo an ADDR_EXPR.
513 2021-10-18  Tobias Burnus  <tobias@codesourcery.com>
515         PR fortran/102086
516         PR fortran/92189
517         PR fortran/92621
518         PR fortran/101308
519         PR fortran/101309
520         PR fortran/101635
521         PR fortran/92482
522         * decl.c (gfc_verify_c_interop_param): Remove 'sorry' for
523         scalar allocatable/pointer and len=*.
524         * expr.c (is_CFI_desc): Return true for for those.
525         * gfortran.h (CFI_type_kind_shift, CFI_type_mask,
526         CFI_type_from_type_kind, CFI_VERSION, CFI_MAX_RANK,
527         CFI_attribute_pointer, CFI_attribute_allocatable,
528         CFI_attribute_other, CFI_type_Integer, CFI_type_Logical,
529         CFI_type_Real, CFI_type_Complex, CFI_type_Character,
530         CFI_type_ucs4_char, CFI_type_struct, CFI_type_cptr,
531         CFI_type_cfunptr, CFI_type_other): New #define.
532         * trans-array.c (CFI_FIELD_BASE_ADDR, CFI_FIELD_ELEM_LEN,
533         CFI_FIELD_VERSION, CFI_FIELD_RANK, CFI_FIELD_ATTRIBUTE,
534         CFI_FIELD_TYPE, CFI_FIELD_DIM, CFI_DIM_FIELD_LOWER_BOUND,
535         CFI_DIM_FIELD_EXTENT, CFI_DIM_FIELD_SM,
536         gfc_get_cfi_descriptor_field, gfc_get_cfi_desc_base_addr,
537         gfc_get_cfi_desc_elem_len, gfc_get_cfi_desc_version,
538         gfc_get_cfi_desc_rank, gfc_get_cfi_desc_type,
539         gfc_get_cfi_desc_attribute, gfc_get_cfi_dim_item,
540         gfc_get_cfi_dim_lbound, gfc_get_cfi_dim_extent, gfc_get_cfi_dim_sm):
541         New define/functions to access the CFI array descriptor.
542         (gfc_conv_descriptor_type): New function for the GFC descriptor.
543         (gfc_get_array_span): Handle expr of CFI descriptors and
544         assumed-type descriptors.
545         (gfc_trans_array_bounds): Remove 'static'.
546         (gfc_conv_expr_descriptor): For assumed type, use the dtype of
547         the actual argument.
548         (structure_alloc_comps): Remove ' ' inside tabs.
549         * trans-array.h (gfc_trans_array_bounds, gfc_conv_descriptor_type,
550         gfc_get_cfi_desc_base_addr, gfc_get_cfi_desc_elem_len,
551         gfc_get_cfi_desc_version, gfc_get_cfi_desc_rank,
552         gfc_get_cfi_desc_type, gfc_get_cfi_desc_attribute,
553         gfc_get_cfi_dim_lbound, gfc_get_cfi_dim_extent, gfc_get_cfi_dim_sm):
554         New prototypes.
555         * trans-decl.c (gfor_fndecl_cfi_to_gfc, gfor_fndecl_gfc_to_cfi):
556         Remove global vars.
557         (gfc_build_builtin_function_decls): Remove their initialization.
558         (gfc_get_symbol_decl, create_function_arglist,
559         gfc_trans_deferred_vars): Update for CFI.
560         (convert_CFI_desc): Remove and replace by ...
561         (gfc_conv_cfi_to_gfc): ... this function
562         (gfc_generate_function_code): Call it; create local GFC var for CFI.
563         * trans-expr.c (gfc_maybe_dereference_var): Handle CFI.
564         (gfc_conv_subref_array_arg): Handle the if-noncontigous-only copy in
565         when the result should be a descriptor.
566         (gfc_conv_gfc_desc_to_cfi_desc): Completely rewritten.
567         (gfc_conv_procedure_call): CFI fixes.
568         * trans-openmp.c (gfc_omp_is_optional_argument,
569         gfc_omp_check_optional_argument): Handle optional
570         CFI.
571         * trans-stmt.c (gfc_trans_select_rank_cases): Cleanup, avoid invalid
572         code for allocatable/pointer dummies, which cannot be assumed size.
573         * trans-types.c (gfc_cfi_descriptor_base): New global var.
574         (gfc_get_dtype_rank_type): Skip rank init for rank < 0.
575         (gfc_sym_type): Handle CFI dummies.
576         (gfc_get_function_type): Update call.
577         (gfc_get_cfi_dim_type, gfc_get_cfi_type): New.
578         * trans-types.h (gfc_sym_type): Update prototype.
579         (gfc_get_cfi_type): New prototype.
580         * trans.c (gfc_trans_runtime_check): Make conditions more consistent
581         to avoid '<logical> AND_THEN <long int>' in conditions.
582         * trans.h (gfor_fndecl_cfi_to_gfc, gfor_fndecl_gfc_to_cfi): Remove
583         global-var declaration.
585 2021-10-18  Tobias Burnus  <tobias@codesourcery.com>
587         PR fortran/102745
588         * intrinsic.c (gfc_convert_type_warn): Fix checks by checking CLASS
589         and do typcheck in correct order for type extension.
590         * misc.c (gfc_typename): Print proper not internal CLASS type name.
592 2021-10-15  Harald Anlauf  <anlauf@gmx.de>
593             Tobias Burnus  <tobias@codesourcery.com>
595         PR fortran/102685
596         * decl.c (match_clist_expr): Set rank/shape of clist initializer
597         to match LHS.
598         * resolve.c (resolve_structure_cons): In a structure constructor,
599         compare shapes of array components against declared shape.
601 2021-10-14  Harald Anlauf  <anlauf@gmx.de>
603         PR fortran/102717
604         * simplify.c (gfc_simplify_reshape): Replace assert by error
605         message for negative elements in SHAPE array.
607 2021-10-14  Harald Anlauf  <anlauf@gmx.de>
609         PR fortran/102716
610         * check.c (gfc_check_shape): Reorder checks so that invalid KIND
611         arguments can be detected.
613 2021-10-14  Kwok Cheung Yeung  <kcy@codesourcery.com>
615         * gfortran.h (enum gfc_statement): Add ST_OMP_DECLARE_VARIANT.
616         (enum gfc_omp_trait_property_kind): New.
617         (struct gfc_omp_trait_property): New.
618         (gfc_get_omp_trait_property): New macro.
619         (struct gfc_omp_selector): New.
620         (gfc_get_omp_selector): New macro.
621         (struct gfc_omp_set_selector): New.
622         (gfc_get_omp_set_selector): New macro.
623         (struct gfc_omp_declare_variant): New.
624         (gfc_get_omp_declare_variant): New macro.
625         (struct gfc_namespace): Add omp_declare_variant field.
626         (gfc_free_omp_declare_variant_list): New prototype.
627         * match.h (gfc_match_omp_declare_variant): New prototype.
628         * openmp.c (gfc_free_omp_trait_property_list): New.
629         (gfc_free_omp_selector_list): New.
630         (gfc_free_omp_set_selector_list): New.
631         (gfc_free_omp_declare_variant_list): New.
632         (gfc_match_omp_clauses): Add extra optional argument.  Handle end of
633         clauses for context selectors.
634         (omp_construct_selectors, omp_device_selectors,
635         omp_implementation_selectors, omp_user_selectors): New.
636         (gfc_match_omp_context_selector): New.
637         (gfc_match_omp_context_selector_specification): New.
638         (gfc_match_omp_declare_variant): New.
639         * parse.c: Include tree-core.h and omp-general.h.
640         (decode_omp_directive): Handle 'declare variant'.
641         (case_omp_decl): Include ST_OMP_DECLARE_VARIANT.
642         (gfc_ascii_statement): Handle ST_OMP_DECLARE_VARIANT.
643         (gfc_parse_file): Initialize omp_requires_mask.
644         * symbol.c (gfc_free_namespace): Call
645         gfc_free_omp_declare_variant_list.
646         * trans-decl.c (gfc_get_extern_function_decl): Call
647         gfc_trans_omp_declare_variant.
648         (gfc_create_function_decl): Call gfc_trans_omp_declare_variant.
649         * trans-openmp.c (gfc_trans_omp_declare_variant): New.
650         * trans-stmt.h (gfc_trans_omp_declare_variant): New prototype.
652 2021-10-13  Tobias Burnus  <tobias@codesourcery.com>
654         * dump-parse-tree.c (show_omp_clauses): Handle ancestor modifier,
655         avoid ICE for GFC_OMP_ATOMIC_SWAP.
656         * gfortran.h (gfc_omp_clauses): Change 'anecestor' into a bitfield.
658 2021-10-12  Tobias Burnus  <tobias@codesourcery.com>
660         PR fortran/102541
661         * check.c (gfc_check_present): Handle optional CLASS.
662         * interface.c (gfc_compare_actual_formal): Likewise.
663         * trans-array.c (gfc_trans_g77_array): Likewise.
664         * trans-decl.c (gfc_build_dummy_array_decl): Likewise.
665         * trans-types.c (gfc_sym_type): Likewise.
666         * primary.c (gfc_variable_attr): Fixes for dummy and
667         pointer when 'class%_data' is passed.
668         * trans-expr.c (set_dtype_for_unallocated, gfc_conv_procedure_call):
669         For assumed-rank dummy, fix setting rank for dealloc/notassoc actual
670         and setting ubound to -1 for assumed-size actuals.
672 2021-10-10  Harald Anlauf  <anlauf@gmx.de>
674         PR fortran/99348
675         PR fortran/102521
676         * decl.c (add_init_expr_to_sym): Extend initialization of
677         parameter arrays from scalars to handle derived types.
679 2021-10-09  Harald Anlauf  <anlauf@gmx.de>
681         PR fortran/65454
682         * module.c (read_module): Handle old and new-style relational
683         operators when used in USE module, ONLY: OPERATOR(op).
685 2021-10-08  Sandra Loosemore  <sandra@codesourcery.com>
687         PR fortran/54753
688         * interface.c (gfc_compare_actual_formal): Add diagnostic
689         for F2018:C839.  Refactor shared code and fix bugs with class
690         array info lookup, and extend similar diagnostic from PR94110
691         to also cover class types.
693 2021-10-08  Martin Liska  <mliska@suse.cz>
695         * options.c (gfc_post_options): Use new macro
696         OPTION_SET_P.
698 2021-10-06  Tobias Burnus  <tobias@codesourcery.com>
700         * resolve.c (resolve_values): Only show
701         deprecated warning if attr.referenced.
703 2021-10-04  Tobias Burnus  <tobias@codesourcery.com>
705         PR fortran/54753
706         * resolve.c (can_generate_init, resolve_fl_variable_derived,
707         resolve_symbol): Only do initialization with intent(out) if not
708         inside of an interface block.
710 2021-10-01  Martin Sebor  <msebor@redhat.com>
712         PR c/102103
713         * array.c: Remove an unnecessary test.
714         * trans-array.c: Same.
716 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
718         * gfortran.h (gfc_omp_clauses): Add order_reproducible bitfield.
719         * dump-parse-tree.c (show_omp_clauses): Print REPRODUCIBLE: for it.
720         * openmp.c (gfc_match_omp_clauses): Set order_reproducible for
721         explicit reproducible: modifier.
722         * trans-openmp.c (gfc_trans_omp_clauses): Set
723         OMP_CLAUSE_ORDER_REPRODUCIBLE for order_reproducible.
724         (gfc_split_omp_clauses): Also copy order_reproducible.
726 2021-09-30  Harald Anlauf  <anlauf@gmx.de>
728         PR fortran/102458
729         * simplify.c (simplify_size): Resolve expressions used in array
730         specifications so that SIZE can be simplified.
732 2021-09-30  Harald Anlauf  <anlauf@gmx.de>
734         * expr.c: The correct reference to Fortran standard is: F2018:10.1.12.
736 2021-09-30  Tobias Burnus  <tobias@codesourcery.com>
738         PR fortran/71703
739         PR fortran/84007
740         * trans-intrinsic.c (gfc_conv_same_type_as): Fix handling
741         of UNLIMITED_POLY.
742         * trans.h (gfc_vtpr_hash_get): Renamed prototype to ...
743         (gfc_vptr_hash_get): ... this to match function name.
745 2021-09-29  Harald Anlauf  <anlauf@gmx.de>
747         PR fortran/102520
748         * array.c (expand_constructor): Do not dereference NULL pointer.
750 2021-09-27  Tobias Burnus  <tobias@codesourcery.com>
752         PR fortran/94070
753         * trans-array.c (gfc_tree_array_size): New function to
754         find size inline (whole array or one dimension).
755         (array_parameter_size): Use it, take stmt_block as arg.
756         (gfc_conv_array_parameter): Update call.
757         * trans-array.h (gfc_tree_array_size): Add prototype.
758         * trans-decl.c (gfor_fndecl_size0, gfor_fndecl_size1): Remove
759         these global vars.
760         (gfc_build_intrinsic_function_decls): Remove their initialization.
761         * trans-expr.c (gfc_conv_procedure_call): Update
762         bounds of pointer/allocatable actual args to nonallocatable/nonpointer
763         dummies to be one based.
764         * trans-intrinsic.c (gfc_conv_intrinsic_shape): Fix case for
765         assumed rank with allocatable/pointer dummy.
766         (gfc_conv_intrinsic_size): Update to use inline function.
767         * trans.h (gfor_fndecl_size0, gfor_fndecl_size1): Remove var decl.
769 2021-09-26  Tobias Burnus  <tobias@codesourcery.com>
771         PR fortran/101334
772         * trans-intrinsic.c (gfc_conv_associated): Support assumed-rank
773         'pointer' with scalar/array 'target' argument.
775 2021-09-24  Harald Anlauf  <anlauf@gmx.de>
777         PR fortran/102458
778         * expr.c (is_non_constant_intrinsic): Check for intrinsics
779         excluded in constant expressions (F2018:10.1.2).
780         (gfc_is_constant_expr): Use that check.
782 2021-09-24  Sandra Loosemore  <sandra@codesourcery.com>
784         PR fortran/101333
785         * interface.c (compare_parameter): Enforce F2018 C711.
787 2021-09-24  Tobias Burnus  <tobias@codesourcery.com>
789         PR fortran/55534
790         * scanner.c (load_file): Return void, call (gfc_)fatal_error for
791         all errors.
792         (include_line, include_stmt, gfc_new_file): Remove exit call
793         for failed load_file run.
795 2021-09-23  Sandra Loosemore  <sandra@codesourcery.com>
797         PR fortran/101320
798         * decl.c (gfc_verify_c_interop_param): Handle F2018 C1557,
799         aka TS29113 C516.
801 2021-09-23  Harald Anlauf  <anlauf@gmx.de>
802             Tobias Burnus  <tobias@codesourcery.com>
804         PR fortran/93834
805         * trans-intrinsic.c (gfc_conv_allocated): Cleanup. Handle
806         coindexed scalar coarrays.
808 2021-09-23  Sandra Loosemore  <sandra@codesourcery.com>
810         PR fortran/101319
811         * interface.c (gfc_compare_actual_formal): Extend existing
812         assumed-type diagnostic to also check for argument with type
813         parameters.
815 2021-09-23  Sandra Loosemore  <sandra@codesourcery.com>
817         PR fortran/101334
818         * check.c (gfc_check_associated): Allow an assumed-rank
819         array for the pointer argument.
820         * interface.c (compare_parameter): Also give rank mismatch
821         error on assumed-rank array.
823 2021-09-23  Sandra Loosemore  <sandra@codesourcery.com>
825         * trans-stmt.c (trans_associate_var): Check that result of
826         GFC_DECL_SAVED_DESCRIPTOR is not null before using it.
828 2021-09-22  Tobias Burnus  <tobias@codesourcery.com>
830         PR fortran/55534
831         * cpp.c (gfc_cpp_register_include_paths, gfc_cpp_post_options):
832         Add new bool verbose_missing_dir_warn argument.
833         * cpp.h (gfc_cpp_post_options): Update prototype.
834         * f95-lang.c (gfc_init): Remove duplicated file-not found diag.
835         * gfortran.h (gfc_check_include_dirs): Takes bool
836         verbose_missing_dir_warn arg.
837         (gfc_new_file): Returns now void.
838         * options.c (gfc_post_options): Update to warn for -I and -J,
839         only, by default but for all when user requested.
840         * scanner.c (gfc_do_check_include_dir):
841         (gfc_do_check_include_dirs, gfc_check_include_dirs): Take bool
842         verbose warn arg and update to avoid printing the same message
843         twice or never.
844         (load_file): Fix indent.
845         (gfc_new_file): Return void and exit when load_file failed
846         as all other load_file users do.
848 2021-09-22  Tobias Burnus  <tobias@codesourcery.com>
850         * trans-expr.c (gfc_simple_for_loop): New.
851         * trans.h (gfc_simple_for_loop): New prototype.
853 2021-09-21  Tobias Burnus  <tobias@codesourcery.com>
855         PR fortran/55534
856         * cpp.c: Define GCC_C_COMMON_C for #include "options.h" to make
857         cpp_reason_option_codes available.
858         (gfc_cpp_register_include_paths): Make static, set pfile's
859         warn_missing_include_dirs and move before caller.
860         (gfc_cpp_init_cb): New, cb code moved from ...
861         (gfc_cpp_init_0): ... here.
862         (gfc_cpp_post_options): Call gfc_cpp_init_cb.
863         (cb_cpp_diagnostic_cpp_option): New. As implemented in c-family
864         to match CppReason flags to -W... names.
865         (cb_cpp_diagnostic): Use it to replace single special case.
866         * cpp.h (gfc_cpp_register_include_paths): Remove as now static.
867         * gfortran.h (gfc_check_include_dirs): New prototype.
868         (gfc_add_include_path): Add new bool arg.
869         * options.c (gfc_init_options): Don't set -Wmissing-include-dirs.
870         (gfc_post_options): Set it here after commandline processing. Call
871         gfc_add_include_path with defer_warn=false.
872         (gfc_handle_option): Call it with defer_warn=true.
873         * scanner.c (gfc_do_check_include_dir, gfc_do_check_include_dirs,
874         gfc_check_include_dirs): New. Diagnostic moved from ...
875         (add_path_to_list): ... here, which came before cmdline processing.
876         Take additional bool defer_warn argument.
877         (gfc_add_include_path): Take additional defer_warn arg.
878         * scanner.h (struct gfc_directorylist): Reorder for alignment issues,
879         add new 'bool warn'.
881 2021-09-20  Tobias Burnus  <tobias@codesourcery.com>
883         * gfortran.h (gfc_omp_clauses): Add order_unconstrained.
884         * dump-parse-tree.c (show_omp_clauses): Dump it.
885         * openmp.c (gfc_match_omp_clauses): Match unconstrained/reproducible
886         modifiers to ordered(concurrent).
887         (OMP_DISTRIBUTE_CLAUSES): Accept ordered clause.
888         (resolve_omp_clauses): Reject ordered + order on same directive.
889         * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses): Pass
890         on unconstrained modifier of ordered(concurrent).
892 2021-09-17  Harald Anlauf  <anlauf@gmx.de>
894         PR fortran/102366
895         * trans-decl.c (gfc_finish_var_decl): Disable the warning message
896         for variables moved from stack to static storange if they are
897         declared in the main, but allow the move to happen.
899 2021-09-17  Sandra Loosemore  <sandra@codesourcery.com>
901         * intrinsic.texi (ISO_C_BINDING): Change C_FLOAT128 to correspond
902         to _Float128 rather than __float128.
903         * iso-c-binding.def (c_float128): Update comments.
904         * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Likewise.
905         (build_round_expr): Likewise.
906         (gfc_build_intrinsic_lib_fndcecls): Likewise.
907         * trans-types.h (gfc_real16_is_float128): Likewise.
909 2021-09-16  Harald Anlauf  <anlauf@gmx.de>
911         PR fortran/102287
912         * trans-expr.c (gfc_conv_procedure_call): Wrap deallocation of
913         allocatable components of optional allocatable derived type
914         procedure arguments with INTENT(OUT) into a presence check.
916 2021-09-14  Harald Anlauf  <anlauf@gmx.de>
918         PR fortran/102311
919         * resolve.c (resolve_entries): Attempt to recover cleanly after
920         rejecting mismatched function entries.
922 2021-09-14  Tobias Burnus  <tobias@codesourcery.com>
924         PR fortran/102313
925         * parse.c (gfc_ascii_statement): Add missing ST_OMP_END_SCOPE.
927 2021-09-13  Harald Anlauf  <anlauf@gmx.de>
929         PR fortran/82314
930         * decl.c (add_init_expr_to_sym): For proper initialization of
931         array-valued named constants the array bounds need to be
932         simplified before adding the initializer.
934 2021-09-13  Harald Anlauf  <anlauf@gmx.de>
936         PR fortran/85130
937         * expr.c (find_substring_ref): Handle given substring start and
938         end indices as signed integers, not unsigned.
940 2021-09-09  Harald Anlauf  <anlauf@gmx.de>
942         PR fortran/98490
943         * trans-expr.c (gfc_conv_substring): Do not generate substring
944         bounds check for implied do loop index variable before it actually
945         becomes defined.
947 2021-09-08  liuhongt  <hongtao.liu@intel.com>
949         * options.c (gfc_post_options): Issue an error for
950         -fexcess-precision=16.
952 2021-09-07  Harald Anlauf  <anlauf@gmx.de>
954         PR fortran/101327
955         * expr.c (find_array_element): When bounds cannot be determined as
956         constant, return error instead of aborting.
958 2021-09-07  Marcel Vollweiler  <marcel@codesourcery.com>
960         * openmp.c (gfc_match_omp_flush): Parse 'seq_cst' clause on 'flush'
961         directive.
962         * trans-openmp.c (gfc_trans_omp_flush): Handle OMP_MEMORDER_SEQ_CST.
964 2021-09-03  Tobias Burnus  <tobias@codesourcery.com>
966         * decl.c (gfc_verify_c_interop_param): Reject pointer with
967         CONTIGUOUS attributes as dummy arg. Reject character len > 1
968         when passed as byte stream.
970 2021-09-01  Harald Anlauf  <anlauf@gmx.de>
972         PR fortran/56985
973         * resolve.c (resolve_common_vars): Fix grammar and improve wording
974         of error message rejecting an unlimited polymorphic in COMMON.
976 2021-08-31  Harald Anlauf  <anlauf@gmx.de>
978         PR fortran/100950
979         * simplify.c (substring_has_constant_len): Minimize checks for
980         substring expressions being allowed.
982 2021-08-31  Marcel Vollweiler  <marcel@codesourcery.com>
984         * gfortran.h: Add variable for 'ancestor' in struct gfc_omp_clauses.
985         * openmp.c (gfc_match_omp_clauses): Parse device-modifiers 'device_num'
986         and 'ancestor' in 'target device' clauses.
987         * trans-openmp.c (gfc_trans_omp_clauses): Set OMP_CLAUSE_DEVICE_ANCESTOR.
989 2021-08-30  Harald Anlauf  <anlauf@gmx.de>
991         PR fortran/102113
992         * match.c (gfc_match_goto): Allow for whitespace in parsing list
993         of labels.
995 2021-08-30  Harald Anlauf  <anlauf@gmx.de>
997         PR fortran/101349
998         * resolve.c (resolve_allocate_expr): An unlimited polymorphic
999         argument to ALLOCATE must be ALLOCATABLE or a POINTER.  Fix the
1000         corresponding check.
1002 2021-08-28  Harald Anlauf  <anlauf@gmx.de>
1004         PR fortran/87737
1005         * resolve.c (resolve_entries): For functions of type CHARACTER
1006         tighten the checks for matching characteristics.
1008 2021-08-25  Lewis Hyatt  <lhyatt@gmail.com>
1010         PR other/93067
1011         * cpp.c (gfc_cpp_post_options): Call new function
1012         diagnostic_initialize_input_context().
1014 2021-08-24  Harald Anlauf  <anlauf@gmx.de>
1016         PR fortran/98411
1017         * trans-decl.c (gfc_finish_var_decl): Adjust check to handle
1018         implicit SAVE as well as variables in the main program.  Improve
1019         warning message text.
1021 2021-08-23  Tobias Burnus  <tobias@codesourcery.com>
1023         * openmp.c (gfc_match_dupl_check, gfc_match_dupl_memorder,
1024         gfc_match_dupl_atomic): New.
1025         (gfc_match_omp_clauses): Use them; remove duplicate
1026         'release'/'relaxed' clause matching; improve error dignostic
1027         for 'default'.
1029 2021-08-23  Tobias Burnus  <tobias@codesourcery.com>
1031         * dump-parse-tree.c (show_omp_clauses): Handle 'strict' modifier
1032         on grainsize/num_tasks
1033         * gfortran.h (gfc_omp_clauses): Add grainsize_strict
1034         and num_tasks_strict.
1035         * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses):
1036         Handle 'strict' modifier on grainsize/num_tasks.
1037         * openmp.c (gfc_match_omp_clauses): Likewise.
1039 2021-08-20  Tobias Burnus  <tobias@codesourcery.com>
1041         * error.c
1042         (error_uinteger): Take 'long long unsigned' instead
1043         of 'long unsigned' as argumpent.
1044         (error_integer): Take 'long long' instead of 'long'.
1045         (error_hwuint, error_hwint): New.
1046         (error_print): Update to handle 'll' and 'w'
1047         length modifiers.
1048         * simplify.c (substring_has_constant_len): Use '%wd'
1049         in gfc_error.
1051 2021-08-20  Harald Anlauf  <anlauf@gmx.de>
1053         PR fortran/100950
1054         * simplify.c (substring_has_constant_len): Fix format string of
1055         gfc_error, pass HOST_WIDE_INT bounds values via char buffer.
1057 2021-08-20  Tobias Burnus  <tobias@codesourcery.com>
1059         * dump-parse-tree.c (show_omp_clauses): Handle 'at', 'severity'
1060         and 'message' clauses.
1061         (show_omp_node, show_code_node): Handle EXEC_OMP_ERROR.
1062         * gfortran.h (gfc_statement): Add ST_OMP_ERROR.
1063         (gfc_omp_severity_type, gfc_omp_at_type): New.
1064         (gfc_omp_clauses): Add 'at', 'severity' and 'message' clause;
1065         use more bitfields + ENUM_BITFIELD.
1066         (gfc_exec_op): Add EXEC_OMP_ERROR.
1067         * match.h (gfc_match_omp_error): New.
1068         * openmp.c (enum omp_mask1): Add OMP_CLAUSE_(AT,SEVERITY,MESSAGE).
1069         (gfc_match_omp_clauses): Handle new clauses.
1070         (OMP_ERROR_CLAUSES, gfc_match_omp_error): New.
1071         (resolve_omp_clauses): Resolve new clauses.
1072         (omp_code_to_statement, gfc_resolve_omp_directive): Handle
1073         EXEC_OMP_ERROR.
1074         * parse.c (decode_omp_directive, next_statement,
1075         gfc_ascii_statement): Handle 'omp error'.
1076         * resolve.c (gfc_resolve_blocks): Likewise.
1077         * st.c (gfc_free_statement): Likewise.
1078         * trans-openmp.c (gfc_trans_omp_error): Likewise.
1079         (gfc_trans_omp_directive): Likewise.
1080         * trans.c (trans_code): Likewise.
1082 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
1084         * types.def (BT_FN_VOID_CONST_PTR_SIZE): New DEF_FUNCTION_TYPE_2.
1085         * f95-lang.c (ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST): Define.
1087 2021-08-19  Harald Anlauf  <anlauf@gmx.de>
1089         PR fortran/100950
1090         * simplify.c (substring_has_constant_len): New.
1091         (gfc_simplify_len): Handle case of substrings with constant
1092         bounds.
1094 2021-08-18  Tobias Burnus  <tobias@codesourcery.com>
1096         * match.h (gfc_match_omp_nothing): New.
1097         * openmp.c (gfc_match_omp_nothing): New.
1098         * parse.c (decode_omp_directive): Match 'nothing' directive.
1100 2021-08-17  Tobias Burnus  <tobias@codesourcery.com>
1102         * dump-parse-tree.c (show_omp_node, show_code_node): Handle
1103         EXEC_OMP_SCOPE.
1104         * gfortran.h (enum gfc_statement): Add ST_OMP_(END_)SCOPE.
1105         (enum gfc_exec_op): Add EXEC_OMP_SCOPE.
1106         * match.h (gfc_match_omp_scope): New.
1107         * openmp.c (OMP_SCOPE_CLAUSES): Define
1108         (gfc_match_omp_scope): New.
1109         (gfc_match_omp_cancellation_point, gfc_match_omp_end_nowait):
1110         Improve error diagnostic.
1111         (omp_code_to_statement): Handle ST_OMP_SCOPE.
1112         (gfc_resolve_omp_directive): Handle EXEC_OMP_SCOPE.
1113         * parse.c (decode_omp_directive, next_statement,
1114         gfc_ascii_statement, parse_omp_structured_block,
1115         parse_executable): Handle OpenMP's scope construct.
1116         * resolve.c (gfc_resolve_blocks): Likewise
1117         * st.c (gfc_free_statement): Likewise
1118         * trans-openmp.c (gfc_trans_omp_scope): New.
1119         (gfc_trans_omp_directive): Call it.
1120         * trans.c (trans_code): handle EXEC_OMP_SCOPE.
1122 2021-08-16  Tobias Burnus  <tobias@codesourcery.com>
1124         * dump-parse-tree.c (show_omp_clauses): Handle 'filter' clause.
1125         (show_omp_node, show_code_node): Handle (combined) omp masked construct.
1126         * frontend-passes.c (gfc_code_walker): Likewise.
1127         * gfortran.h (enum gfc_statement): Add ST_OMP_*_MASKED*.
1128         (enum gfc_exec_op): Add EXEC_OMP_*_MASKED*.
1129         * match.h (gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
1130         gfc_match_omp_masked_taskloop_simd, gfc_match_omp_parallel_masked,
1131         gfc_match_omp_parallel_masked_taskloop,
1132         gfc_match_omp_parallel_masked_taskloop_simd): New prototypes.
1133         * openmp.c (enum omp_mask1): Add OMP_CLAUSE_FILTER.
1134         (gfc_match_omp_clauses): Match it.
1135         (OMP_MASKED_CLAUSES, gfc_match_omp_parallel_masked,
1136         gfc_match_omp_parallel_masked_taskloop,
1137         gfc_match_omp_parallel_masked_taskloop_simd,
1138         gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
1139         gfc_match_omp_masked_taskloop_simd): New.
1140         (resolve_omp_clauses): Resolve filter clause.
1141         (gfc_resolve_omp_parallel_blocks, resolve_omp_do,
1142         omp_code_to_statement, gfc_resolve_omp_directive): Handle
1143         omp masked constructs.
1144         * parse.c (decode_omp_directive, case_exec_markers,
1145         gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
1146         parse_executable): Likewise.
1147         * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
1148         * st.c (gfc_free_statement): Likewise.
1149         * trans-openmp.c (gfc_trans_omp_clauses): Handle filter clause.
1150         (GFC_OMP_SPLIT_MASKED, GFC_OMP_MASK_MASKED): New enum values.
1151         (gfc_trans_omp_masked): New.
1152         (gfc_split_omp_clauses): Handle combined masked directives.
1153         (gfc_trans_omp_master_taskloop): Rename to ...
1154         (gfc_trans_omp_master_masked_taskloop): ... this; handle also
1155         combined masked directives.
1156         (gfc_trans_omp_parallel_master): Rename to ...
1157         (gfc_trans_omp_parallel_master_masked): ... this; handle
1158         combined masked directives.
1159         (gfc_trans_omp_directive): Handle EXEC_OMP_*_MASKED*.
1160         * trans.c (trans_code): Likewise.
1162 2021-08-15  Harald Anlauf  <anlauf@gmx.de>
1164         PR fortran/99351
1165         * match.c (sync_statement): Replace %v code by %e in gfc_match to
1166         allow for function references as STAT and ERRMSG arguments.
1167         * resolve.c (resolve_sync): Adjust checks of STAT= and ERRMSG= to
1168         being definable arguments.  Function references with a data
1169         pointer result are accepted.
1170         * trans-stmt.c (gfc_trans_sync): Adjust assertion.
1172 2021-08-12  Tobias Burnus  <tobias@codesourcery.com>
1174         * gfortran.h (gfc_omp_proc_bind_kind): Add OMP_PROC_BIND_PRIMARY.
1175         * dump-parse-tree.c (show_omp_clauses): Add TODO comment to
1176         change 'master' to 'primary' in proc_bind for OpenMP 5.1.
1177         * intrinsic.texi (OMP_LIB): Mention OpenMP 5.1; add
1178         omp_proc_bind_primary.
1179         * openmp.c (gfc_match_omp_clauses): Accept
1180         'primary' as alias for 'master'.
1181         * trans-openmp.c (gfc_trans_omp_clauses): Handle
1182         OMP_PROC_BIND_PRIMARY.
1184 2021-08-11  Sandra Loosemore  <sandra@codesourcery.com>
1186         * iso-c-binding.def (c_float128, c_float128_complex): Check
1187         float128_type_node instead of gfc_float128_type_node.
1188         * trans-types.c (gfc_init_kinds, gfc_build_real_type):
1189         Update comments re supported 128-bit floating-point types.
1191 2021-08-11  Richard Biener  <rguenther@suse.de>
1193         * trans-common.c (create_common): Set TREE_THIS_VOLATILE on the
1194         COMPONENT_REF if the field is volatile.
1196 2021-08-07  Harald Anlauf  <anlauf@gmx.de>
1198         PR fortran/68568
1199         * primary.c (gfc_expr_attr): Variable attribute can only be
1200         inquired when symtree is non-NULL.
1202 2021-07-28  Harald Anlauf  <anlauf@gmx.de>
1204         PR fortran/101564
1205         * expr.c (gfc_check_vardef_context): Add check for KIND and LEN
1206         parameter inquiries.
1207         * match.c (gfc_match): Fix comment for %v code.
1208         (gfc_match_allocate, gfc_match_deallocate): Replace use of %v code
1209         by %e in gfc_match to allow for function references as STAT and
1210         ERRMSG arguments.
1211         * resolve.c (resolve_allocate_deallocate): Avoid NULL pointer
1212         dereferences and shortcut for bad STAT and ERRMSG argument to
1213         (DE)ALLOCATE.  Remove bogus parts of checks for STAT and ERRMSG.
1215 2021-07-26  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
1216             Tobias Burnus  <tobias@codesourcery.com>
1218         PR fortran/93308
1219         PR fortran/93963
1220         PR fortran/94327
1221         PR fortran/94331
1222         PR fortran/97046
1223         * trans-decl.c (convert_CFI_desc): Only copy out the descriptor
1224         if necessary.
1225         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Updated attribute
1226         handling which reflect a previous intermediate version of the
1227         standard. Only copy out the descriptor if necessary.
1229 2021-07-23  Harald Anlauf  <anlauf@gmx.de>
1231         PR fortran/101536
1232         * check.c (array_check): Adjust check for the case of CLASS
1233         arrays.
1235 2021-07-21  Thomas Schwinge  <thomas@codesourcery.com>
1236             Joseph Myers  <joseph@codesourcery.com>
1237             Cesar Philippidis  <cesar@codesourcery.com>
1239         * dump-parse-tree.c (show_attr): Update.
1240         * gfortran.h (symbol_attribute): Add 'oacc_routine_nohost' member.
1241         (gfc_omp_clauses): Add 'nohost' member.
1242         * module.c (ab_attribute): Add 'AB_OACC_ROUTINE_NOHOST'.
1243         (attr_bits, mio_symbol_attribute): Update.
1244         * openmp.c (omp_mask2): Add 'OMP_CLAUSE_NOHOST'.
1245         (gfc_match_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1246         (OACC_ROUTINE_CLAUSES): Add 'OMP_CLAUSE_NOHOST'.
1247         (gfc_match_oacc_routine): Update.
1248         * trans-decl.c (add_attributes_to_decl): Update.
1249         * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
1251 2021-07-21  Harald Anlauf  <anlauf@gmx.de>
1253         PR fortran/101514
1254         * target-memory.c (gfc_interpret_derived): Size of array component
1255         of derived type can only be computed here for explicit shape.
1256         * trans-types.c (gfc_get_nodesc_array_type): Do not dereference
1257         NULL pointers.
1259 2021-07-21  Tobias Burnus  <tobias@codesourcery.com>
1261         * decl.c (gfc_verify_c_interop_param): Update for F2008 + F2018
1262         changes; reject unsupported bits with 'Error: Sorry,'.
1263         * trans-expr.c (gfc_conv_procedure_call): Fix condition to
1264         For using CFI descriptor with characters.
1266 2021-07-18  Harald Anlauf  <anlauf@gmx.de>
1268         PR fortran/101084
1269         * io.c (resolve_tag_format): Extend FORMAT check to unknown type.
1271 2021-07-14  Harald Anlauf  <anlauf@gmx.de>
1273         PR fortran/100949
1274         * trans-expr.c (gfc_trans_class_init_assign): Call
1275         gfc_conv_expr_present only for dummy variables.
1277 2021-07-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
1279         PR fortran/100227
1280         * frontend-passes.c (traverse_io_block): Adjust test for
1281         when a variable is eligible for the transformation to
1282         array slice.
1284 2021-06-28  Martin Sebor  <msebor@redhat.com>
1286         * trans-array.c (trans_array_constructor): Replace direct uses
1287         of TREE_NO_WARNING with warning_suppressed_p, and suppress_warning.
1288         * trans-decl.c (gfc_build_qualified_array): Same.
1289         (gfc_build_dummy_array_decl): Same.
1290         (generate_local_decl): Same.
1291         (gfc_generate_function_code): Same.
1292         * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
1293         (gfc_omp_clause_copy_ctor): Same.
1294         * trans-types.c (get_dtype_type_node): Same.
1295         (gfc_get_desc_dim_type): Same.
1296         (gfc_get_array_descriptor_base): Same.
1297         (gfc_get_caf_vector_type): Same.
1298         (gfc_get_caf_reference_type): Same.
1299         * trans.c (gfc_create_var_np): Same.
1301 2021-06-23  Tobias Burnus  <tobias@codesourcery.com>
1303         * dump-parse-tree.c (show_omp_clauses): Fix enum type used
1304         for dumping gfc_omp_defaultmap_category.
1306 2021-06-23  Andre Vehreschild  <vehre@gcc.gnu.org>
1308         PR fortran/100337
1309         * trans-intrinsic.c (conv_co_collective): Check stat for null ptr
1310         before dereferrencing.
1312 2021-06-18  Harald Anlauf  <anlauf@gmx.de>
1314         PR fortran/100283
1315         PR fortran/101123
1316         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Unconditionally
1317         convert result of min/max to result type.
1319 2021-06-16  Harald Anlauf  <anlauf@gmx.de>
1321         PR fortran/95501
1322         PR fortran/95502
1323         * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
1324         dereference.
1325         * match.c (gfc_match_pointer_assignment): Likewise.
1326         * parse.c (gfc_check_do_variable): Avoid comparison with NULL
1327         symtree.
1329 2021-06-16  Harald Anlauf  <anlauf@gmx.de>
1331         Revert:
1332         2021-06-16  Harald Anlauf  <anlauf@gmx.de>
1334         PR fortran/95501
1335         PR fortran/95502
1336         * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
1337         dereference.
1338         * match.c (gfc_match_pointer_assignment): Likewise.
1339         * parse.c (gfc_check_do_variable): Avoid comparison with NULL
1340         symtree.
1342 2021-06-16  Harald Anlauf  <anlauf@gmx.de>
1344         PR fortran/95501
1345         PR fortran/95502
1346         * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
1347         dereference.
1348         * match.c (gfc_match_pointer_assignment): Likewise.
1349         * parse.c (gfc_check_do_variable): Avoid comparison with NULL
1350         symtree.
1352 2021-06-15  Tobias Burnus  <tobias@codesourcery.com>
1354         PR fortran/92568
1355         * dump-parse-tree.c (show_omp_clauses): Update for defaultmap.
1356         * f95-lang.c (LANG_HOOKS_OMP_ALLOCATABLE_P,
1357         LANG_HOOKS_OMP_SCALAR_TARGET_P): New.
1358         * gfortran.h (enum gfc_omp_defaultmap,
1359         enum gfc_omp_defaultmap_category): New.
1360         * openmp.c (gfc_match_omp_clauses): Update defaultmap matching.
1361         * trans-decl.c (gfc_finish_decl_attrs): Set GFC_DECL_SCALAR_TARGET.
1362         * trans-openmp.c (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
1363         (gfc_omp_scalar_p): Take 'ptr_alloc_ok' argument.
1364         (gfc_trans_omp_clauses, gfc_split_omp_clauses): Update for
1365         defaultmap changes.
1366         * trans.h (gfc_omp_scalar_p): Update prototype.
1367         (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
1368         (struct lang_decl): Add scalar_target.
1369         (GFC_DECL_SCALAR_TARGET, GFC_DECL_GET_SCALAR_TARGET): New.
1371 2021-06-14  Tobias Burnus  <tobias@codesourcery.com>
1373         * resolve.c (resolve_variable): Remove *XCNEW used to
1374         nullify nullified memory.
1376 2021-06-09  Martin Liska  <mliska@suse.cz>
1378         * intrinsic.texi: Add missing @headitem to tables with a header.
1380 2021-06-09  Jakub Jelinek  <jakub@redhat.com>
1382         PR fortran/100965
1383         * trans-openmp.c (gfc_omp_finish_clause): Gimplify OMP_CLAUSE_SIZE.
1385 2021-06-08  Tobias Burnus  <tobias@codesourcery.com>
1387         PR middle-end/99928
1388         * trans-openmp.c (gfc_add_clause_implicitly): New.
1389         (gfc_split_omp_clauses): Use it.
1390         (gfc_free_split_omp_clauses): New.
1391         (gfc_trans_omp_do_simd, gfc_trans_omp_parallel_do,
1392         gfc_trans_omp_parallel_do_simd, gfc_trans_omp_distribute,
1393         gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_taskloop,
1394         gfc_trans_omp_master_taskloop, gfc_trans_omp_parallel_master): Use it.
1396 2021-06-08  Martin Liska  <mliska@suse.cz>
1398         * intrinsic.texi: Fix typo.
1399         * trans-expr.c (gfc_trans_pointer_assignment): Likewise.
1401 2021-06-05  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
1403         PR fortran/100120
1404         PR fortran/100816
1405         PR fortran/100818
1406         PR fortran/100819
1407         PR fortran/100821
1408         * trans-array.c (gfc_get_array_span): rework the way character
1409         array "span" was calculated.
1410         (gfc_conv_expr_descriptor): improve handling of character sections
1411         and unlimited polymorphic objects.
1412         * trans-expr.c (gfc_get_character_len): new function to calculate
1413         character string length.
1414         (gfc_get_character_len_in_bytes): new function to calculate
1415         character string length in bytes.
1416         (gfc_conv_scalar_to_descriptor): add call to set the "span".
1417         (gfc_trans_pointer_assignment): set "_len" and antecipate the
1418         initialization of the deferred character length hidden argument.
1419         * trans-intrinsic.c (gfc_conv_associated): set "force_no_tmp" to
1420         avoid the creation of a temporary.
1421         * trans-types.c (gfc_get_dtype_rank_type): rework type detection
1422         so that unlimited polymorphic objects get proper type infomation,
1423         also important for bind(c).
1424         (gfc_get_dtype): add argument to pass the rank if necessary.
1425         (gfc_get_array_type_bounds): cosmetic change to have character
1426         arrays called character instead of unknown.
1427         * trans-types.h (gfc_get_dtype): modify prototype.
1428         * trans.c (get_array_span): rework the way character array "span"
1429         was calculated.
1430         * trans.h (gfc_get_character_len): new prototype.
1431         (gfc_get_character_len_in_bytes): new prototype.
1432         Add "unlimited_polymorphic" flag to "gfc_se" type to signal when
1433         expression carries an unlimited polymorphic object.
1435 2021-06-04  Harald Anlauf  <anlauf@gmx.de>
1437         PR fortran/99839
1438         * frontend-passes.c (inline_matmul_assign): Do not inline matmul
1439         if the assignment to the resulting array if it is not of canonical
1440         type (real/integer/complex/logical).
1442 2021-06-04  Tobias Burnus  <tobias@codesourcery.com>
1444         * dump-parse-tree.c (show_code_node): Handle
1445         EXEC_OMP_(TARGET_)(,PARALLEL_,TEAMS_)LOOP.
1447 2021-06-04  Tobias Burnus  <tobias@codesourcery.com>
1449         * scanner.c (skip_fixed_omp_sentinel): Set openacc_flag if
1450         this is not an (OpenMP) continuation line.
1451         (skip_fixed_oacc_sentinel): Likewise for openmp_flag and OpenACC.
1452         (gfc_next_char_literal): gfc_error_now to force error for mixed OMP/ACC
1453         continuation once per location and return '\n'.
1455 2021-06-04  Tobias Burnus  <tobias@codesourcery.com>
1457         PR middle-end/99928
1458         * openmp.c (gfc_match_omp_clauses): Fix typo in error message.
1460 2021-06-04  Tobias Burnus  <tobias@codesourcery.com>
1462         PR middle-end/99928
1463         * dump-parse-tree.c (show_omp_clauses): Handle bind clause.
1464         (show_omp_node): Handle loop directive.
1465         * frontend-passes.c (gfc_code_walker): Likewise.
1466         * gfortran.h (enum gfc_statement): Add
1467         ST_OMP_(END_)(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
1468         (enum gfc_omp_bind_type): New.
1469         (gfc_omp_clauses): Use it.
1470         (enum gfc_exec_op): Add EXEC_OMP_(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
1471         * match.h (gfc_match_omp_loop, gfc_match_omp_parallel_loop,
1472         gfc_match_omp_target_parallel_loop, gfc_match_omp_target_teams_loop,
1473         gfc_match_omp_teams_loop): New.
1474         * openmp.c (enum omp_mask1): Add OMP_CLAUSE_BIND.
1475         (gfc_match_omp_clauses): Handle it.
1476         (OMP_LOOP_CLAUSES, gfc_match_omp_loop, gfc_match_omp_teams_loop,
1477         gfc_match_omp_target_teams_loop, gfc_match_omp_parallel_loop,
1478         gfc_match_omp_target_parallel_loop): New.
1479         (resolve_omp_clauses, resolve_omp_do, omp_code_to_statement,
1480         gfc_resolve_omp_directive): Handle omp loop.
1481         * parse.c (decode_omp_directive case_exec_markers, gfc_ascii_statement,
1482         parse_omp_do, parse_executable): Likewise.
1483         (parse_omp_structured_block): Remove ST_ which use parse_omp_do.
1484         * resolve.c (gfc_resolve_blocks): Add omp loop.
1485         * st.c (gfc_free_statement): Likewise.
1486         * trans-openmp.c (gfc_trans_omp_clauses): Handle bind clause.
1487         (gfc_trans_omp_do, gfc_trans_omp_parallel_do, gfc_trans_omp_distribute,
1488         gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_directive):
1489         Handle loop directive.
1490         (gfc_split_omp_clauses): Likewise; fix firstprivate/lastprivate
1491         and (in_)reduction for taskloop.
1492         * trans.c (trans_code): Handle omp loop directive.
1494 2021-06-01  Tobias Burnus  <tobias@codesourcery.com>
1496         PR middle-end/99928
1497         * dump-parse-tree.c (show_omp_node, show_code_node): Handle
1498         (parallel) master taskloop (simd).
1499         * frontend-passes.c (gfc_code_walker): Set in_omp_workshare
1500         to false for parallel master taskloop (simd).
1501         * gfortran.h (enum gfc_statement):
1502         Add ST_OMP_(END_)(PARALLEL_)MASTER_TASKLOOP(_SIMD).
1503         (enum gfc_exec_op): EXEC_OMP_(PARALLEL_)MASTER_TASKLOOP(_SIMD).
1504         * match.h (gfc_match_omp_master_taskloop,
1505         gfc_match_omp_master_taskloop_simd,
1506         gfc_match_omp_parallel_master_taskloop,
1507         gfc_match_omp_parallel_master_taskloop_simd): New prototype.
1508         * openmp.c (gfc_match_omp_parallel_master_taskloop,
1509         gfc_match_omp_parallel_master_taskloop_simd,
1510         gfc_match_omp_master_taskloop,
1511         gfc_match_omp_master_taskloop_simd): New.
1512         (gfc_match_omp_taskloop_simd): Permit 'reduction' clause.
1513         (resolve_omp_clauses): Handle new combined directives; remove
1514         inscan-reduction check to reduce multiple errors; add
1515         task-reduction error for 'taskloop simd'.
1516         (gfc_resolve_omp_parallel_blocks,
1517         resolve_omp_do, omp_code_to_statement,
1518         gfc_resolve_omp_directive): Handle new combined constructs.
1519         * parse.c (decode_omp_directive, next_statement,
1520         gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
1521         parse_executable): Likewise.
1522         * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
1523         * st.c (gfc_free_statement): Likewise.
1524         * trans.c (trans_code): Likewise.
1525         * trans-openmp.c (gfc_split_omp_clauses,
1526         gfc_trans_omp_directive): Likewise.
1527         (gfc_trans_omp_parallel_master): Move after gfc_trans_omp_master_taskloop;
1528         handle parallel master taskloop (simd) as well.
1529         (gfc_trans_omp_taskloop): Take gfc_exec_op as arg.
1530         (gfc_trans_omp_master_taskloop): New.
1532 2021-05-30  Gerald Pfeifer  <gerald@pfeifer.com>
1534         * gfortran.texi (BOZ literal constants): Fix typo.
1536 2021-05-28  Tobias Burnus  <tobias@codesourcery.com>
1538         * dump-parse-tree.c (show_iterator): New.
1539         (show_omp_namelist): Handle iterators.
1540         (show_omp_clauses): Handle affinity.
1541         * gfortran.h (gfc_free_omp_namelist): New union with 'udr' and new 'ns'.
1542         * match.c (gfc_free_omp_namelist): Add are to choose union element.
1543         * openmp.c (gfc_free_omp_clauses, gfc_match_omp_detach,
1544         gfc_match_omp_clause_reduction, gfc_match_omp_flush): Update
1545         call to gfc_free_omp_namelist.
1546         (gfc_match_omp_variable_list): Likewise; permit preceeding whitespace.
1547         (enum omp_mask1): Add OMP_CLAUSE_AFFINITY.
1548         (gfc_match_iterator): New.
1549         (gfc_match_omp_clauses): Use it; update call to gfc_free_omp_namelist.
1550         (OMP_TASK_CLAUSES): Add OMP_CLAUSE_AFFINITY.
1551         (gfc_match_omp_taskwait): Match depend clause.
1552         (resolve_omp_clauses): Handle affinity; update for udr/union change.
1553         (gfc_resolve_omp_directive): Resolve clauses of taskwait.
1554         * st.c (gfc_free_statement): Update gfc_free_omp_namelist call.
1555         * trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Likewise
1556         (handle_iterator): New.
1557         (gfc_trans_omp_clauses): Handle iterators for depend/affinity clause.
1558         (gfc_trans_omp_taskwait): Handle depend clause.
1559         (gfc_trans_omp_directive): Update call.
1561 2021-05-27  Harald Anlauf  <anlauf@gmx.de>
1563         PR fortran/100602
1564         * trans-intrinsic.c (gfc_conv_intrinsic_size): Use CLASS data
1565         attributes for CLASS arrays for generation of runtime error.
1567 2021-05-27  Harald Anlauf  <anlauf@gmx.de>
1569         PR fortran/100656
1570         * trans-array.c (gfc_conv_ss_startstride): Do not call check for
1571         presence of a dummy argument when a symbol actually refers to a
1572         non-dummy.
1574 2021-05-25  Tobias Burnus  <tobias@codesourcery.com>
1575             Johannes Nendwich  <a08727063@unet.univie.ac.at>
1577         * intrinsic.texi (GERROR, GETARGS, GETLOG, NORM2, PARITY, RANDOM_INIT,
1578         RANDOM_NUMBER): Fix typos and copy'n'paste errors.
1580 2021-05-24  Tobias Burnus  <tobias@codesourcery.com>
1582         PR fortran/86470
1583         * trans-expr.c (gfc_copy_class_to_class): Add unshare_expr.
1584         * trans-openmp.c (gfc_is_polymorphic_nonptr,
1585         gfc_is_unlimited_polymorphic_nonptr): New.
1586         (gfc_omp_clause_copy_ctor, gfc_omp_clause_dtor): Handle
1587         polymorphic scalars.
1589 2021-05-23  Harald Anlauf  <anlauf@gmx.de>
1591         PR fortran/100551
1592         * trans-expr.c (gfc_conv_procedure_call): Adjust check for
1593         implicit conversion of actual argument to an unlimited polymorphic
1594         procedure argument.
1596 2021-05-23  Tobias Burnus  <tobias@codesourcery.com>
1598         * intrinsic.texi (ATOMIC_ADD, ATOMIC_FETCH_ADD): Use the
1599         proper variable name in the description.
1601 2021-05-22  Andre Vehreschild  <vehre@gcc.gnu.org>
1602             Steve Kargl  <kargl@gcc.gnu.org>
1604         PR fortran/98301
1605         * trans-decl.c (gfc_build_builtin_function_decls): Move decl.
1606         * trans-intrinsic.c (conv_intrinsic_random_init): Use bool for
1607         lib-call of caf_random_init instead of logical (4-byte).
1608         * trans.h: Add tree var for random_init.
1610 2021-05-20  Marcel Vollweiler  <marcel@codesourcery.com>
1612         * openmp.c (gfc_match_omp_clauses): Support map-type-modifier 'close'.
1614 2021-05-18  Tobias Burnus  <tobias@codesourcery.com>
1616         PR fortran/100642
1617         * openmp.c (omp_code_to_statement): Add missing EXEC_OMP_DEPOBJ.
1619 2021-05-17  Harald Anlauf  <anlauf@gmx.de>
1621         PR fortran/98411
1622         * trans-decl.c (gfc_finish_var_decl): Add check for explicit SAVE
1623         attribute.
1625 2021-05-17  Tobias Burnus  <tobias@codesourcery.com>
1627         PR fortran/100633
1628         * resolve.c (gfc_resolve_code): Reject nonintrinsic assignments in
1629         OMP WORKSHARE.
1631 2021-05-14  Tobias Burnus  <tobias@codesourcery.com>
1633         * dump-parse-tree.c (show_omp_node, show_code_node): Handle
1634         EXEC_OMP_PARALLEL_MASTER.
1635         * frontend-passes.c (gfc_code_walker): Likewise.
1636         * gfortran.h (enum gfc_statement): Add ST_OMP_PARALLEL_MASTER and
1637         ST_OMP_END_PARALLEL_MASTER.
1638         (enum gfc_exec_op): Add EXEC_OMP_PARALLEL_MASTER..
1639         * match.h (gfc_match_omp_parallel_master): Handle it.
1640         * openmp.c (gfc_match_omp_parallel_master, resolve_omp_clauses,
1641         omp_code_to_statement, gfc_resolve_omp_directive): Likewise.
1642         * parse.c (decode_omp_directive, case_exec_markers,
1643         gfc_ascii_statement, parse_omp_structured_block,
1644         parse_executable): Likewise.
1645         * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
1646         * st.c (gfc_free_statement): Likewise.
1647         * trans-openmp.c (gfc_trans_omp_parallel_master,
1648         gfc_trans_omp_workshare, gfc_trans_omp_directive): Likewise.
1649         * trans.c (trans_code): Likewise.
1651 2021-05-14  Tobias Burnus  <tobias@codesourcery.com>
1653         * resolve.c (resolve_symbol): Handle implicit SAVE of main-program
1654         for vars in 'omp threadprivate' and 'omp declare target'.
1656 2021-05-10  Martin Liska  <mliska@suse.cz>
1658         * decl.c (variable_decl): Use startswith
1659         function instead of strncmp.
1660         (gfc_match_end): Likewise.
1661         * gfortran.h (gfc_str_startswith): Likewise.
1662         * module.c (load_omp_udrs): Likewise.
1663         (read_module): Likewise.
1664         * options.c (gfc_handle_runtime_check_option): Likewise.
1665         * primary.c (match_arg_list_function): Likewise.
1666         * trans-decl.c (gfc_get_symbol_decl): Likewise.
1667         * trans-expr.c (gfc_conv_procedure_call): Likewise.
1668         * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Likewise.
1670 2021-05-06  Paul Thomas  <pault@gcc.gnu.org>
1672         PR fortran/46991
1673         PR fortran/99819
1674         * class.c (gfc_build_class_symbol): Remove the error that
1675         disables assumed size class arrays. Class array types that are
1676         not deferred shape or assumed rank are given a unique name and
1677         placed in the procedure namespace.
1678         * trans-array.c (gfc_trans_g77_array): Obtain the data pointer
1679         for class arrays.
1680         (gfc_trans_dummy_array_bias): Suppress the runtime error for
1681         extent violations in explicit shape class arrays because it
1682         always fails.
1683         * trans-expr.c (gfc_conv_procedure_call): Handle assumed size
1684         class actual arguments passed to non-descriptor formal args by
1685         using the data pointer, stored as the symbol's backend decl.
1687 2021-05-05  Harald Anlauf  <anlauf@gmx.de>
1689         PR fortran/100274
1690         * interface.c (gfc_compare_actual_formal): Continue checks after
1691         emitting warning for argument length mismatch.
1692         * trans-expr.c (gfc_conv_procedure_call): Check for NULL pointer
1693         dereference.
1695 2021-05-04  Tobias Burnus  <tobias@codesourcery.com>
1697         PR testsuite/100397
1698         * trans-openmp.c (gfc_trans_omp_depobj): Fix pasto in enum values.
1700 2021-04-28  Tobias Burnus  <tobias@codesourcery.com>
1702         * openmp.c (gfc_match_omp_variable_list): Gobble whitespace before
1703         checking whether a '%' or parenthesis-open follows as next character.
1705 2021-04-28  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
1707         PR fortran/82376
1708         * trans-expr.c (gfc_conv_procedure_call): Evaluate function result
1709         and then pass a pointer.
1711 2021-04-26  Thomas Schwinge  <thomas@codesourcery.com>
1712             Nathan Sidwell  <nathan@codesourcery.com>
1713             Tom de Vries  <vries@codesourcery.com>
1714             Julian Brown  <julian@codesourcery.com>
1715             Kwok Cheung Yeung  <kcy@codesourcery.com>
1717         * lang.opt (Wopenacc-parallelism): New.
1719 2021-04-24  Harald Anlauf  <anlauf@gmx.de>
1721         PR fortran/100154
1722         * check.c (variable_check): Allow function reference having a data
1723         pointer result.
1724         (arg_strlen_is_zero): New function.
1725         (gfc_check_fgetputc_sub): Add static check of character and status
1726         arguments.
1727         (gfc_check_fgetput_sub): Likewise.
1728         * intrinsic.c (add_subroutines): Fix argument name for the
1729         character argument to intrinsic subroutines fget[c], fput[c].
1731 2021-04-24  Harald Anlauf  <anlauf@gmx.de>
1733         PR fortran/100218
1734         * expr.c (gfc_check_vardef_context): Extend check to allow pointer
1735         from a function reference.
1737 2021-04-22  Martin Liska  <mliska@suse.cz>
1739         PR testsuite/100159
1740         PR testsuite/100192
1741         * frontend-passes.c (optimize_expr): Fix typos and missing comments.
1743 2021-04-22  Michael Meissner  <meissner@linux.ibm.com>
1745         PR fortran/96983
1746         * trans-intrinsic.c (build_round_expr): If int type is larger than
1747         long long, do the round and convert to the integer type.  Do not
1748         try to find a floating point type the exact size of the integer
1749         type.
1751 2021-04-21  Tobias Burnus  <tobias@codesourcery.com>
1753         * dump-parse-tree.c (show_omp_namelist): Handle depobj + mutexinoutset
1754         in the depend clause.
1755         (show_omp_clauses, show_omp_node, show_code_node): Handle depobj.
1756         * gfortran.h (enum gfc_statement): Add ST_OMP_DEPOBJ.
1757         (enum gfc_omp_depend_op): Add OMP_DEPEND_UNSET,
1758         OMP_DEPEND_MUTEXINOUTSET and OMP_DEPEND_DEPOBJ.
1759         (gfc_omp_clauses): Add destroy, depobj_update and depobj.
1760         (enum gfc_exec_op): Add EXEC_OMP_DEPOBJ
1761         * match.h (gfc_match_omp_depobj): Match 'omp depobj'.
1762         * openmp.c (gfc_match_omp_clauses): Add depobj + mutexinoutset
1763         to depend clause.
1764         (gfc_match_omp_depobj, resolve_omp_clauses, gfc_resolve_omp_directive):
1765         Handle 'omp depobj'.
1766         * parse.c (decode_omp_directive, next_statement, gfc_ascii_statement):
1767         Likewise.
1768         * resolve.c (gfc_resolve_code): Likewise.
1769         * st.c (gfc_free_statement): Likewise.
1770         * trans-openmp.c (gfc_trans_omp_clauses): Handle depobj + mutexinoutset
1771         in the depend clause.
1772         (gfc_trans_omp_depobj, gfc_trans_omp_directive): Handle EXEC_OMP_DEPOBJ.
1773         * trans.c (trans_code): Likewise.
1775 2021-04-20  Paul Thomas  <pault@gcc.gnu.org>
1777         PR fortran/100110
1778         * trans-decl.c (gfc_get_symbol_decl): Replace test for host
1779         association with a check that the current and symbol namespaces
1780         are the same.
1782 2021-04-19  Thomas Schwinge  <thomas@codesourcery.com>
1784         * lang.opt (fopenacc-kernels=): Remove.
1786 2021-04-16  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
1788         PR fortran/100094
1789         * trans-array.c (gfc_trans_deferred_array): Add code to initialize
1790         pointers and allocatables with correct TKR parameters.
1792 2021-04-16  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
1794         PR fortran/100018
1795         * resolve.c: Add association check before de-referencing pointer.
1797 2021-04-16  Harald Anlauf  <anlauf@gmx.de>
1798             Paul Thomas  <pault@gcc.gnu.org>
1800         PR fortran/63797
1801         * module.c (write_symtree): Do not write interface of intrinsic
1802         procedure to module file for F2003 and newer.
1804 2021-04-15  Paul Thomas  <pault@gcc.gnu.org>
1806         PR fortran/99307
1807         * symbol.c: Remove trailing white space.
1808         * trans-array.c (gfc_trans_create_temp_array): Create a class
1809         temporary for class expressions and assign the new descriptor
1810         to the data field.
1811         (build_class_array_ref): If the class expr can be extracted,
1812         then use that for 'decl'. Class function results are reliably
1813         handled this way. Call gfc_find_and_cut_at_last_class_ref to
1814         eliminate largely redundant code. Remove dead code and recast
1815         the rest of the code to extract 'decl' for remaining cases.
1816         Call gfc_build_spanned_array_ref.
1817         (gfc_alloc_allocatable_for_assignment): Use class descriptor
1818         element length for 'elemsize1'. Eliminate repeat set of dtype
1819         for class expressions.
1820         * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Include
1821         additional code from build_class_array_ref, and use optional
1822         gfc_typespec pointer argument.
1823         (gfc_trans_scalar_assign): Make use of pre and post blocks for
1824         all class expressions.
1825         * trans.c (get_array_span): For unlimited polymorphic exprs
1826         multiply the span by the value of the _len field.
1827         (gfc_build_spanned_array_ref): New function.
1828         (gfc_build_array_ref): Call gfc_build_spanned_array_ref and
1829         eliminate repeated code.
1830         * trans.h: Add arg to gfc_find_and_cut_at_last_class_ref and
1831         add prototype for gfc_build_spanned_array_ref.
1833 2021-04-14  Martin Liska  <mliska@suse.cz>
1835         * intrinsic.texi: The table has first column empty and it makes
1836         trouble when processing makeinfo --xml output.
1838 2021-04-09  Tobias Burnus  <tobias@codesourcery.com>
1840         PR fortran/99817
1841         * trans-types.c (gfc_get_function_type): Also generate hidden
1842         coarray argument for character arguments.
1844 2021-04-03  Paul Thomas  <pault@gcc.gnu.org>
1846         PR fortran/99818
1847         * interface.c (compare_parameter): The codimension attribute is
1848         applied to the _data field of class formal arguments.
1850 2021-04-01  Harald Anlauf  <anlauf@gmx.de>
1852         PR fortran/99840
1853         * simplify.c (gfc_simplify_transpose): Properly initialize
1854         resulting shape.
1856 2021-03-28  Paul Thomas  <pault@gcc.gnu.org>
1858         PR fortran/99602
1859         * trans-expr.c (gfc_conv_procedure_call): Use the _data attrs
1860         for class expressions and detect proc pointer evaluations by
1861         the non-null actual argument list.
1863 2021-03-27  Steve Kargl  <kargl@gcc.gnu.org>
1865         * misc.c (gfc_typename): Fix off-by-one in buffer sizes.
1867 2021-03-26  Tobias Burnus  <tobias@codesourcery.com>
1869         PR fortran/99651
1870         * intrinsic.c (gfc_intrinsic_func_interface): Set
1871         attr.proc = PROC_INTRINSIC if FL_PROCEDURE.
1873 2021-03-24  Tobias Burnus  <tobias@codesourcery.com>
1875         PR fortran/99369
1876         * resolve.c (resolve_operator): Make 'msg' buffer larger
1877         and use snprintf.
1879 2021-03-23  Tobias Burnus  <tobias@codesourcery.com>
1881         PR fortran/93660
1882         * trans-decl.c (build_function_decl): Add comment;
1883         increment hidden_typelist for caf_token/caf_offset.
1884         * trans-types.c (gfc_get_function_type): Add comment;
1885         add missing caf_token/caf_offset args.
1887 2021-03-22  Tobias Burnus  <tobias@codesourcery.com>
1889         PR fortran/99688
1890         * match.c (select_type_set_tmp, gfc_match_select_type,
1891         gfc_match_select_rank): Fix 'name' buffersize to avoid out of bounds.
1892         * resolve.c (resolve_select_type): Likewise.
1894 2021-03-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
1896         * frontend-passes.c (inline_limit_check): Add rank_a
1897         argument. If a is rank 1, set the second dimension to 1.
1898         (inline_matmul_assign): Pass rank_a argument to inline_limit_check.
1899         (call_external_blas): Likewise.
1901 2021-03-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
1903         PR fortran/99345
1904         * frontend-passes.c (doloop_contained_procedure_code):
1905         Properly handle EXEC_IOLENGTH.
1907 2021-03-15  Paul Thomas  <pault@gcc.gnu.org>
1909         PR fortran/99545
1910         * trans-stmt.c (gfc_trans_allocate): Mark the initialization
1911         assignment by setting init_flag.
1913 2021-03-14  Harald Anlauf  <anlauf@gmx.de>
1914             Paul Thomas  <pault@gcc.gnu.org>
1916         * trans-expr.c (gfc_conv_procedure_call): Fix runtime checks for
1917         CLASS arguments.
1918         * trans-intrinsic.c (gfc_conv_intrinsic_size): Likewise.
1920 2021-03-13  Paul Thomas  <pault@gcc.gnu.org>
1922         PR fortran/99125
1923         * trans-array.c (gfc_conv_expr_descriptor): For deferred length
1924         length components use the ss_info string length instead of
1925         gfc_get_expr_charlen. Make sure that the deferred string length
1926         is a variable before assigning to it. Otherwise use the expr.
1927         * trans-expr.c (gfc_conv_string_length): Make sure that the
1928         deferred string length is a variable before assigning to it.
1930 2021-03-12  Tobias Burnus  <tobias@codesourcery.com>
1932         PR fortran/99514
1933         * resolve.c (resolve_symbol): Accept vars which are in DATA
1934         and hence (either) implicit SAVE (or in common).
1936 2021-03-10  Harald Anlauf  <anlauf@gmx.de>
1938         PR fortran/99205
1939         * data.c (gfc_assign_data_value): Reject non-constant character
1940         length for lvalue.
1941         * trans-array.c (gfc_conv_array_initializer): Restrict loop to
1942         elements which are defined to avoid NULL pointer dereference.
1944 2021-03-10  Tobias Burnus  <tobias@codesourcery.com>
1946         * intrinsic.texi (MIN): Correct 'maximum' to 'minimum'.
1948 2021-03-10  Eric Botcazou  <ebotcazou@adacore.com>
1950         PR fortran/96983
1951         * trans-intrinsic.c (build_round_expr): Do not implicitly assume
1952         that __float128 is the 128-bit floating-point type.
1954 2021-03-08  Harald Anlauf  <anlauf@gmx.de>
1956         PR fortran/49278
1957         * data.c (gfc_assign_data_value): Reject variable with PARAMETER
1958         attribute in DATA statement.
1960 2021-03-05  Tobias Burnus  <tobias@codesourcery.com>
1962         PR fortran/99355
1963         PR fortran/57871
1964         * invoke.texi (-freal{4,8}-real-*): Extend description.
1965         * primary.c (match_real_constant): Also promote real literals
1966         with '_kind' number.
1968 2021-03-04  Tobias Burnus  <tobias@codesourcery.com>
1970         PR fortran/99355
1971         * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Avoid
1972         redoing kind conversions.
1973         * primary.c (match_real_constant): Likewise.
1975 2021-02-28  Jakub Jelinek  <jakub@redhat.com>
1977         PR fortran/99303
1978         * openmp.c (gfc_omp_requires_add_clause): Fix up diagnostic message
1979         wordings.
1980         (resolve_omp_clauses): Likewise.
1982 2021-02-28  Jakub Jelinek  <jakub@redhat.com>
1984         PR fortran/99300
1985         * frontend-passes.c (doloop_code): Replace double space in diagnostics
1986         with a single space.
1988 2021-02-24  Paul Thomas  <pault@gcc.gnu.org>
1990         PR fortran/98342
1991         * trans-expr.c (gfc_conv_derived_to_class): Add optional arg.
1992         'derived_array' to hold the fixed, parmse expr in the case of
1993         assumed rank formal arguments. Deal with optional arguments.
1994         (gfc_conv_procedure_call): Null 'derived' array for each actual
1995         argument. Add its address to the call to gfc_conv_derived_to_
1996         class. Access the 'data' field of scalar descriptors before
1997         deallocating allocatable components. Also strip NOPs before the
1998         calls to gfc_deallocate_alloc_comp. Use 'derived' array as the
1999         input to gfc_deallocate_alloc_comp if it is available.
2000         * trans.h : Include the optional argument 'derived_array' to
2001         the prototype of gfc_conv_derived_to_class. The default value
2002         is NULL_TREE.
2004 2021-02-23  Paul Thomas  <pault@gcc.gnu.org>
2006         PR fortran/99124
2007         * resolve.c (resolve_fl_procedure): Include class results in
2008         the test for F2018, C15100.
2009         * trans-array.c (get_class_info_from_ss): Do not use the saved
2010         descriptor to obtain the class expression for variables. Use
2011         gfc_get_class_from_expr instead.
2013 2021-02-23  Harald Anlauf  <anlauf@gmx.de>
2015         PR fortran/99206
2016         * simplify.c (gfc_simplify_reshape): Set string length for
2017         character arguments.
2019 2021-02-22  Tobias Burnus  <tobias@codesourcery.com>
2021         PR fortran/99171
2022         * trans-openmp.c (gfc_omp_is_optional_argument): Regard optional
2023         dummy procs as nonoptional as no special treatment is needed.
2025 2021-02-21  Harald Anlauf  <anlauf@gmx.de>
2027         * trans-expr.c (gfc_conv_procedure_call): Do not add clobber to
2028         allocatable intent(out) argument.
2030 2021-02-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2032         PR fortran/98686
2033         * match.c (gfc_match_namelist): If BT_UNKNOWN, check for
2034         IMPLICIT NONE and and issue an error, otherwise set the type
2035         to its IMPLICIT type so that any subsequent use of objects will
2036         will confirm their types.
2038 2021-02-19  Harald Anlauf  <anlauf@gmx.de>
2040         * symbol.c (gfc_add_flavor): Reverse order of conditions.
2042 2021-02-19  Tobias Burnus  <tobias@codesourcery.com>
2044         PR fortran/99010
2045         * dependency.c (gfc_dep_resolver): Fix coarray handling.
2047 2021-02-19  Tobias Burnus  <tobias@codesourcery.com>
2049         PR fortran/99146
2050         * interface.c:
2052 2021-02-19  Tobias Burnus  <tobias@codesourcery.com>
2054         PR fortran/99027
2055         * simplify.c (simplify_bound_dim): Honor DIMEN_ELEMENT
2056         when using dim=.
2058 2021-02-17  Julian Brown  <julian@codesourcery.com>
2060         * openmp.c (resolve_omp_clauses): Disallow selecting components
2061         of arrays of derived type.
2063 2021-02-17  Julian Brown  <julian@codesourcery.com>
2065         * trans-openmp.c (gfc_trans_omp_clauses): Handle element selection
2066         for arrays of derived types.
2068 2021-02-16  Tobias Burnus  <tobias@codesourcery.com>
2070         * expr.c (gfc_is_simplify_contiguous): Handle REF_INQUIRY, i.e.
2071         %im and %re which are EXPR_VARIABLE.
2072         * openmp.c (resolve_omp_clauses): Diagnose %re/%im explicitly.
2074 2021-02-16  Tobias Burnus  <tobias@codesourcery.com>
2076         PR fortran/99111
2077         * io.c (resolve_tag_format): Reject BT_DERIVED/CLASS/VOID
2078         as (array-valued) FORMAT tag.
2080 2021-02-12  Tobias Burnus  <tobias@codesourcery.com>
2082         PR fortran/99043
2083         * trans-expr.c (gfc_conv_procedure_call): Don't reset
2084         rank of assumed-rank array.
2086 2021-02-11  Paul Thomas  <pault@gcc.gnu.org>
2088         PR fortran/98897
2089         * match.c (gfc_match_call): Include associate names as possible
2090         entities with typebound subroutines. The target needs to be
2091         resolved for the type.
2093 2021-02-11  Paul Thomas  <pault@gcc.gnu.org>
2095         PR fortran/99060
2096         * primary.c (gfc_match_varspec): Test for non-null 'previous'
2097         before using its name in the error message.
2099 2021-02-11  Tobias Burnus  <tobias@codesourcery.com>
2101         * intrinsic.texi (FINDLOC): Add 'MASK' to argument table.
2102         (MAXLOC, MAXVAL, MINLOC, MINVAL): For 'MASK', remove 'an
2103         array' as scalars are also permitted.
2105 2021-02-10  Julian Brown  <julian@codesourcery.com>
2107         PR fortran/98979
2108         * openmp.c (resolve_omp_clauses): Omit OpenACC update in
2109         contiguity check and stride-specified error.
2111 2021-02-04  Julian Brown  <julian@codesourcery.com>
2113         * openmp.c (resolve_omp_clauses): Omit OpenACC update in
2114         contiguity check and stride-specified error.
2116 2021-02-04  Julian Brown  <julian@codesourcery.com>
2118         * trans-openmp.c (gfc_trans_omp_clauses): Use class_pointer attribute
2119         for BT_CLASS.
2121 2021-02-04  Julian Brown  <julian@codesourcery.com>
2123         * trans-openmp.c (gfc_trans_omp_clauses): Fix dereferencing for
2124         BT_DERIVED members.
2126 2021-02-04  Tobias Burnus  <tobias@codesourcery.com>
2128         * openmp.c (resolve_omp_clauses): Explicitly diagnose
2129         substrings as not permitted.
2131 2021-02-03  Jeff Law  <law@redhat.com>
2133         * intrinsic.texi (ANINT): Fix typo.
2135 2021-02-03  Tobias Burnus  <tobias@codesourcery.com>
2137         PR fortran/98913
2138         * dependency.c (gfc_dep_resolver): Treat local access
2139         to coarrays like any array access in dependency analysis.
2141 2021-01-28  Harald Anlauf  <anlauf@gmx.de>
2143         PR fortran/86470
2144         * trans.c (gfc_call_malloc): Allocate area of size 1 if passed
2145         size is NULL (as documented).
2147 2021-01-27  Paul Thomas  <pault@gcc.gnu.org>
2149         PR fortran/93924
2150         PR fortran/93925
2151         * trans-expr.c (gfc_conv_procedure_call): Suppress the call to
2152         gfc_conv_intrinsic_to_class for unlimited polymorphic procedure
2153         pointers.
2154         (gfc_trans_assignment_1): Similarly suppress class assignment
2155         for class valued procedure pointers.
2157 2021-01-27  Paul Thomas  <pault@gcc.gnu.org>
2159         PR fortran/98472
2160         * trans-array.c (gfc_conv_expr_descriptor): Include elemental
2161         procedure pointers in the assert under the comment 'elemental
2162         function' and eliminate the second, spurious assert.
2164 2021-01-25  Harald Anlauf  <anlauf@gmx.de>
2166         PR fortran/70070
2167         * data.c (create_character_initializer): Check substring indices
2168         against bounds.
2169         (gfc_assign_data_value): Catch error returned from
2170         create_character_initializer.
2172 2021-01-25  Tobias Burnus  <tobias@codesourcery.com>
2174         * intrinsic.texi (CO_BROADCAST, CO_MIN, CO_REDUCE, CO_SUM): Fix typos.
2176 2021-01-25  Steve Kargl  <kargl@gcc.gnu.org>
2178         PR fortran/98517
2179         * resolve.c (resolve_charlen): Check that length expression is
2180         present before testing for scalar/integer..
2182 2021-01-22  Paul Thomas  <pault@gcc.gnu.org>
2184         PR fortran/98565
2185         * trans-intrinsic.c (gfc_conv_associated): Do not add a _data
2186         component for scalar class function targets. Instead, fix the
2187         function result and access the _data from that.
2189 2021-01-21  Jorge D'Elia  <jdelia@cimec.unl.edu.ar>
2191         * intrinsic.texi (CO_MAX): Fix typo.
2193 2021-01-21  Paul Thomas  <pault@gcc.gnu.org>
2195         PR fortran/96320
2196         * decl.c (gfc_match_modproc): It is not an error to find a
2197         module procedure declaration within a contains block.
2198         * expr.c (gfc_check_vardef_context): Pure procedure result is
2199         assignable. Change 'own_scope' accordingly.
2200         * resolve.c (resolve_typebound_procedure): A procedure that
2201         has the module procedure attribute is almost certainly a
2202         module procedure, whatever its interface.
2204 2021-01-19  Tobias Burnus  <tobias@codesourcery.com>
2206         PR fortran/98476
2207         * openmp.c (resolve_omp_clauses): Change use_device_ptr
2208         to use_device_addr for unless type(c_ptr); check all
2209         list item for is_device_ptr.
2211 2021-01-16  Kwok Cheung Yeung  <kcy@codesourcery.com>
2213         * dump-parse-tree.c (show_omp_clauses): Handle detach clause.
2214         * frontend-passes.c (gfc_code_walker): Walk detach expression.
2215         * gfortran.h (struct gfc_omp_clauses): Add detach field.
2216         (gfc_c_intptr_kind): New.
2217         * openmp.c (gfc_free_omp_clauses): Free detach clause.
2218         (gfc_match_omp_detach): New.
2219         (enum omp_mask1): Add OMP_CLAUSE_DETACH.
2220         (enum omp_mask2): Remove OMP_CLAUSE_DETACH.
2221         (gfc_match_omp_clauses): Handle OMP_CLAUSE_DETACH for OpenMP.
2222         (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DETACH.
2223         (resolve_omp_clauses): Prevent use of detach with mergeable and
2224         overriding the data sharing mode of the event handle.
2225         * trans-openmp.c (gfc_trans_omp_clauses): Handle detach clause.
2226         * trans-types.c (gfc_c_intptr_kind): New.
2227         (gfc_init_kinds): Initialize gfc_c_intptr_kind.
2228         * types.def
2229         (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT): Rename
2230         to...
2231         (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT_PTR):
2232         ...this.  Add extra argument.
2234 2021-01-14  Harald Anlauf  <anlauf@gmx.de>
2236         * gfortran.h (gfc_resolve_substring): Add prototype.
2237         * primary.c (match_string_constant): Simplify substrings with
2238         constant starting and ending points.
2239         * resolve.c: Rename resolve_substring to gfc_resolve_substring.
2240         (gfc_resolve_ref): Use renamed function gfc_resolve_substring.
2242 2021-01-14  Harald Anlauf  <anlauf@gmx.de>
2244         PR fortran/98661
2245         * resolve.c (resolve_component): Derived type components with
2246         ALLOCATABLE or POINTER attribute shall have a deferred shape.
2248 2021-01-14  Harald Anlauf  <anlauf@gmx.de>
2250         Revert:
2251         2021-01-14  Harald Anlauf  <anlauf@gmx.de>
2253         PR fortran/98661
2254         * resolve.c (resolve_component): Derived type components with
2255         ALLOCATABLE or POINTER attribute shall have a deferred shape.
2257 2021-01-14  Harald Anlauf  <anlauf@gmx.de>
2259         PR fortran/98661
2260         * resolve.c (resolve_component): Derived type components with
2261         ALLOCATABLE or POINTER attribute shall have a deferred shape.
2263 2021-01-08  Paul Thomas  <pault@gcc.gnu.org>
2265         PR fortran/93794
2266         * trans-expr.c (gfc_conv_component_ref): Remove the condition
2267         that deferred character length components only be allocatable.
2269 2021-01-08  Paul Thomas  <pault@gcc.gnu.org>
2271         PR fortran/98458
2272         * simplify.c (is_constant_array_expr): If an array constructor
2273         expression has elements other than constants or structures, try
2274         fixing the expression with gfc_reduce_init_expr. Also, if shape
2275         is NULL, obtain the array size and set it.
2277 2021-01-07  Paul Thomas  <pault@gcc.gnu.org>
2279         PR fortran/93701
2280         * resolve.c (find_array_spec): Put static prototype for
2281         resolve_assoc_var before this function and call for associate
2282         variables.
2284 2021-01-06  Harald Anlauf  <anlauf@gmx.de>
2286         * resolve.c (resolve_component): Add check for valid CLASS
2287         reference before trying to access CLASS data.
2289 2021-01-04  Martin Liska  <mliska@suse.cz>
2291         * ChangeLog-2018: Remove duplicate ChangeLog entries.
2293 2021-01-01  Harald Anlauf  <anlauf@gmx.de>
2295         * class.c (gfc_find_vtab): Add check on attribute is_class.
2297 2021-01-01  Jakub Jelinek  <jakub@redhat.com>
2299         * gfortranspec.c (lang_specific_driver): Update copyright notice
2300         dates.
2301         * gfc-internals.texi: Bump @copying's copyright year.
2302         * gfortran.texi: Ditto.
2303         * intrinsic.texi: Ditto.
2304         * invoke.texi: Ditto.
2306 2021-01-01  Jakub Jelinek  <jakub@redhat.com>
2308         * ChangeLog-2020: Rotate ChangeLog.  New file.
2311 Copyright (C) 2021 Free Software Foundation, Inc.
2313 Copying and distribution of this file, with or without modification,
2314 are permitted in any medium without royalty provided the copyright
2315 notice and this notice are preserved.