Daily bump.
[official-gcc.git] / gcc / fortran / ChangeLog
blob362f6ba5810972dba66bdcca65dce481c8159421
1 2021-12-02  Chung-Lin Tang  <cltang@codesourcery.com>
3         PR fortran/90030
4         * trans-openmp.c (gfc_omp_finish_clause): Remove fold_convert to pointer
5         to char_type_node, add gcc_assert of POINTER_TYPE_P.
6         (gfc_trans_omp_array_section): Likewise.
7         (gfc_trans_omp_clauses): Likewise.
9 2021-11-30  Harald Anlauf  <anlauf@gmx.de>
11         PR fortran/102787
12         * array.c (expand_constructor): When encountering a constant array
13         expression or array section within a constructor, simplify it to
14         enable better expansion.
16 2021-11-30  Harald Anlauf  <anlauf@gmx.de>
18         PR fortran/103473
19         * simplify.c (simplify_minmaxloc_nodim): Avoid NULL pointer
20         dereference when shape is not set.
22 2021-11-30  Harald Anlauf  <anlauf@gmx.de>
23             Steven G. Kargl  <kargl@gcc.gnu.org>
25         PR fortran/101565
26         * check.c (gfc_check_image_index): Verify that SUB argument to
27         IMAGE_INDEX is of type integer.
29 2021-11-30  Richard Biener  <rguenther@suse.de>
31         * frontend-passes.c (gfc_expr_walker): Add comment to
32         indicate tail recursion.
34 2021-11-30  Richard Biener  <rguenther@suse.de>
36         * target-memory.c (gfc_element_size): Remove unreachable return.
38 2021-11-30  Thomas Schwinge  <thomas@codesourcery.com>
40         * openmp.c (resolve_oacc_loop_blocks): Remove "gang reduction on
41         an orphan loop" checking.
42         (oacc_is_parallel, oacc_is_kernels, oacc_is_serial)
43         (oacc_is_compute_construct): Remove.
45 2021-11-30  Frederik Harwath  <frederik@codesourcery.com>
46             Thomas Schwinge  <thomas@codesourcery.com>
48         * openmp.c (oacc_is_parallel_or_serial): Evolve into...
49         (oacc_is_compute_construct): ... this function.
50         (resolve_oacc_loop_blocks): Use "oacc_is_compute_construct"
51         instead of "oacc_is_parallel_or_serial" for checking that a
52         loop is not orphaned.
54 2021-11-30  Kwok Cheung Yeung  <kcy@codesourcery.com>
55             Thomas Schwinge  <thomas@codesourcery.com>
57         * openmp.c (oacc_is_serial, oacc_is_parallel_or_serial): New.
58         (resolve_oacc_loop_blocks): Use oacc_is_parallel_or_serial instead of
59         oacc_is_parallel.
61 2021-11-30  Cesar Philippidis  <cesar@codesourcery.com>
62             Thomas Schwinge  <thomas@codesourcery.com>
64         * openmp.c (oacc_is_parallel, oacc_is_kernels): New 'static'
65         functions.
66         (resolve_oacc_loop_blocks): Emit an error on orphan OpenACC gang
67         reductions.
69 2021-11-30  Richard Biener  <rguenther@suse.de>
71         * decl.c (gfc_insert_parameter_exprs): Only return after
72         resetting type_param_spec_list.
74 2021-11-30  Richard Biener  <rguenther@suse.de>
76         * frontend-passes.c (gfc_expr_walker): Remove unreachable
77         break.
78         * scanner.c (skip_fixed_comments): Remove unreachable
79         gcc_unreachable.
80         * trans-expr.c (gfc_expr_is_variable): Refactor to make
81         control flow more obvious.
83 2021-11-29  Eric Gallager  <egallager@gcc.gnu.org>
85         PR other/103021
86         * Make-lang.in: Use ETAGS variable in TAGS target.
88 2021-11-26  Harald Anlauf  <anlauf@gmx.de>
90         PR fortran/103411
91         * check.c (gfc_check_reshape): Improve check of size of source
92         array for the RESHAPE intrinsic against the given shape when pad
93         is not given, and shape is a parameter.  Try other simplifications
94         of shape.
96 2021-11-23  Harald Anlauf  <anlauf@gmx.de>
98         PR fortran/103392
99         * simplify.c (simplify_bound): Do not try to simplify
100         LBOUND/UBOUND for arrays with POINTER or ALLOCATABLE attribute.
102 2021-11-23  Harald Anlauf  <anlauf@gmx.de>
104         PR fortran/87711
105         PR fortran/87851
106         * trans-array.c (arg_evaluated_for_scalarization): Add LEN_TRIM to
107         list of intrinsics for which an optional KIND argument needs to be
108         removed before scalarization.
110 2021-11-21  Jakub Jelinek  <jakub@redhat.com>
112         PR debug/103315
113         * trans-types.c (gfc_get_array_descr_info): Use DW_OP_deref_size 1
114         instead of DW_OP_deref for DW_AT_rank.
116 2021-11-21  Harald Anlauf  <anlauf@gmx.de>
117             Steven G. Kargl  <kargl@gcc.gnu.org>
119         PR fortran/99061
120         * trans-intrinsic.c (gfc_lookup_intrinsic): Helper function for
121         looking up gfortran builtin intrinsics.
122         (gfc_conv_intrinsic_atrigd): Use it.
123         (gfc_conv_intrinsic_cotan): Likewise.
124         (gfc_conv_intrinsic_cotand): Likewise.
125         (gfc_conv_intrinsic_atan2d): Likewise.
127 2021-11-18  Harald Anlauf  <anlauf@gmx.de>
128             Steven G. Kargl  <kargl@gcc.gnu.org>
130         PR fortran/101329
131         * check.c (is_c_interoperable): Reject NULL() as it is not
132         interoperable.
134 2021-11-16  Harald Anlauf  <anlauf@gmx.de>
136         PR fortran/103286
137         * resolve.c (resolve_select): Choose appropriate range limit to
138         avoid NULL pointer dereference when generating error message.
140 2021-11-16  Mikael Morin  <mikael@gcc.gnu.org>
142         * interface.c (gfc_dummy_arg_get_name): New function.
143         * gfortran.h (gfc_dummy_arg_get_name): Declare it.
144         * trans-array.c (arg_evaluated_for_scalarization): Pass a dummy
145         argument wrapper as argument instead of an actual argument
146         and an index number.  Check it’s non-NULL.  Use its name
147         to identify it.
148         (gfc_walk_elemental_function_args): Update call to
149         arg_evaluated for scalarization.  Remove argument counting.
151 2021-11-16  Mikael Morin  <mikael@gcc.gnu.org>
153         * gfortran.h (gfc_actual_arglist::missing_arg_type): Remove.
154         * interface.c (gfc_compare_actual_formal): Remove
155         missing_arg_type initialization.
156         * intrinsic.c (sort_actual): Ditto.
157         * trans-expr.c (gfc_conv_procedure_call): Use associated_dummy
158         and gfc_dummy_arg_get_typespec to get the dummy argument type.
160 2021-11-16  Mikael Morin  <mikael@gcc.gnu.org>
162         * interface.c (gfc_dummy_arg_get_typespec,
163         gfc_dummy_arg_is_optional): New functions.
164         * gfortran.h (gfc_dummy_arg_get_typespec,
165         gfc_dummy_arg_is_optional): Declare them.
166         * trans.h (gfc_ss_info::dummy_arg): Use the wrapper type
167         as declaration type.
168         * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
169         use gfc_dummy_arg_get_typespec function to get the type.
170         (gfc_walk_elemental_function_args): Remove proc_ifc argument.
171         Get info about the dummy arg using the associated_dummy field.
172         * trans-array.h (gfc_walk_elemental_function_args): Update declaration.
173         * trans-intrinsic.c (gfc_walk_intrinsic_function):
174         Update call to gfc_walk_elemental_function_args.
175         * trans-stmt.c (gfc_trans_call): Ditto.
176         (get_proc_ifc_for_call): Remove.
178 2021-11-16  Mikael Morin  <mikael@gcc.gnu.org>
180         * gfortran.h (gfc_dummy_arg_kind, gfc_dummy_arg): New.
181         (gfc_actual_arglist): New field associated_dummy.
182         (gfc_intrinsic_arg): Remove field actual.
183         * interface.c (get_nonintrinsic_dummy_arg): New.
184         (gfc_compare_actual): Initialize associated_dummy.
185         * intrinsic.c (get_intrinsic_dummy_arg): New.
186         (sort_actual):  Add argument vectors.
187         Use loops with indices on argument vectors.
188         Initialize associated_dummy.
190 2021-11-16  Mikael Morin  <mikael@gcc.gnu.org>
192         * intrinsic.c (sort_actual): initialise variable and use it earlier.
194 2021-11-15  Tobias Burnus  <tobias@codesourcery.com>
196         * openmp.c (OMP_TARGET_CLAUSES): Add thread_limit.
197         * trans-openmp.c (gfc_split_omp_clauses): Add thread_limit also to
198         teams.
200 2021-11-12  Tobias Burnus  <tobias@codesourcery.com>
202         * parse.c (decode_omp_directive): Fix permitting 'nowait' for some
203         combined directives, add missing 'omp end ... loop'.
204         (gfc_ascii_statement): Fix ST_OMP_END_TEAMS_LOOP result.
205         * openmp.c (resolve_omp_clauses): Add missing combined loop constructs
206         case values to the 'if(directive-name: ...)' check.
207         * trans-openmp.c (gfc_split_omp_clauses): Put nowait on target if
208         first leaf construct accepting it.
210 2021-11-12  Martin Jambor  <mjambor@suse.cz>
212         * trans-types.c (gfc_get_array_descr_info): Use build_debug_expr_decl
213         instead of building DEBUG_EXPR_DECL manually.
215 2021-11-12  Mikael Morin  <mikael@gcc.gnu.org>
217         PR fortran/97896
218         * intrinsic.c (add_sym_4ind): Remove.
219         (add_functions): Use add_sym4 instead of add_sym4ind.
220         Don’t special case the index intrinsic.
221         * iresolve.c (gfc_resolve_index_func): Use the individual arguments
222         directly instead of the full argument list.
223         * intrinsic.h (gfc_resolve_index_func): Update the declaration
224         accordingly.
225         * trans-decl.c (gfc_get_extern_function_decl): Don’t modify the
226         list of arguments in the case of the index intrinsic.
227         * trans-array.h (gfc_get_intrinsic_for_expr,
228         gfc_get_proc_ifc_for_expr): New.
229         * trans-array.c (gfc_get_intrinsic_for_expr,
230         arg_evaluated_for_scalarization): New.
231         (gfc_walk_elemental_function_args): Add intrinsic procedure
232         as argument.  Count arguments.  Check arg_evaluated_for_scalarization.
233         * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
234         * trans-stmt.c (get_intrinsic_for_code): New.
235         (gfc_trans_call): Update call.
237 2021-11-12  Jakub Jelinek  <jakub@redhat.com>
239         * types.def (BT_FN_VOID_UINT_UINT): Remove.
240         (BT_FN_BOOL_UINT_UINT_UINT_BOOL): New.
242 2021-11-11  Tobias Burnus  <tobias@codesourcery.com>
244         * gfortran.h (struct gfc_omp_clauses): Rename num_teams to
245         num_teams_upper, add num_teams_upper.
246         * dump-parse-tree.c (show_omp_clauses): Update to handle
247         lower-bound num_teams clause.
248         * frontend-passes.c (gfc_code_walker): Likewise
249         * openmp.c (gfc_free_omp_clauses, gfc_match_omp_clauses,
250         resolve_omp_clauses): Likewise.
251         * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses,
252         gfc_trans_omp_target): Likewise.
254 2021-11-11  Jakub Jelinek  <jakub@redhat.com>
256         * trans-openmp.c (gfc_trans_omp_clauses): Use
257         OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of OMP_CLAUSE_NUM_TEAMS_EXPR.
259 2021-11-10  Harald Anlauf  <anlauf@gmx.de>
261         PR fortran/103137
262         PR fortran/103138
263         * check.c (gfc_check_shape): Avoid NULL pointer dereference on
264         missing ref.
265         * simplify.c (gfc_simplify_cshift): Avoid NULL pointer dereference
266         when shape not set.
267         (gfc_simplify_transpose): Likewise.
269 2021-11-09  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
271         PR fortran/68800
272         * class.c (generate_finalization_wrapper): Do not leak
273         finalization wrappers if they will not be used.
274         * expr.c (gfc_free_actual_arglist): Formatting fix.
275         * gfortran.h (gfc_free_symbol): Pass argument by reference.
276         (gfc_release_symbol): Likewise.
277         (gfc_free_namespace): Likewise.
278         * symbol.c (gfc_release_symbol): Adjust acordingly.
279         (free_components): Set procedure pointer components
280         of derived types to NULL after freeing.
281         (free_tb_tree): Likewise.
282         (gfc_free_symbol): Set sym to NULL after freeing.
283         (gfc_free_namespace): Set namespace to NULL after freeing.
285 2021-11-09  Martin Liska  <mliska@suse.cz>
287         * symbol.c (gfc_get_ultimate_derived_super_type): Remove.
289 2021-11-09  Aldy Hernandez  <aldyh@redhat.com>
291         * misc.c (gfc_dummy_typename): Make sure ts->kind is
292         non-negative.
294 2021-11-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
296         * intrinsic.c (add_subroutines): Change keyword "operator"
297         to the correct one, "operation".
298         * check.c (gfc_check_co_reduce): Change OPERATOR to
299         OPERATION in error messages.
300         * intrinsic.texi: Change OPERATOR to OPERATION in
301         documentation.
303 2021-11-07  Sandra Loosemore  <sandra@codesourcery.com>
305         * interface.c (gfc_compare_actual_formal): Continue checking
306         all arguments after encountering an error.
307         * intrinsic.c (do_ts29113_check): Likewise.
308         * resolve.c (resolve_operator): Continue resolving on op2 error.
310 2021-11-06  Harald Anlauf  <anlauf@gmx.de>
312         PR fortran/102715
313         * decl.c (add_init_expr_to_sym): Reject rank mismatch between
314         array and its initializer.
316 2021-11-05  Harald Anlauf  <anlauf@gmx.de>
318         PR fortran/102817
319         * expr.c (simplify_parameter_variable): Copy shape of referenced
320         subobject when simplifying.
322 2021-11-05  Harald Anlauf  <anlauf@gmx.de>
324         PR fortran/69419
325         * match.c (gfc_match_common): Check array spec of a symbol in a
326         COMMON object list and reject it if it is a coarray.
328 2021-11-05  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
330         PR fortran/100972
331         * decl.c (gfc_match_implicit_none): Fix typo in warning.
332         * resolve.c (resolve_unknown_f): Reject external procedures
333         without explicit EXTERNAL attribute whe IMPLICIT none (external)
334         is in effect.
336 2021-11-05  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
338         * decl.c (gfc_insert_kind_parameter_exprs): Make static.
339         * expr.c (gfc_build_init_expr): Make static
340         (gfc_build_default_init_expr): Move below its static helper.
341         * gfortran.h (gfc_insert_kind_parameter_exprs, gfc_add_saved_common,
342         gfc_add_common, gfc_use_derived_tree, gfc_free_charlen,
343         gfc_get_ultimate_derived_super_type,
344         gfc_resolve_oacc_parallel_loop_blocks, gfc_build_init_expr,
345         gfc_iso_c_sub_interface): Delete.
346         * symbol.c (gfc_new_charlen, gfc_get_derived_super_type): Make
347         static.
349 2021-11-05  Sandra Loosemore  <sandra@codesourcery.com>
351         PR fortran/35276
352         * gfortran.texi (Mixed-Language Programming): Talk about C++,
353         and how to link.
355 2021-11-04  Sandra Loosemore  <sandra@codesourcery.com>
357         * gfortran.texi (Projects): Add bullet for helping with
358         incomplete standards compliance.
359         (Proposed Extensions): Delete section.
361 2021-11-04  Sandra Loosemore  <sandra@codesourcery.com>
363         * intrinsic.texi (Introduction to Intrinsics): Genericize
364         references to standard versions.
365         * invoke.texi (-fall-intrinsics): Likewise.
366         (-fmax-identifier-length=): Likewise.
368 2021-11-04  Sandra Loosemore  <sandra@codesourcery.com>
370         * gfortran.texi (Interoperability with C): Copy-editing.  Add
371         more index entries.
372         (Intrinsic Types): Likewise.
373         (Derived Types and struct): Likewise.
374         (Interoperable Global Variables): Likewise.
375         (Interoperable Subroutines and Functions): Likewise.
376         (Working with C Pointers): Likewise.
377         (Further Interoperability of Fortran with C): Likewise.  Rewrite
378         to reflect that this is now fully supported by gfortran.
380 2021-11-04  Sandra Loosemore  <sandra@codesourcery.com>
382         * gfortran.texi (About GNU Fortran): Consolidate material
383         formerly in other sections.  Copy-editing.
384         (Preprocessing and conditional compilation): Delete, moving
385         most material to invoke.texi.
386         (GNU Fortran and G77): Delete.
387         (Project Status): Delete.
388         (Standards): Update.
389         (Fortran 95 status): Mention conditional compilation here.
390         (Fortran 2003 status): Rewrite to mention the 1 missing feature
391         instead of all the ones implemented.
392         (Fortran 2008 status): Similarly for the 2 missing features.
393         (Fortran 2018 status): Rewrite to reflect completion of TS29113
394         feature support.
395         * invoke.texi (Preprocessing Options): Move material formerly
396         in introductory chapter here.
398 2021-11-04  Sandra Loosemore  <sandra@codesourcery.com>
400         * gfortran.texi (Standards): Move discussion of specific
401         standard versions here....
402         (Fortran standards status): ...from here, and delete this node.
404 2021-10-31  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
406         * symbol.c (gfc_get_typebound_proc): Revert memcpy.
408 2021-10-31  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
410         * resolve.c (resolve_fl_procedure): Initialize
411         allocatable_or_pointer.
413 2021-10-30  Manfred Schwarb  <manfred99@gmx.ch>
415         * intrinsic.texi: Remove entries for SHORT and LONG intrinsics.
417 2021-10-30  Manfred Schwarb  <manfred99@gmx.ch>
419         * check.c (gfc_check_intconv): Change error message.
421 2021-10-30  Manfred Schwarb  <manfred99@gmx.ch>
423         * intrinsic.texi (REAL): Fix entries in Specific names table.
425 2021-10-30  Manfred Schwarb  <manfred99@gmx.ch>
427         * intrinsic.texi: Adjust @columnfractions commands to improve
428         appearance for narrow 80 character terminals.
430 2021-10-30  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
432         * parse.c (clean_up_modules): Free gsym.
434 2021-10-30  Harald Anlauf  <anlauf@gmx.de>
436         * gfortran.texi (bug reports): credit Gerhard Steinmetz for
437           numerous bug reports.
439 2021-10-30  Steve Kargl  <kargl@gcc.gnu.org>
441         PR fortran/99853
442         * resolve.c (resolve_select): Generate regular gfc_error on
443         invalid conversions instead of an gfc_internal_error.
445 2021-10-29  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
447         * symbol.c (free_tb_tree): Free type-bound procedure struct.
448         (gfc_get_typebound_proc): Use explicit memcpy for clarity.
450 2021-10-27  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
452         * intrinsic.h (gfc_check_sum, gfc_resolve_atan2d, gfc_resolve_kill,
453         gfc_resolve_kill_sub): Delete declaration.
455 2021-10-27  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
457         * trans-types.h (gfc_convert_function_code): Delete.
459 2021-10-27  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
461         * trans-stmt.h (gfc_trans_deallocate_array): Delete.
463 2021-10-27  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
465         * trans-array.c (gfc_trans_scalarized_loop_end): Make static.
466         * trans-array.h (gfc_trans_scalarized_loop_end,
467         gfc_conv_tmp_ref, gfc_conv_array_transpose): Delete declaration.
469 2021-10-27  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
471         * constructor.c (gfc_constructor_get_base): Make static.
472         (gfc_constructor_expr_foreach, gfc_constructor_swap): Delete.
473         * constructor.h (gfc_constructor_get_base): Remove declaration.
474         (gfc_constructor_expr_foreach, gfc_constructor_swap): Delete.
476 2021-10-27  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
478         * decl.c (gfc_match_old_kind_spec, set_com_block_bind_c,
479         set_verify_bind_c_sym, set_verify_bind_c_com_block,
480         get_bind_c_idents, gfc_match_suffix, gfc_get_type_attr_spec,
481         check_extended_derived_type): Make static.
482         (gfc_match_gcc_unroll): Add comment.
483         * match.c (gfc_match_small_int_expr): Delete definition.
484         * match.h (gfc_match_small_int_expr): Delete declaration.
485         (gfc_match_name_C, gfc_match_old_kind_spec, set_com_block_bind_c,
486         set_verify_bind_c_sym, set_verify_bind_c_com_block,
487         get_bind_c_idents, gfc_match_suffix,
488         gfc_get_type_attr_spec): Delete declaration.
490 2021-10-27  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
492         * expr.c (is_non_empty_structure_constructor): Make static.
493         * gfortran.h (gfc_check_any_c_kind): Delete.
494         * match.c (gfc_match_label): Make static.
495         * match.h (gfc_match_label): Delete declaration.
496         * scanner.c (file_changes_cur, file_changes_count,
497         file_changes_allocated): Make static.
498         * trans-expr.c (gfc_get_character_len): Make static.
499         (gfc_class_len_or_zero_get): Make static.
500         (VTAB_GET_FIELD_GEN): Undefine.
501         (gfc_get_class_array_ref): Make static.
502         (gfc_finish_interface_mapping): Make static.
503         * trans-types.c (gfc_check_any_c_kind): Delete.
504         (pfunc_type_node, dtype_type_node, gfc_get_ppc_type): Make static.
505         * trans-types.h (gfc_get_ppc_type): Delete declaration.
506         * trans.c (gfc_msg_wrong_return): Delete.
507         * trans.h (gfc_class_len_or_zero_get, gfc_class_vtab_extends_get,
508         gfc_vptr_extends_get, gfc_get_class_array_ref, gfc_get_character_len,
509         gfc_finish_interface_mapping, gfc_msg_wrong_return,
510         gfc_get_function_decl): Delete declaration.
512 2021-10-27  Tobias Burnus  <tobias@codesourcery.com>
514         * trans-stmt.c (gfc_trans_select_rank_cases): Fix condition
515         for allocatables/pointers.
517 2021-10-26  Harald Anlauf  <anlauf@gmx.de>
519         PR fortran/102956
520         * symbol.c (gfc_check_conflict): Add conflict check for PDT KIND
521         and LEN type parameters.
523 2021-10-26  Harald Anlauf  <anlauf@gmx.de>
525         PR fortran/102917
526         * decl.c (match_attr_spec): Remove invalid integer kind checks on
527         KIND and LEN attributes of PDTs.
529 2021-10-26  Harald Anlauf  <anlauf@gmx.de>
531         PR fortran/102816
532         * resolve.c (resolve_structure_cons): Reject invalid array spec of
533         a DT component referenced in a structure constructor.
535 2021-10-26  Tobias Burnus  <tobias@codesourcery.com>
537         PR fortran/102885
538         * trans-decl.c (gfc_conv_cfi_to_gfc): Properly handle nonconstant
539         character lenghts.
541 2021-10-25  Andrew MacLeod  <amacleod@redhat.com>
543         * trans-decl.c (gfc_conv_cfi_to_gfc): Initialize rank to NULL_TREE.
545 2021-10-22  Eric Gallager  <egallager@gcc.gnu.org>
547         PR other/102663
548         * Make-lang.in: Allow dvi-formatted documentation
549         to be installed.
551 2021-10-22  Tobias Burnus  <tobias@codesourcery.com>
553         PR fortran/92621
554         * trans-expr.c (gfc_trans_assignment_1): Add STRIP_NOPS.
556 2021-10-21  Chung-Lin Tang  <cltang@codesourcery.com>
558         * decl.c (gfc_match_end): Add COMP_OMP_STRICTLY_STRUCTURED_BLOCK case
559         together with COMP_BLOCK.
560         * parse.c (parse_omp_structured_block): Change return type to
561         'gfc_statement', add handling for strictly-structured block case, adjust
562         recursive calls to parse_omp_structured_block.
563         (parse_executable): Adjust calls to parse_omp_structured_block.
564         * parse.h (enum gfc_compile_state): Add
565         COMP_OMP_STRICTLY_STRUCTURED_BLOCK.
566         * trans-openmp.c (gfc_trans_omp_workshare): Add EXEC_BLOCK case
567         handling.
569 2021-10-21  Sandra Loosemore  <sandra@codesourcery.com>
571         PR fortran/94070
572         * expr.c (gfc_simplify_expr): Handle GFC_ISYM_SHAPE along with
573         GFC_ISYM_LBOUND and GFC_ISYM_UBOUND.
574         * trans-array.c (gfc_conv_ss_startstride): Likewise.
575         (set_loop_bounds): Likewise.
576         * trans-intrinsic.c (gfc_trans_intrinsic_bound): Extend to
577         handle SHAPE.  Correct logic for zero-size special cases and
578         detecting assumed-rank arrays associated with an assumed-size
579         argument.
580         (gfc_conv_intrinsic_shape): Deleted.
581         (gfc_conv_intrinsic_function): Handle GFC_ISYM_SHAPE like
582         GFC_ISYM_LBOUND and GFC_ISYM_UBOUND.
583         (gfc_add_intrinsic_ss_code): Likewise.
584         (gfc_walk_intrinsic_bound): Likewise.
586 2021-10-20  Chung-Lin Tang  <cltang@codesourcery.com>
588         * openmp.c (gfc_match_omp_clause_reduction): Add 'openmp_target' default
589         false parameter. Add 'always,tofrom' map for OMP_LIST_IN_REDUCTION case.
590         (gfc_match_omp_clauses): Add 'openmp_target' default false parameter,
591         adjust call to gfc_match_omp_clause_reduction.
592         (match_omp): Adjust call to gfc_match_omp_clauses
593         * trans-openmp.c (gfc_trans_omp_taskgroup): Add call to
594         gfc_match_omp_clause, create and return block.
596 2021-10-19  Tobias Burnus  <tobias@codesourcery.com>
598         * trans-types.c (create_fn_spec): For allocatable/pointer
599         character(len=:), use 'w' not 'R' as fn spec for the length dummy
600         argument.
602 2021-10-19  Tobias Burnus  <tobias@codesourcery.com>
604         PR fortran/92482
605         * trans-expr.c (gfc_conv_procedure_call): Use TREE_OPERAND not
606         build_fold_indirect_ref_loc to undo an ADDR_EXPR.
608 2021-10-18  Tobias Burnus  <tobias@codesourcery.com>
610         PR fortran/102086
611         PR fortran/92189
612         PR fortran/92621
613         PR fortran/101308
614         PR fortran/101309
615         PR fortran/101635
616         PR fortran/92482
617         * decl.c (gfc_verify_c_interop_param): Remove 'sorry' for
618         scalar allocatable/pointer and len=*.
619         * expr.c (is_CFI_desc): Return true for for those.
620         * gfortran.h (CFI_type_kind_shift, CFI_type_mask,
621         CFI_type_from_type_kind, CFI_VERSION, CFI_MAX_RANK,
622         CFI_attribute_pointer, CFI_attribute_allocatable,
623         CFI_attribute_other, CFI_type_Integer, CFI_type_Logical,
624         CFI_type_Real, CFI_type_Complex, CFI_type_Character,
625         CFI_type_ucs4_char, CFI_type_struct, CFI_type_cptr,
626         CFI_type_cfunptr, CFI_type_other): New #define.
627         * trans-array.c (CFI_FIELD_BASE_ADDR, CFI_FIELD_ELEM_LEN,
628         CFI_FIELD_VERSION, CFI_FIELD_RANK, CFI_FIELD_ATTRIBUTE,
629         CFI_FIELD_TYPE, CFI_FIELD_DIM, CFI_DIM_FIELD_LOWER_BOUND,
630         CFI_DIM_FIELD_EXTENT, CFI_DIM_FIELD_SM,
631         gfc_get_cfi_descriptor_field, gfc_get_cfi_desc_base_addr,
632         gfc_get_cfi_desc_elem_len, gfc_get_cfi_desc_version,
633         gfc_get_cfi_desc_rank, gfc_get_cfi_desc_type,
634         gfc_get_cfi_desc_attribute, gfc_get_cfi_dim_item,
635         gfc_get_cfi_dim_lbound, gfc_get_cfi_dim_extent, gfc_get_cfi_dim_sm):
636         New define/functions to access the CFI array descriptor.
637         (gfc_conv_descriptor_type): New function for the GFC descriptor.
638         (gfc_get_array_span): Handle expr of CFI descriptors and
639         assumed-type descriptors.
640         (gfc_trans_array_bounds): Remove 'static'.
641         (gfc_conv_expr_descriptor): For assumed type, use the dtype of
642         the actual argument.
643         (structure_alloc_comps): Remove ' ' inside tabs.
644         * trans-array.h (gfc_trans_array_bounds, gfc_conv_descriptor_type,
645         gfc_get_cfi_desc_base_addr, gfc_get_cfi_desc_elem_len,
646         gfc_get_cfi_desc_version, gfc_get_cfi_desc_rank,
647         gfc_get_cfi_desc_type, gfc_get_cfi_desc_attribute,
648         gfc_get_cfi_dim_lbound, gfc_get_cfi_dim_extent, gfc_get_cfi_dim_sm):
649         New prototypes.
650         * trans-decl.c (gfor_fndecl_cfi_to_gfc, gfor_fndecl_gfc_to_cfi):
651         Remove global vars.
652         (gfc_build_builtin_function_decls): Remove their initialization.
653         (gfc_get_symbol_decl, create_function_arglist,
654         gfc_trans_deferred_vars): Update for CFI.
655         (convert_CFI_desc): Remove and replace by ...
656         (gfc_conv_cfi_to_gfc): ... this function
657         (gfc_generate_function_code): Call it; create local GFC var for CFI.
658         * trans-expr.c (gfc_maybe_dereference_var): Handle CFI.
659         (gfc_conv_subref_array_arg): Handle the if-noncontigous-only copy in
660         when the result should be a descriptor.
661         (gfc_conv_gfc_desc_to_cfi_desc): Completely rewritten.
662         (gfc_conv_procedure_call): CFI fixes.
663         * trans-openmp.c (gfc_omp_is_optional_argument,
664         gfc_omp_check_optional_argument): Handle optional
665         CFI.
666         * trans-stmt.c (gfc_trans_select_rank_cases): Cleanup, avoid invalid
667         code for allocatable/pointer dummies, which cannot be assumed size.
668         * trans-types.c (gfc_cfi_descriptor_base): New global var.
669         (gfc_get_dtype_rank_type): Skip rank init for rank < 0.
670         (gfc_sym_type): Handle CFI dummies.
671         (gfc_get_function_type): Update call.
672         (gfc_get_cfi_dim_type, gfc_get_cfi_type): New.
673         * trans-types.h (gfc_sym_type): Update prototype.
674         (gfc_get_cfi_type): New prototype.
675         * trans.c (gfc_trans_runtime_check): Make conditions more consistent
676         to avoid '<logical> AND_THEN <long int>' in conditions.
677         * trans.h (gfor_fndecl_cfi_to_gfc, gfor_fndecl_gfc_to_cfi): Remove
678         global-var declaration.
680 2021-10-18  Tobias Burnus  <tobias@codesourcery.com>
682         PR fortran/102745
683         * intrinsic.c (gfc_convert_type_warn): Fix checks by checking CLASS
684         and do typcheck in correct order for type extension.
685         * misc.c (gfc_typename): Print proper not internal CLASS type name.
687 2021-10-15  Harald Anlauf  <anlauf@gmx.de>
688             Tobias Burnus  <tobias@codesourcery.com>
690         PR fortran/102685
691         * decl.c (match_clist_expr): Set rank/shape of clist initializer
692         to match LHS.
693         * resolve.c (resolve_structure_cons): In a structure constructor,
694         compare shapes of array components against declared shape.
696 2021-10-14  Harald Anlauf  <anlauf@gmx.de>
698         PR fortran/102717
699         * simplify.c (gfc_simplify_reshape): Replace assert by error
700         message for negative elements in SHAPE array.
702 2021-10-14  Harald Anlauf  <anlauf@gmx.de>
704         PR fortran/102716
705         * check.c (gfc_check_shape): Reorder checks so that invalid KIND
706         arguments can be detected.
708 2021-10-14  Kwok Cheung Yeung  <kcy@codesourcery.com>
710         * gfortran.h (enum gfc_statement): Add ST_OMP_DECLARE_VARIANT.
711         (enum gfc_omp_trait_property_kind): New.
712         (struct gfc_omp_trait_property): New.
713         (gfc_get_omp_trait_property): New macro.
714         (struct gfc_omp_selector): New.
715         (gfc_get_omp_selector): New macro.
716         (struct gfc_omp_set_selector): New.
717         (gfc_get_omp_set_selector): New macro.
718         (struct gfc_omp_declare_variant): New.
719         (gfc_get_omp_declare_variant): New macro.
720         (struct gfc_namespace): Add omp_declare_variant field.
721         (gfc_free_omp_declare_variant_list): New prototype.
722         * match.h (gfc_match_omp_declare_variant): New prototype.
723         * openmp.c (gfc_free_omp_trait_property_list): New.
724         (gfc_free_omp_selector_list): New.
725         (gfc_free_omp_set_selector_list): New.
726         (gfc_free_omp_declare_variant_list): New.
727         (gfc_match_omp_clauses): Add extra optional argument.  Handle end of
728         clauses for context selectors.
729         (omp_construct_selectors, omp_device_selectors,
730         omp_implementation_selectors, omp_user_selectors): New.
731         (gfc_match_omp_context_selector): New.
732         (gfc_match_omp_context_selector_specification): New.
733         (gfc_match_omp_declare_variant): New.
734         * parse.c: Include tree-core.h and omp-general.h.
735         (decode_omp_directive): Handle 'declare variant'.
736         (case_omp_decl): Include ST_OMP_DECLARE_VARIANT.
737         (gfc_ascii_statement): Handle ST_OMP_DECLARE_VARIANT.
738         (gfc_parse_file): Initialize omp_requires_mask.
739         * symbol.c (gfc_free_namespace): Call
740         gfc_free_omp_declare_variant_list.
741         * trans-decl.c (gfc_get_extern_function_decl): Call
742         gfc_trans_omp_declare_variant.
743         (gfc_create_function_decl): Call gfc_trans_omp_declare_variant.
744         * trans-openmp.c (gfc_trans_omp_declare_variant): New.
745         * trans-stmt.h (gfc_trans_omp_declare_variant): New prototype.
747 2021-10-13  Tobias Burnus  <tobias@codesourcery.com>
749         * dump-parse-tree.c (show_omp_clauses): Handle ancestor modifier,
750         avoid ICE for GFC_OMP_ATOMIC_SWAP.
751         * gfortran.h (gfc_omp_clauses): Change 'anecestor' into a bitfield.
753 2021-10-12  Tobias Burnus  <tobias@codesourcery.com>
755         PR fortran/102541
756         * check.c (gfc_check_present): Handle optional CLASS.
757         * interface.c (gfc_compare_actual_formal): Likewise.
758         * trans-array.c (gfc_trans_g77_array): Likewise.
759         * trans-decl.c (gfc_build_dummy_array_decl): Likewise.
760         * trans-types.c (gfc_sym_type): Likewise.
761         * primary.c (gfc_variable_attr): Fixes for dummy and
762         pointer when 'class%_data' is passed.
763         * trans-expr.c (set_dtype_for_unallocated, gfc_conv_procedure_call):
764         For assumed-rank dummy, fix setting rank for dealloc/notassoc actual
765         and setting ubound to -1 for assumed-size actuals.
767 2021-10-10  Harald Anlauf  <anlauf@gmx.de>
769         PR fortran/99348
770         PR fortran/102521
771         * decl.c (add_init_expr_to_sym): Extend initialization of
772         parameter arrays from scalars to handle derived types.
774 2021-10-09  Harald Anlauf  <anlauf@gmx.de>
776         PR fortran/65454
777         * module.c (read_module): Handle old and new-style relational
778         operators when used in USE module, ONLY: OPERATOR(op).
780 2021-10-08  Sandra Loosemore  <sandra@codesourcery.com>
782         PR fortran/54753
783         * interface.c (gfc_compare_actual_formal): Add diagnostic
784         for F2018:C839.  Refactor shared code and fix bugs with class
785         array info lookup, and extend similar diagnostic from PR94110
786         to also cover class types.
788 2021-10-08  Martin Liska  <mliska@suse.cz>
790         * options.c (gfc_post_options): Use new macro
791         OPTION_SET_P.
793 2021-10-06  Tobias Burnus  <tobias@codesourcery.com>
795         * resolve.c (resolve_values): Only show
796         deprecated warning if attr.referenced.
798 2021-10-04  Tobias Burnus  <tobias@codesourcery.com>
800         PR fortran/54753
801         * resolve.c (can_generate_init, resolve_fl_variable_derived,
802         resolve_symbol): Only do initialization with intent(out) if not
803         inside of an interface block.
805 2021-10-01  Martin Sebor  <msebor@redhat.com>
807         PR c/102103
808         * array.c: Remove an unnecessary test.
809         * trans-array.c: Same.
811 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
813         * gfortran.h (gfc_omp_clauses): Add order_reproducible bitfield.
814         * dump-parse-tree.c (show_omp_clauses): Print REPRODUCIBLE: for it.
815         * openmp.c (gfc_match_omp_clauses): Set order_reproducible for
816         explicit reproducible: modifier.
817         * trans-openmp.c (gfc_trans_omp_clauses): Set
818         OMP_CLAUSE_ORDER_REPRODUCIBLE for order_reproducible.
819         (gfc_split_omp_clauses): Also copy order_reproducible.
821 2021-09-30  Harald Anlauf  <anlauf@gmx.de>
823         PR fortran/102458
824         * simplify.c (simplify_size): Resolve expressions used in array
825         specifications so that SIZE can be simplified.
827 2021-09-30  Harald Anlauf  <anlauf@gmx.de>
829         * expr.c: The correct reference to Fortran standard is: F2018:10.1.12.
831 2021-09-30  Tobias Burnus  <tobias@codesourcery.com>
833         PR fortran/71703
834         PR fortran/84007
835         * trans-intrinsic.c (gfc_conv_same_type_as): Fix handling
836         of UNLIMITED_POLY.
837         * trans.h (gfc_vtpr_hash_get): Renamed prototype to ...
838         (gfc_vptr_hash_get): ... this to match function name.
840 2021-09-29  Harald Anlauf  <anlauf@gmx.de>
842         PR fortran/102520
843         * array.c (expand_constructor): Do not dereference NULL pointer.
845 2021-09-27  Tobias Burnus  <tobias@codesourcery.com>
847         PR fortran/94070
848         * trans-array.c (gfc_tree_array_size): New function to
849         find size inline (whole array or one dimension).
850         (array_parameter_size): Use it, take stmt_block as arg.
851         (gfc_conv_array_parameter): Update call.
852         * trans-array.h (gfc_tree_array_size): Add prototype.
853         * trans-decl.c (gfor_fndecl_size0, gfor_fndecl_size1): Remove
854         these global vars.
855         (gfc_build_intrinsic_function_decls): Remove their initialization.
856         * trans-expr.c (gfc_conv_procedure_call): Update
857         bounds of pointer/allocatable actual args to nonallocatable/nonpointer
858         dummies to be one based.
859         * trans-intrinsic.c (gfc_conv_intrinsic_shape): Fix case for
860         assumed rank with allocatable/pointer dummy.
861         (gfc_conv_intrinsic_size): Update to use inline function.
862         * trans.h (gfor_fndecl_size0, gfor_fndecl_size1): Remove var decl.
864 2021-09-26  Tobias Burnus  <tobias@codesourcery.com>
866         PR fortran/101334
867         * trans-intrinsic.c (gfc_conv_associated): Support assumed-rank
868         'pointer' with scalar/array 'target' argument.
870 2021-09-24  Harald Anlauf  <anlauf@gmx.de>
872         PR fortran/102458
873         * expr.c (is_non_constant_intrinsic): Check for intrinsics
874         excluded in constant expressions (F2018:10.1.2).
875         (gfc_is_constant_expr): Use that check.
877 2021-09-24  Sandra Loosemore  <sandra@codesourcery.com>
879         PR fortran/101333
880         * interface.c (compare_parameter): Enforce F2018 C711.
882 2021-09-24  Tobias Burnus  <tobias@codesourcery.com>
884         PR fortran/55534
885         * scanner.c (load_file): Return void, call (gfc_)fatal_error for
886         all errors.
887         (include_line, include_stmt, gfc_new_file): Remove exit call
888         for failed load_file run.
890 2021-09-23  Sandra Loosemore  <sandra@codesourcery.com>
892         PR fortran/101320
893         * decl.c (gfc_verify_c_interop_param): Handle F2018 C1557,
894         aka TS29113 C516.
896 2021-09-23  Harald Anlauf  <anlauf@gmx.de>
897             Tobias Burnus  <tobias@codesourcery.com>
899         PR fortran/93834
900         * trans-intrinsic.c (gfc_conv_allocated): Cleanup. Handle
901         coindexed scalar coarrays.
903 2021-09-23  Sandra Loosemore  <sandra@codesourcery.com>
905         PR fortran/101319
906         * interface.c (gfc_compare_actual_formal): Extend existing
907         assumed-type diagnostic to also check for argument with type
908         parameters.
910 2021-09-23  Sandra Loosemore  <sandra@codesourcery.com>
912         PR fortran/101334
913         * check.c (gfc_check_associated): Allow an assumed-rank
914         array for the pointer argument.
915         * interface.c (compare_parameter): Also give rank mismatch
916         error on assumed-rank array.
918 2021-09-23  Sandra Loosemore  <sandra@codesourcery.com>
920         * trans-stmt.c (trans_associate_var): Check that result of
921         GFC_DECL_SAVED_DESCRIPTOR is not null before using it.
923 2021-09-22  Tobias Burnus  <tobias@codesourcery.com>
925         PR fortran/55534
926         * cpp.c (gfc_cpp_register_include_paths, gfc_cpp_post_options):
927         Add new bool verbose_missing_dir_warn argument.
928         * cpp.h (gfc_cpp_post_options): Update prototype.
929         * f95-lang.c (gfc_init): Remove duplicated file-not found diag.
930         * gfortran.h (gfc_check_include_dirs): Takes bool
931         verbose_missing_dir_warn arg.
932         (gfc_new_file): Returns now void.
933         * options.c (gfc_post_options): Update to warn for -I and -J,
934         only, by default but for all when user requested.
935         * scanner.c (gfc_do_check_include_dir):
936         (gfc_do_check_include_dirs, gfc_check_include_dirs): Take bool
937         verbose warn arg and update to avoid printing the same message
938         twice or never.
939         (load_file): Fix indent.
940         (gfc_new_file): Return void and exit when load_file failed
941         as all other load_file users do.
943 2021-09-22  Tobias Burnus  <tobias@codesourcery.com>
945         * trans-expr.c (gfc_simple_for_loop): New.
946         * trans.h (gfc_simple_for_loop): New prototype.
948 2021-09-21  Tobias Burnus  <tobias@codesourcery.com>
950         PR fortran/55534
951         * cpp.c: Define GCC_C_COMMON_C for #include "options.h" to make
952         cpp_reason_option_codes available.
953         (gfc_cpp_register_include_paths): Make static, set pfile's
954         warn_missing_include_dirs and move before caller.
955         (gfc_cpp_init_cb): New, cb code moved from ...
956         (gfc_cpp_init_0): ... here.
957         (gfc_cpp_post_options): Call gfc_cpp_init_cb.
958         (cb_cpp_diagnostic_cpp_option): New. As implemented in c-family
959         to match CppReason flags to -W... names.
960         (cb_cpp_diagnostic): Use it to replace single special case.
961         * cpp.h (gfc_cpp_register_include_paths): Remove as now static.
962         * gfortran.h (gfc_check_include_dirs): New prototype.
963         (gfc_add_include_path): Add new bool arg.
964         * options.c (gfc_init_options): Don't set -Wmissing-include-dirs.
965         (gfc_post_options): Set it here after commandline processing. Call
966         gfc_add_include_path with defer_warn=false.
967         (gfc_handle_option): Call it with defer_warn=true.
968         * scanner.c (gfc_do_check_include_dir, gfc_do_check_include_dirs,
969         gfc_check_include_dirs): New. Diagnostic moved from ...
970         (add_path_to_list): ... here, which came before cmdline processing.
971         Take additional bool defer_warn argument.
972         (gfc_add_include_path): Take additional defer_warn arg.
973         * scanner.h (struct gfc_directorylist): Reorder for alignment issues,
974         add new 'bool warn'.
976 2021-09-20  Tobias Burnus  <tobias@codesourcery.com>
978         * gfortran.h (gfc_omp_clauses): Add order_unconstrained.
979         * dump-parse-tree.c (show_omp_clauses): Dump it.
980         * openmp.c (gfc_match_omp_clauses): Match unconstrained/reproducible
981         modifiers to ordered(concurrent).
982         (OMP_DISTRIBUTE_CLAUSES): Accept ordered clause.
983         (resolve_omp_clauses): Reject ordered + order on same directive.
984         * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses): Pass
985         on unconstrained modifier of ordered(concurrent).
987 2021-09-17  Harald Anlauf  <anlauf@gmx.de>
989         PR fortran/102366
990         * trans-decl.c (gfc_finish_var_decl): Disable the warning message
991         for variables moved from stack to static storange if they are
992         declared in the main, but allow the move to happen.
994 2021-09-17  Sandra Loosemore  <sandra@codesourcery.com>
996         * intrinsic.texi (ISO_C_BINDING): Change C_FLOAT128 to correspond
997         to _Float128 rather than __float128.
998         * iso-c-binding.def (c_float128): Update comments.
999         * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Likewise.
1000         (build_round_expr): Likewise.
1001         (gfc_build_intrinsic_lib_fndcecls): Likewise.
1002         * trans-types.h (gfc_real16_is_float128): Likewise.
1004 2021-09-16  Harald Anlauf  <anlauf@gmx.de>
1006         PR fortran/102287
1007         * trans-expr.c (gfc_conv_procedure_call): Wrap deallocation of
1008         allocatable components of optional allocatable derived type
1009         procedure arguments with INTENT(OUT) into a presence check.
1011 2021-09-14  Harald Anlauf  <anlauf@gmx.de>
1013         PR fortran/102311
1014         * resolve.c (resolve_entries): Attempt to recover cleanly after
1015         rejecting mismatched function entries.
1017 2021-09-14  Tobias Burnus  <tobias@codesourcery.com>
1019         PR fortran/102313
1020         * parse.c (gfc_ascii_statement): Add missing ST_OMP_END_SCOPE.
1022 2021-09-13  Harald Anlauf  <anlauf@gmx.de>
1024         PR fortran/82314
1025         * decl.c (add_init_expr_to_sym): For proper initialization of
1026         array-valued named constants the array bounds need to be
1027         simplified before adding the initializer.
1029 2021-09-13  Harald Anlauf  <anlauf@gmx.de>
1031         PR fortran/85130
1032         * expr.c (find_substring_ref): Handle given substring start and
1033         end indices as signed integers, not unsigned.
1035 2021-09-09  Harald Anlauf  <anlauf@gmx.de>
1037         PR fortran/98490
1038         * trans-expr.c (gfc_conv_substring): Do not generate substring
1039         bounds check for implied do loop index variable before it actually
1040         becomes defined.
1042 2021-09-08  liuhongt  <hongtao.liu@intel.com>
1044         * options.c (gfc_post_options): Issue an error for
1045         -fexcess-precision=16.
1047 2021-09-07  Harald Anlauf  <anlauf@gmx.de>
1049         PR fortran/101327
1050         * expr.c (find_array_element): When bounds cannot be determined as
1051         constant, return error instead of aborting.
1053 2021-09-07  Marcel Vollweiler  <marcel@codesourcery.com>
1055         * openmp.c (gfc_match_omp_flush): Parse 'seq_cst' clause on 'flush'
1056         directive.
1057         * trans-openmp.c (gfc_trans_omp_flush): Handle OMP_MEMORDER_SEQ_CST.
1059 2021-09-03  Tobias Burnus  <tobias@codesourcery.com>
1061         * decl.c (gfc_verify_c_interop_param): Reject pointer with
1062         CONTIGUOUS attributes as dummy arg. Reject character len > 1
1063         when passed as byte stream.
1065 2021-09-01  Harald Anlauf  <anlauf@gmx.de>
1067         PR fortran/56985
1068         * resolve.c (resolve_common_vars): Fix grammar and improve wording
1069         of error message rejecting an unlimited polymorphic in COMMON.
1071 2021-08-31  Harald Anlauf  <anlauf@gmx.de>
1073         PR fortran/100950
1074         * simplify.c (substring_has_constant_len): Minimize checks for
1075         substring expressions being allowed.
1077 2021-08-31  Marcel Vollweiler  <marcel@codesourcery.com>
1079         * gfortran.h: Add variable for 'ancestor' in struct gfc_omp_clauses.
1080         * openmp.c (gfc_match_omp_clauses): Parse device-modifiers 'device_num'
1081         and 'ancestor' in 'target device' clauses.
1082         * trans-openmp.c (gfc_trans_omp_clauses): Set OMP_CLAUSE_DEVICE_ANCESTOR.
1084 2021-08-30  Harald Anlauf  <anlauf@gmx.de>
1086         PR fortran/102113
1087         * match.c (gfc_match_goto): Allow for whitespace in parsing list
1088         of labels.
1090 2021-08-30  Harald Anlauf  <anlauf@gmx.de>
1092         PR fortran/101349
1093         * resolve.c (resolve_allocate_expr): An unlimited polymorphic
1094         argument to ALLOCATE must be ALLOCATABLE or a POINTER.  Fix the
1095         corresponding check.
1097 2021-08-28  Harald Anlauf  <anlauf@gmx.de>
1099         PR fortran/87737
1100         * resolve.c (resolve_entries): For functions of type CHARACTER
1101         tighten the checks for matching characteristics.
1103 2021-08-25  Lewis Hyatt  <lhyatt@gmail.com>
1105         PR other/93067
1106         * cpp.c (gfc_cpp_post_options): Call new function
1107         diagnostic_initialize_input_context().
1109 2021-08-24  Harald Anlauf  <anlauf@gmx.de>
1111         PR fortran/98411
1112         * trans-decl.c (gfc_finish_var_decl): Adjust check to handle
1113         implicit SAVE as well as variables in the main program.  Improve
1114         warning message text.
1116 2021-08-23  Tobias Burnus  <tobias@codesourcery.com>
1118         * openmp.c (gfc_match_dupl_check, gfc_match_dupl_memorder,
1119         gfc_match_dupl_atomic): New.
1120         (gfc_match_omp_clauses): Use them; remove duplicate
1121         'release'/'relaxed' clause matching; improve error dignostic
1122         for 'default'.
1124 2021-08-23  Tobias Burnus  <tobias@codesourcery.com>
1126         * dump-parse-tree.c (show_omp_clauses): Handle 'strict' modifier
1127         on grainsize/num_tasks
1128         * gfortran.h (gfc_omp_clauses): Add grainsize_strict
1129         and num_tasks_strict.
1130         * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses):
1131         Handle 'strict' modifier on grainsize/num_tasks.
1132         * openmp.c (gfc_match_omp_clauses): Likewise.
1134 2021-08-20  Tobias Burnus  <tobias@codesourcery.com>
1136         * error.c
1137         (error_uinteger): Take 'long long unsigned' instead
1138         of 'long unsigned' as argumpent.
1139         (error_integer): Take 'long long' instead of 'long'.
1140         (error_hwuint, error_hwint): New.
1141         (error_print): Update to handle 'll' and 'w'
1142         length modifiers.
1143         * simplify.c (substring_has_constant_len): Use '%wd'
1144         in gfc_error.
1146 2021-08-20  Harald Anlauf  <anlauf@gmx.de>
1148         PR fortran/100950
1149         * simplify.c (substring_has_constant_len): Fix format string of
1150         gfc_error, pass HOST_WIDE_INT bounds values via char buffer.
1152 2021-08-20  Tobias Burnus  <tobias@codesourcery.com>
1154         * dump-parse-tree.c (show_omp_clauses): Handle 'at', 'severity'
1155         and 'message' clauses.
1156         (show_omp_node, show_code_node): Handle EXEC_OMP_ERROR.
1157         * gfortran.h (gfc_statement): Add ST_OMP_ERROR.
1158         (gfc_omp_severity_type, gfc_omp_at_type): New.
1159         (gfc_omp_clauses): Add 'at', 'severity' and 'message' clause;
1160         use more bitfields + ENUM_BITFIELD.
1161         (gfc_exec_op): Add EXEC_OMP_ERROR.
1162         * match.h (gfc_match_omp_error): New.
1163         * openmp.c (enum omp_mask1): Add OMP_CLAUSE_(AT,SEVERITY,MESSAGE).
1164         (gfc_match_omp_clauses): Handle new clauses.
1165         (OMP_ERROR_CLAUSES, gfc_match_omp_error): New.
1166         (resolve_omp_clauses): Resolve new clauses.
1167         (omp_code_to_statement, gfc_resolve_omp_directive): Handle
1168         EXEC_OMP_ERROR.
1169         * parse.c (decode_omp_directive, next_statement,
1170         gfc_ascii_statement): Handle 'omp error'.
1171         * resolve.c (gfc_resolve_blocks): Likewise.
1172         * st.c (gfc_free_statement): Likewise.
1173         * trans-openmp.c (gfc_trans_omp_error): Likewise.
1174         (gfc_trans_omp_directive): Likewise.
1175         * trans.c (trans_code): Likewise.
1177 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
1179         * types.def (BT_FN_VOID_CONST_PTR_SIZE): New DEF_FUNCTION_TYPE_2.
1180         * f95-lang.c (ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST): Define.
1182 2021-08-19  Harald Anlauf  <anlauf@gmx.de>
1184         PR fortran/100950
1185         * simplify.c (substring_has_constant_len): New.
1186         (gfc_simplify_len): Handle case of substrings with constant
1187         bounds.
1189 2021-08-18  Tobias Burnus  <tobias@codesourcery.com>
1191         * match.h (gfc_match_omp_nothing): New.
1192         * openmp.c (gfc_match_omp_nothing): New.
1193         * parse.c (decode_omp_directive): Match 'nothing' directive.
1195 2021-08-17  Tobias Burnus  <tobias@codesourcery.com>
1197         * dump-parse-tree.c (show_omp_node, show_code_node): Handle
1198         EXEC_OMP_SCOPE.
1199         * gfortran.h (enum gfc_statement): Add ST_OMP_(END_)SCOPE.
1200         (enum gfc_exec_op): Add EXEC_OMP_SCOPE.
1201         * match.h (gfc_match_omp_scope): New.
1202         * openmp.c (OMP_SCOPE_CLAUSES): Define
1203         (gfc_match_omp_scope): New.
1204         (gfc_match_omp_cancellation_point, gfc_match_omp_end_nowait):
1205         Improve error diagnostic.
1206         (omp_code_to_statement): Handle ST_OMP_SCOPE.
1207         (gfc_resolve_omp_directive): Handle EXEC_OMP_SCOPE.
1208         * parse.c (decode_omp_directive, next_statement,
1209         gfc_ascii_statement, parse_omp_structured_block,
1210         parse_executable): Handle OpenMP's scope construct.
1211         * resolve.c (gfc_resolve_blocks): Likewise
1212         * st.c (gfc_free_statement): Likewise
1213         * trans-openmp.c (gfc_trans_omp_scope): New.
1214         (gfc_trans_omp_directive): Call it.
1215         * trans.c (trans_code): handle EXEC_OMP_SCOPE.
1217 2021-08-16  Tobias Burnus  <tobias@codesourcery.com>
1219         * dump-parse-tree.c (show_omp_clauses): Handle 'filter' clause.
1220         (show_omp_node, show_code_node): Handle (combined) omp masked construct.
1221         * frontend-passes.c (gfc_code_walker): Likewise.
1222         * gfortran.h (enum gfc_statement): Add ST_OMP_*_MASKED*.
1223         (enum gfc_exec_op): Add EXEC_OMP_*_MASKED*.
1224         * match.h (gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
1225         gfc_match_omp_masked_taskloop_simd, gfc_match_omp_parallel_masked,
1226         gfc_match_omp_parallel_masked_taskloop,
1227         gfc_match_omp_parallel_masked_taskloop_simd): New prototypes.
1228         * openmp.c (enum omp_mask1): Add OMP_CLAUSE_FILTER.
1229         (gfc_match_omp_clauses): Match it.
1230         (OMP_MASKED_CLAUSES, gfc_match_omp_parallel_masked,
1231         gfc_match_omp_parallel_masked_taskloop,
1232         gfc_match_omp_parallel_masked_taskloop_simd,
1233         gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
1234         gfc_match_omp_masked_taskloop_simd): New.
1235         (resolve_omp_clauses): Resolve filter clause.
1236         (gfc_resolve_omp_parallel_blocks, resolve_omp_do,
1237         omp_code_to_statement, gfc_resolve_omp_directive): Handle
1238         omp masked constructs.
1239         * parse.c (decode_omp_directive, case_exec_markers,
1240         gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
1241         parse_executable): Likewise.
1242         * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
1243         * st.c (gfc_free_statement): Likewise.
1244         * trans-openmp.c (gfc_trans_omp_clauses): Handle filter clause.
1245         (GFC_OMP_SPLIT_MASKED, GFC_OMP_MASK_MASKED): New enum values.
1246         (gfc_trans_omp_masked): New.
1247         (gfc_split_omp_clauses): Handle combined masked directives.
1248         (gfc_trans_omp_master_taskloop): Rename to ...
1249         (gfc_trans_omp_master_masked_taskloop): ... this; handle also
1250         combined masked directives.
1251         (gfc_trans_omp_parallel_master): Rename to ...
1252         (gfc_trans_omp_parallel_master_masked): ... this; handle
1253         combined masked directives.
1254         (gfc_trans_omp_directive): Handle EXEC_OMP_*_MASKED*.
1255         * trans.c (trans_code): Likewise.
1257 2021-08-15  Harald Anlauf  <anlauf@gmx.de>
1259         PR fortran/99351
1260         * match.c (sync_statement): Replace %v code by %e in gfc_match to
1261         allow for function references as STAT and ERRMSG arguments.
1262         * resolve.c (resolve_sync): Adjust checks of STAT= and ERRMSG= to
1263         being definable arguments.  Function references with a data
1264         pointer result are accepted.
1265         * trans-stmt.c (gfc_trans_sync): Adjust assertion.
1267 2021-08-12  Tobias Burnus  <tobias@codesourcery.com>
1269         * gfortran.h (gfc_omp_proc_bind_kind): Add OMP_PROC_BIND_PRIMARY.
1270         * dump-parse-tree.c (show_omp_clauses): Add TODO comment to
1271         change 'master' to 'primary' in proc_bind for OpenMP 5.1.
1272         * intrinsic.texi (OMP_LIB): Mention OpenMP 5.1; add
1273         omp_proc_bind_primary.
1274         * openmp.c (gfc_match_omp_clauses): Accept
1275         'primary' as alias for 'master'.
1276         * trans-openmp.c (gfc_trans_omp_clauses): Handle
1277         OMP_PROC_BIND_PRIMARY.
1279 2021-08-11  Sandra Loosemore  <sandra@codesourcery.com>
1281         * iso-c-binding.def (c_float128, c_float128_complex): Check
1282         float128_type_node instead of gfc_float128_type_node.
1283         * trans-types.c (gfc_init_kinds, gfc_build_real_type):
1284         Update comments re supported 128-bit floating-point types.
1286 2021-08-11  Richard Biener  <rguenther@suse.de>
1288         * trans-common.c (create_common): Set TREE_THIS_VOLATILE on the
1289         COMPONENT_REF if the field is volatile.
1291 2021-08-07  Harald Anlauf  <anlauf@gmx.de>
1293         PR fortran/68568
1294         * primary.c (gfc_expr_attr): Variable attribute can only be
1295         inquired when symtree is non-NULL.
1297 2021-07-28  Harald Anlauf  <anlauf@gmx.de>
1299         PR fortran/101564
1300         * expr.c (gfc_check_vardef_context): Add check for KIND and LEN
1301         parameter inquiries.
1302         * match.c (gfc_match): Fix comment for %v code.
1303         (gfc_match_allocate, gfc_match_deallocate): Replace use of %v code
1304         by %e in gfc_match to allow for function references as STAT and
1305         ERRMSG arguments.
1306         * resolve.c (resolve_allocate_deallocate): Avoid NULL pointer
1307         dereferences and shortcut for bad STAT and ERRMSG argument to
1308         (DE)ALLOCATE.  Remove bogus parts of checks for STAT and ERRMSG.
1310 2021-07-26  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
1311             Tobias Burnus  <tobias@codesourcery.com>
1313         PR fortran/93308
1314         PR fortran/93963
1315         PR fortran/94327
1316         PR fortran/94331
1317         PR fortran/97046
1318         * trans-decl.c (convert_CFI_desc): Only copy out the descriptor
1319         if necessary.
1320         * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Updated attribute
1321         handling which reflect a previous intermediate version of the
1322         standard. Only copy out the descriptor if necessary.
1324 2021-07-23  Harald Anlauf  <anlauf@gmx.de>
1326         PR fortran/101536
1327         * check.c (array_check): Adjust check for the case of CLASS
1328         arrays.
1330 2021-07-21  Thomas Schwinge  <thomas@codesourcery.com>
1331             Joseph Myers  <joseph@codesourcery.com>
1332             Cesar Philippidis  <cesar@codesourcery.com>
1334         * dump-parse-tree.c (show_attr): Update.
1335         * gfortran.h (symbol_attribute): Add 'oacc_routine_nohost' member.
1336         (gfc_omp_clauses): Add 'nohost' member.
1337         * module.c (ab_attribute): Add 'AB_OACC_ROUTINE_NOHOST'.
1338         (attr_bits, mio_symbol_attribute): Update.
1339         * openmp.c (omp_mask2): Add 'OMP_CLAUSE_NOHOST'.
1340         (gfc_match_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1341         (OACC_ROUTINE_CLAUSES): Add 'OMP_CLAUSE_NOHOST'.
1342         (gfc_match_oacc_routine): Update.
1343         * trans-decl.c (add_attributes_to_decl): Update.
1344         * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
1346 2021-07-21  Harald Anlauf  <anlauf@gmx.de>
1348         PR fortran/101514
1349         * target-memory.c (gfc_interpret_derived): Size of array component
1350         of derived type can only be computed here for explicit shape.
1351         * trans-types.c (gfc_get_nodesc_array_type): Do not dereference
1352         NULL pointers.
1354 2021-07-21  Tobias Burnus  <tobias@codesourcery.com>
1356         * decl.c (gfc_verify_c_interop_param): Update for F2008 + F2018
1357         changes; reject unsupported bits with 'Error: Sorry,'.
1358         * trans-expr.c (gfc_conv_procedure_call): Fix condition to
1359         For using CFI descriptor with characters.
1361 2021-07-18  Harald Anlauf  <anlauf@gmx.de>
1363         PR fortran/101084
1364         * io.c (resolve_tag_format): Extend FORMAT check to unknown type.
1366 2021-07-14  Harald Anlauf  <anlauf@gmx.de>
1368         PR fortran/100949
1369         * trans-expr.c (gfc_trans_class_init_assign): Call
1370         gfc_conv_expr_present only for dummy variables.
1372 2021-07-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
1374         PR fortran/100227
1375         * frontend-passes.c (traverse_io_block): Adjust test for
1376         when a variable is eligible for the transformation to
1377         array slice.
1379 2021-06-28  Martin Sebor  <msebor@redhat.com>
1381         * trans-array.c (trans_array_constructor): Replace direct uses
1382         of TREE_NO_WARNING with warning_suppressed_p, and suppress_warning.
1383         * trans-decl.c (gfc_build_qualified_array): Same.
1384         (gfc_build_dummy_array_decl): Same.
1385         (generate_local_decl): Same.
1386         (gfc_generate_function_code): Same.
1387         * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
1388         (gfc_omp_clause_copy_ctor): Same.
1389         * trans-types.c (get_dtype_type_node): Same.
1390         (gfc_get_desc_dim_type): Same.
1391         (gfc_get_array_descriptor_base): Same.
1392         (gfc_get_caf_vector_type): Same.
1393         (gfc_get_caf_reference_type): Same.
1394         * trans.c (gfc_create_var_np): Same.
1396 2021-06-23  Tobias Burnus  <tobias@codesourcery.com>
1398         * dump-parse-tree.c (show_omp_clauses): Fix enum type used
1399         for dumping gfc_omp_defaultmap_category.
1401 2021-06-23  Andre Vehreschild  <vehre@gcc.gnu.org>
1403         PR fortran/100337
1404         * trans-intrinsic.c (conv_co_collective): Check stat for null ptr
1405         before dereferrencing.
1407 2021-06-18  Harald Anlauf  <anlauf@gmx.de>
1409         PR fortran/100283
1410         PR fortran/101123
1411         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Unconditionally
1412         convert result of min/max to result type.
1414 2021-06-16  Harald Anlauf  <anlauf@gmx.de>
1416         PR fortran/95501
1417         PR fortran/95502
1418         * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
1419         dereference.
1420         * match.c (gfc_match_pointer_assignment): Likewise.
1421         * parse.c (gfc_check_do_variable): Avoid comparison with NULL
1422         symtree.
1424 2021-06-16  Harald Anlauf  <anlauf@gmx.de>
1426         Revert:
1427         2021-06-16  Harald Anlauf  <anlauf@gmx.de>
1429         PR fortran/95501
1430         PR fortran/95502
1431         * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
1432         dereference.
1433         * match.c (gfc_match_pointer_assignment): Likewise.
1434         * parse.c (gfc_check_do_variable): Avoid comparison with NULL
1435         symtree.
1437 2021-06-16  Harald Anlauf  <anlauf@gmx.de>
1439         PR fortran/95501
1440         PR fortran/95502
1441         * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
1442         dereference.
1443         * match.c (gfc_match_pointer_assignment): Likewise.
1444         * parse.c (gfc_check_do_variable): Avoid comparison with NULL
1445         symtree.
1447 2021-06-15  Tobias Burnus  <tobias@codesourcery.com>
1449         PR fortran/92568
1450         * dump-parse-tree.c (show_omp_clauses): Update for defaultmap.
1451         * f95-lang.c (LANG_HOOKS_OMP_ALLOCATABLE_P,
1452         LANG_HOOKS_OMP_SCALAR_TARGET_P): New.
1453         * gfortran.h (enum gfc_omp_defaultmap,
1454         enum gfc_omp_defaultmap_category): New.
1455         * openmp.c (gfc_match_omp_clauses): Update defaultmap matching.
1456         * trans-decl.c (gfc_finish_decl_attrs): Set GFC_DECL_SCALAR_TARGET.
1457         * trans-openmp.c (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
1458         (gfc_omp_scalar_p): Take 'ptr_alloc_ok' argument.
1459         (gfc_trans_omp_clauses, gfc_split_omp_clauses): Update for
1460         defaultmap changes.
1461         * trans.h (gfc_omp_scalar_p): Update prototype.
1462         (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
1463         (struct lang_decl): Add scalar_target.
1464         (GFC_DECL_SCALAR_TARGET, GFC_DECL_GET_SCALAR_TARGET): New.
1466 2021-06-14  Tobias Burnus  <tobias@codesourcery.com>
1468         * resolve.c (resolve_variable): Remove *XCNEW used to
1469         nullify nullified memory.
1471 2021-06-09  Martin Liska  <mliska@suse.cz>
1473         * intrinsic.texi: Add missing @headitem to tables with a header.
1475 2021-06-09  Jakub Jelinek  <jakub@redhat.com>
1477         PR fortran/100965
1478         * trans-openmp.c (gfc_omp_finish_clause): Gimplify OMP_CLAUSE_SIZE.
1480 2021-06-08  Tobias Burnus  <tobias@codesourcery.com>
1482         PR middle-end/99928
1483         * trans-openmp.c (gfc_add_clause_implicitly): New.
1484         (gfc_split_omp_clauses): Use it.
1485         (gfc_free_split_omp_clauses): New.
1486         (gfc_trans_omp_do_simd, gfc_trans_omp_parallel_do,
1487         gfc_trans_omp_parallel_do_simd, gfc_trans_omp_distribute,
1488         gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_taskloop,
1489         gfc_trans_omp_master_taskloop, gfc_trans_omp_parallel_master): Use it.
1491 2021-06-08  Martin Liska  <mliska@suse.cz>
1493         * intrinsic.texi: Fix typo.
1494         * trans-expr.c (gfc_trans_pointer_assignment): Likewise.
1496 2021-06-05  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
1498         PR fortran/100120
1499         PR fortran/100816
1500         PR fortran/100818
1501         PR fortran/100819
1502         PR fortran/100821
1503         * trans-array.c (gfc_get_array_span): rework the way character
1504         array "span" was calculated.
1505         (gfc_conv_expr_descriptor): improve handling of character sections
1506         and unlimited polymorphic objects.
1507         * trans-expr.c (gfc_get_character_len): new function to calculate
1508         character string length.
1509         (gfc_get_character_len_in_bytes): new function to calculate
1510         character string length in bytes.
1511         (gfc_conv_scalar_to_descriptor): add call to set the "span".
1512         (gfc_trans_pointer_assignment): set "_len" and antecipate the
1513         initialization of the deferred character length hidden argument.
1514         * trans-intrinsic.c (gfc_conv_associated): set "force_no_tmp" to
1515         avoid the creation of a temporary.
1516         * trans-types.c (gfc_get_dtype_rank_type): rework type detection
1517         so that unlimited polymorphic objects get proper type infomation,
1518         also important for bind(c).
1519         (gfc_get_dtype): add argument to pass the rank if necessary.
1520         (gfc_get_array_type_bounds): cosmetic change to have character
1521         arrays called character instead of unknown.
1522         * trans-types.h (gfc_get_dtype): modify prototype.
1523         * trans.c (get_array_span): rework the way character array "span"
1524         was calculated.
1525         * trans.h (gfc_get_character_len): new prototype.
1526         (gfc_get_character_len_in_bytes): new prototype.
1527         Add "unlimited_polymorphic" flag to "gfc_se" type to signal when
1528         expression carries an unlimited polymorphic object.
1530 2021-06-04  Harald Anlauf  <anlauf@gmx.de>
1532         PR fortran/99839
1533         * frontend-passes.c (inline_matmul_assign): Do not inline matmul
1534         if the assignment to the resulting array if it is not of canonical
1535         type (real/integer/complex/logical).
1537 2021-06-04  Tobias Burnus  <tobias@codesourcery.com>
1539         * dump-parse-tree.c (show_code_node): Handle
1540         EXEC_OMP_(TARGET_)(,PARALLEL_,TEAMS_)LOOP.
1542 2021-06-04  Tobias Burnus  <tobias@codesourcery.com>
1544         * scanner.c (skip_fixed_omp_sentinel): Set openacc_flag if
1545         this is not an (OpenMP) continuation line.
1546         (skip_fixed_oacc_sentinel): Likewise for openmp_flag and OpenACC.
1547         (gfc_next_char_literal): gfc_error_now to force error for mixed OMP/ACC
1548         continuation once per location and return '\n'.
1550 2021-06-04  Tobias Burnus  <tobias@codesourcery.com>
1552         PR middle-end/99928
1553         * openmp.c (gfc_match_omp_clauses): Fix typo in error message.
1555 2021-06-04  Tobias Burnus  <tobias@codesourcery.com>
1557         PR middle-end/99928
1558         * dump-parse-tree.c (show_omp_clauses): Handle bind clause.
1559         (show_omp_node): Handle loop directive.
1560         * frontend-passes.c (gfc_code_walker): Likewise.
1561         * gfortran.h (enum gfc_statement): Add
1562         ST_OMP_(END_)(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
1563         (enum gfc_omp_bind_type): New.
1564         (gfc_omp_clauses): Use it.
1565         (enum gfc_exec_op): Add EXEC_OMP_(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
1566         * match.h (gfc_match_omp_loop, gfc_match_omp_parallel_loop,
1567         gfc_match_omp_target_parallel_loop, gfc_match_omp_target_teams_loop,
1568         gfc_match_omp_teams_loop): New.
1569         * openmp.c (enum omp_mask1): Add OMP_CLAUSE_BIND.
1570         (gfc_match_omp_clauses): Handle it.
1571         (OMP_LOOP_CLAUSES, gfc_match_omp_loop, gfc_match_omp_teams_loop,
1572         gfc_match_omp_target_teams_loop, gfc_match_omp_parallel_loop,
1573         gfc_match_omp_target_parallel_loop): New.
1574         (resolve_omp_clauses, resolve_omp_do, omp_code_to_statement,
1575         gfc_resolve_omp_directive): Handle omp loop.
1576         * parse.c (decode_omp_directive case_exec_markers, gfc_ascii_statement,
1577         parse_omp_do, parse_executable): Likewise.
1578         (parse_omp_structured_block): Remove ST_ which use parse_omp_do.
1579         * resolve.c (gfc_resolve_blocks): Add omp loop.
1580         * st.c (gfc_free_statement): Likewise.
1581         * trans-openmp.c (gfc_trans_omp_clauses): Handle bind clause.
1582         (gfc_trans_omp_do, gfc_trans_omp_parallel_do, gfc_trans_omp_distribute,
1583         gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_directive):
1584         Handle loop directive.
1585         (gfc_split_omp_clauses): Likewise; fix firstprivate/lastprivate
1586         and (in_)reduction for taskloop.
1587         * trans.c (trans_code): Handle omp loop directive.
1589 2021-06-01  Tobias Burnus  <tobias@codesourcery.com>
1591         PR middle-end/99928
1592         * dump-parse-tree.c (show_omp_node, show_code_node): Handle
1593         (parallel) master taskloop (simd).
1594         * frontend-passes.c (gfc_code_walker): Set in_omp_workshare
1595         to false for parallel master taskloop (simd).
1596         * gfortran.h (enum gfc_statement):
1597         Add ST_OMP_(END_)(PARALLEL_)MASTER_TASKLOOP(_SIMD).
1598         (enum gfc_exec_op): EXEC_OMP_(PARALLEL_)MASTER_TASKLOOP(_SIMD).
1599         * match.h (gfc_match_omp_master_taskloop,
1600         gfc_match_omp_master_taskloop_simd,
1601         gfc_match_omp_parallel_master_taskloop,
1602         gfc_match_omp_parallel_master_taskloop_simd): New prototype.
1603         * openmp.c (gfc_match_omp_parallel_master_taskloop,
1604         gfc_match_omp_parallel_master_taskloop_simd,
1605         gfc_match_omp_master_taskloop,
1606         gfc_match_omp_master_taskloop_simd): New.
1607         (gfc_match_omp_taskloop_simd): Permit 'reduction' clause.
1608         (resolve_omp_clauses): Handle new combined directives; remove
1609         inscan-reduction check to reduce multiple errors; add
1610         task-reduction error for 'taskloop simd'.
1611         (gfc_resolve_omp_parallel_blocks,
1612         resolve_omp_do, omp_code_to_statement,
1613         gfc_resolve_omp_directive): Handle new combined constructs.
1614         * parse.c (decode_omp_directive, next_statement,
1615         gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
1616         parse_executable): Likewise.
1617         * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
1618         * st.c (gfc_free_statement): Likewise.
1619         * trans.c (trans_code): Likewise.
1620         * trans-openmp.c (gfc_split_omp_clauses,
1621         gfc_trans_omp_directive): Likewise.
1622         (gfc_trans_omp_parallel_master): Move after gfc_trans_omp_master_taskloop;
1623         handle parallel master taskloop (simd) as well.
1624         (gfc_trans_omp_taskloop): Take gfc_exec_op as arg.
1625         (gfc_trans_omp_master_taskloop): New.
1627 2021-05-30  Gerald Pfeifer  <gerald@pfeifer.com>
1629         * gfortran.texi (BOZ literal constants): Fix typo.
1631 2021-05-28  Tobias Burnus  <tobias@codesourcery.com>
1633         * dump-parse-tree.c (show_iterator): New.
1634         (show_omp_namelist): Handle iterators.
1635         (show_omp_clauses): Handle affinity.
1636         * gfortran.h (gfc_free_omp_namelist): New union with 'udr' and new 'ns'.
1637         * match.c (gfc_free_omp_namelist): Add are to choose union element.
1638         * openmp.c (gfc_free_omp_clauses, gfc_match_omp_detach,
1639         gfc_match_omp_clause_reduction, gfc_match_omp_flush): Update
1640         call to gfc_free_omp_namelist.
1641         (gfc_match_omp_variable_list): Likewise; permit preceeding whitespace.
1642         (enum omp_mask1): Add OMP_CLAUSE_AFFINITY.
1643         (gfc_match_iterator): New.
1644         (gfc_match_omp_clauses): Use it; update call to gfc_free_omp_namelist.
1645         (OMP_TASK_CLAUSES): Add OMP_CLAUSE_AFFINITY.
1646         (gfc_match_omp_taskwait): Match depend clause.
1647         (resolve_omp_clauses): Handle affinity; update for udr/union change.
1648         (gfc_resolve_omp_directive): Resolve clauses of taskwait.
1649         * st.c (gfc_free_statement): Update gfc_free_omp_namelist call.
1650         * trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Likewise
1651         (handle_iterator): New.
1652         (gfc_trans_omp_clauses): Handle iterators for depend/affinity clause.
1653         (gfc_trans_omp_taskwait): Handle depend clause.
1654         (gfc_trans_omp_directive): Update call.
1656 2021-05-27  Harald Anlauf  <anlauf@gmx.de>
1658         PR fortran/100602
1659         * trans-intrinsic.c (gfc_conv_intrinsic_size): Use CLASS data
1660         attributes for CLASS arrays for generation of runtime error.
1662 2021-05-27  Harald Anlauf  <anlauf@gmx.de>
1664         PR fortran/100656
1665         * trans-array.c (gfc_conv_ss_startstride): Do not call check for
1666         presence of a dummy argument when a symbol actually refers to a
1667         non-dummy.
1669 2021-05-25  Tobias Burnus  <tobias@codesourcery.com>
1670             Johannes Nendwich  <a08727063@unet.univie.ac.at>
1672         * intrinsic.texi (GERROR, GETARGS, GETLOG, NORM2, PARITY, RANDOM_INIT,
1673         RANDOM_NUMBER): Fix typos and copy'n'paste errors.
1675 2021-05-24  Tobias Burnus  <tobias@codesourcery.com>
1677         PR fortran/86470
1678         * trans-expr.c (gfc_copy_class_to_class): Add unshare_expr.
1679         * trans-openmp.c (gfc_is_polymorphic_nonptr,
1680         gfc_is_unlimited_polymorphic_nonptr): New.
1681         (gfc_omp_clause_copy_ctor, gfc_omp_clause_dtor): Handle
1682         polymorphic scalars.
1684 2021-05-23  Harald Anlauf  <anlauf@gmx.de>
1686         PR fortran/100551
1687         * trans-expr.c (gfc_conv_procedure_call): Adjust check for
1688         implicit conversion of actual argument to an unlimited polymorphic
1689         procedure argument.
1691 2021-05-23  Tobias Burnus  <tobias@codesourcery.com>
1693         * intrinsic.texi (ATOMIC_ADD, ATOMIC_FETCH_ADD): Use the
1694         proper variable name in the description.
1696 2021-05-22  Andre Vehreschild  <vehre@gcc.gnu.org>
1697             Steve Kargl  <kargl@gcc.gnu.org>
1699         PR fortran/98301
1700         * trans-decl.c (gfc_build_builtin_function_decls): Move decl.
1701         * trans-intrinsic.c (conv_intrinsic_random_init): Use bool for
1702         lib-call of caf_random_init instead of logical (4-byte).
1703         * trans.h: Add tree var for random_init.
1705 2021-05-20  Marcel Vollweiler  <marcel@codesourcery.com>
1707         * openmp.c (gfc_match_omp_clauses): Support map-type-modifier 'close'.
1709 2021-05-18  Tobias Burnus  <tobias@codesourcery.com>
1711         PR fortran/100642
1712         * openmp.c (omp_code_to_statement): Add missing EXEC_OMP_DEPOBJ.
1714 2021-05-17  Harald Anlauf  <anlauf@gmx.de>
1716         PR fortran/98411
1717         * trans-decl.c (gfc_finish_var_decl): Add check for explicit SAVE
1718         attribute.
1720 2021-05-17  Tobias Burnus  <tobias@codesourcery.com>
1722         PR fortran/100633
1723         * resolve.c (gfc_resolve_code): Reject nonintrinsic assignments in
1724         OMP WORKSHARE.
1726 2021-05-14  Tobias Burnus  <tobias@codesourcery.com>
1728         * dump-parse-tree.c (show_omp_node, show_code_node): Handle
1729         EXEC_OMP_PARALLEL_MASTER.
1730         * frontend-passes.c (gfc_code_walker): Likewise.
1731         * gfortran.h (enum gfc_statement): Add ST_OMP_PARALLEL_MASTER and
1732         ST_OMP_END_PARALLEL_MASTER.
1733         (enum gfc_exec_op): Add EXEC_OMP_PARALLEL_MASTER..
1734         * match.h (gfc_match_omp_parallel_master): Handle it.
1735         * openmp.c (gfc_match_omp_parallel_master, resolve_omp_clauses,
1736         omp_code_to_statement, gfc_resolve_omp_directive): Likewise.
1737         * parse.c (decode_omp_directive, case_exec_markers,
1738         gfc_ascii_statement, parse_omp_structured_block,
1739         parse_executable): Likewise.
1740         * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
1741         * st.c (gfc_free_statement): Likewise.
1742         * trans-openmp.c (gfc_trans_omp_parallel_master,
1743         gfc_trans_omp_workshare, gfc_trans_omp_directive): Likewise.
1744         * trans.c (trans_code): Likewise.
1746 2021-05-14  Tobias Burnus  <tobias@codesourcery.com>
1748         * resolve.c (resolve_symbol): Handle implicit SAVE of main-program
1749         for vars in 'omp threadprivate' and 'omp declare target'.
1751 2021-05-10  Martin Liska  <mliska@suse.cz>
1753         * decl.c (variable_decl): Use startswith
1754         function instead of strncmp.
1755         (gfc_match_end): Likewise.
1756         * gfortran.h (gfc_str_startswith): Likewise.
1757         * module.c (load_omp_udrs): Likewise.
1758         (read_module): Likewise.
1759         * options.c (gfc_handle_runtime_check_option): Likewise.
1760         * primary.c (match_arg_list_function): Likewise.
1761         * trans-decl.c (gfc_get_symbol_decl): Likewise.
1762         * trans-expr.c (gfc_conv_procedure_call): Likewise.
1763         * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Likewise.
1765 2021-05-06  Paul Thomas  <pault@gcc.gnu.org>
1767         PR fortran/46991
1768         PR fortran/99819
1769         * class.c (gfc_build_class_symbol): Remove the error that
1770         disables assumed size class arrays. Class array types that are
1771         not deferred shape or assumed rank are given a unique name and
1772         placed in the procedure namespace.
1773         * trans-array.c (gfc_trans_g77_array): Obtain the data pointer
1774         for class arrays.
1775         (gfc_trans_dummy_array_bias): Suppress the runtime error for
1776         extent violations in explicit shape class arrays because it
1777         always fails.
1778         * trans-expr.c (gfc_conv_procedure_call): Handle assumed size
1779         class actual arguments passed to non-descriptor formal args by
1780         using the data pointer, stored as the symbol's backend decl.
1782 2021-05-05  Harald Anlauf  <anlauf@gmx.de>
1784         PR fortran/100274
1785         * interface.c (gfc_compare_actual_formal): Continue checks after
1786         emitting warning for argument length mismatch.
1787         * trans-expr.c (gfc_conv_procedure_call): Check for NULL pointer
1788         dereference.
1790 2021-05-04  Tobias Burnus  <tobias@codesourcery.com>
1792         PR testsuite/100397
1793         * trans-openmp.c (gfc_trans_omp_depobj): Fix pasto in enum values.
1795 2021-04-28  Tobias Burnus  <tobias@codesourcery.com>
1797         * openmp.c (gfc_match_omp_variable_list): Gobble whitespace before
1798         checking whether a '%' or parenthesis-open follows as next character.
1800 2021-04-28  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
1802         PR fortran/82376
1803         * trans-expr.c (gfc_conv_procedure_call): Evaluate function result
1804         and then pass a pointer.
1806 2021-04-26  Thomas Schwinge  <thomas@codesourcery.com>
1807             Nathan Sidwell  <nathan@codesourcery.com>
1808             Tom de Vries  <vries@codesourcery.com>
1809             Julian Brown  <julian@codesourcery.com>
1810             Kwok Cheung Yeung  <kcy@codesourcery.com>
1812         * lang.opt (Wopenacc-parallelism): New.
1814 2021-04-24  Harald Anlauf  <anlauf@gmx.de>
1816         PR fortran/100154
1817         * check.c (variable_check): Allow function reference having a data
1818         pointer result.
1819         (arg_strlen_is_zero): New function.
1820         (gfc_check_fgetputc_sub): Add static check of character and status
1821         arguments.
1822         (gfc_check_fgetput_sub): Likewise.
1823         * intrinsic.c (add_subroutines): Fix argument name for the
1824         character argument to intrinsic subroutines fget[c], fput[c].
1826 2021-04-24  Harald Anlauf  <anlauf@gmx.de>
1828         PR fortran/100218
1829         * expr.c (gfc_check_vardef_context): Extend check to allow pointer
1830         from a function reference.
1832 2021-04-22  Martin Liska  <mliska@suse.cz>
1834         PR testsuite/100159
1835         PR testsuite/100192
1836         * frontend-passes.c (optimize_expr): Fix typos and missing comments.
1838 2021-04-22  Michael Meissner  <meissner@linux.ibm.com>
1840         PR fortran/96983
1841         * trans-intrinsic.c (build_round_expr): If int type is larger than
1842         long long, do the round and convert to the integer type.  Do not
1843         try to find a floating point type the exact size of the integer
1844         type.
1846 2021-04-21  Tobias Burnus  <tobias@codesourcery.com>
1848         * dump-parse-tree.c (show_omp_namelist): Handle depobj + mutexinoutset
1849         in the depend clause.
1850         (show_omp_clauses, show_omp_node, show_code_node): Handle depobj.
1851         * gfortran.h (enum gfc_statement): Add ST_OMP_DEPOBJ.
1852         (enum gfc_omp_depend_op): Add OMP_DEPEND_UNSET,
1853         OMP_DEPEND_MUTEXINOUTSET and OMP_DEPEND_DEPOBJ.
1854         (gfc_omp_clauses): Add destroy, depobj_update and depobj.
1855         (enum gfc_exec_op): Add EXEC_OMP_DEPOBJ
1856         * match.h (gfc_match_omp_depobj): Match 'omp depobj'.
1857         * openmp.c (gfc_match_omp_clauses): Add depobj + mutexinoutset
1858         to depend clause.
1859         (gfc_match_omp_depobj, resolve_omp_clauses, gfc_resolve_omp_directive):
1860         Handle 'omp depobj'.
1861         * parse.c (decode_omp_directive, next_statement, gfc_ascii_statement):
1862         Likewise.
1863         * resolve.c (gfc_resolve_code): Likewise.
1864         * st.c (gfc_free_statement): Likewise.
1865         * trans-openmp.c (gfc_trans_omp_clauses): Handle depobj + mutexinoutset
1866         in the depend clause.
1867         (gfc_trans_omp_depobj, gfc_trans_omp_directive): Handle EXEC_OMP_DEPOBJ.
1868         * trans.c (trans_code): Likewise.
1870 2021-04-20  Paul Thomas  <pault@gcc.gnu.org>
1872         PR fortran/100110
1873         * trans-decl.c (gfc_get_symbol_decl): Replace test for host
1874         association with a check that the current and symbol namespaces
1875         are the same.
1877 2021-04-19  Thomas Schwinge  <thomas@codesourcery.com>
1879         * lang.opt (fopenacc-kernels=): Remove.
1881 2021-04-16  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
1883         PR fortran/100094
1884         * trans-array.c (gfc_trans_deferred_array): Add code to initialize
1885         pointers and allocatables with correct TKR parameters.
1887 2021-04-16  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
1889         PR fortran/100018
1890         * resolve.c: Add association check before de-referencing pointer.
1892 2021-04-16  Harald Anlauf  <anlauf@gmx.de>
1893             Paul Thomas  <pault@gcc.gnu.org>
1895         PR fortran/63797
1896         * module.c (write_symtree): Do not write interface of intrinsic
1897         procedure to module file for F2003 and newer.
1899 2021-04-15  Paul Thomas  <pault@gcc.gnu.org>
1901         PR fortran/99307
1902         * symbol.c: Remove trailing white space.
1903         * trans-array.c (gfc_trans_create_temp_array): Create a class
1904         temporary for class expressions and assign the new descriptor
1905         to the data field.
1906         (build_class_array_ref): If the class expr can be extracted,
1907         then use that for 'decl'. Class function results are reliably
1908         handled this way. Call gfc_find_and_cut_at_last_class_ref to
1909         eliminate largely redundant code. Remove dead code and recast
1910         the rest of the code to extract 'decl' for remaining cases.
1911         Call gfc_build_spanned_array_ref.
1912         (gfc_alloc_allocatable_for_assignment): Use class descriptor
1913         element length for 'elemsize1'. Eliminate repeat set of dtype
1914         for class expressions.
1915         * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Include
1916         additional code from build_class_array_ref, and use optional
1917         gfc_typespec pointer argument.
1918         (gfc_trans_scalar_assign): Make use of pre and post blocks for
1919         all class expressions.
1920         * trans.c (get_array_span): For unlimited polymorphic exprs
1921         multiply the span by the value of the _len field.
1922         (gfc_build_spanned_array_ref): New function.
1923         (gfc_build_array_ref): Call gfc_build_spanned_array_ref and
1924         eliminate repeated code.
1925         * trans.h: Add arg to gfc_find_and_cut_at_last_class_ref and
1926         add prototype for gfc_build_spanned_array_ref.
1928 2021-04-14  Martin Liska  <mliska@suse.cz>
1930         * intrinsic.texi: The table has first column empty and it makes
1931         trouble when processing makeinfo --xml output.
1933 2021-04-09  Tobias Burnus  <tobias@codesourcery.com>
1935         PR fortran/99817
1936         * trans-types.c (gfc_get_function_type): Also generate hidden
1937         coarray argument for character arguments.
1939 2021-04-03  Paul Thomas  <pault@gcc.gnu.org>
1941         PR fortran/99818
1942         * interface.c (compare_parameter): The codimension attribute is
1943         applied to the _data field of class formal arguments.
1945 2021-04-01  Harald Anlauf  <anlauf@gmx.de>
1947         PR fortran/99840
1948         * simplify.c (gfc_simplify_transpose): Properly initialize
1949         resulting shape.
1951 2021-03-28  Paul Thomas  <pault@gcc.gnu.org>
1953         PR fortran/99602
1954         * trans-expr.c (gfc_conv_procedure_call): Use the _data attrs
1955         for class expressions and detect proc pointer evaluations by
1956         the non-null actual argument list.
1958 2021-03-27  Steve Kargl  <kargl@gcc.gnu.org>
1960         * misc.c (gfc_typename): Fix off-by-one in buffer sizes.
1962 2021-03-26  Tobias Burnus  <tobias@codesourcery.com>
1964         PR fortran/99651
1965         * intrinsic.c (gfc_intrinsic_func_interface): Set
1966         attr.proc = PROC_INTRINSIC if FL_PROCEDURE.
1968 2021-03-24  Tobias Burnus  <tobias@codesourcery.com>
1970         PR fortran/99369
1971         * resolve.c (resolve_operator): Make 'msg' buffer larger
1972         and use snprintf.
1974 2021-03-23  Tobias Burnus  <tobias@codesourcery.com>
1976         PR fortran/93660
1977         * trans-decl.c (build_function_decl): Add comment;
1978         increment hidden_typelist for caf_token/caf_offset.
1979         * trans-types.c (gfc_get_function_type): Add comment;
1980         add missing caf_token/caf_offset args.
1982 2021-03-22  Tobias Burnus  <tobias@codesourcery.com>
1984         PR fortran/99688
1985         * match.c (select_type_set_tmp, gfc_match_select_type,
1986         gfc_match_select_rank): Fix 'name' buffersize to avoid out of bounds.
1987         * resolve.c (resolve_select_type): Likewise.
1989 2021-03-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
1991         * frontend-passes.c (inline_limit_check): Add rank_a
1992         argument. If a is rank 1, set the second dimension to 1.
1993         (inline_matmul_assign): Pass rank_a argument to inline_limit_check.
1994         (call_external_blas): Likewise.
1996 2021-03-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
1998         PR fortran/99345
1999         * frontend-passes.c (doloop_contained_procedure_code):
2000         Properly handle EXEC_IOLENGTH.
2002 2021-03-15  Paul Thomas  <pault@gcc.gnu.org>
2004         PR fortran/99545
2005         * trans-stmt.c (gfc_trans_allocate): Mark the initialization
2006         assignment by setting init_flag.
2008 2021-03-14  Harald Anlauf  <anlauf@gmx.de>
2009             Paul Thomas  <pault@gcc.gnu.org>
2011         * trans-expr.c (gfc_conv_procedure_call): Fix runtime checks for
2012         CLASS arguments.
2013         * trans-intrinsic.c (gfc_conv_intrinsic_size): Likewise.
2015 2021-03-13  Paul Thomas  <pault@gcc.gnu.org>
2017         PR fortran/99125
2018         * trans-array.c (gfc_conv_expr_descriptor): For deferred length
2019         length components use the ss_info string length instead of
2020         gfc_get_expr_charlen. Make sure that the deferred string length
2021         is a variable before assigning to it. Otherwise use the expr.
2022         * trans-expr.c (gfc_conv_string_length): Make sure that the
2023         deferred string length is a variable before assigning to it.
2025 2021-03-12  Tobias Burnus  <tobias@codesourcery.com>
2027         PR fortran/99514
2028         * resolve.c (resolve_symbol): Accept vars which are in DATA
2029         and hence (either) implicit SAVE (or in common).
2031 2021-03-10  Harald Anlauf  <anlauf@gmx.de>
2033         PR fortran/99205
2034         * data.c (gfc_assign_data_value): Reject non-constant character
2035         length for lvalue.
2036         * trans-array.c (gfc_conv_array_initializer): Restrict loop to
2037         elements which are defined to avoid NULL pointer dereference.
2039 2021-03-10  Tobias Burnus  <tobias@codesourcery.com>
2041         * intrinsic.texi (MIN): Correct 'maximum' to 'minimum'.
2043 2021-03-10  Eric Botcazou  <ebotcazou@adacore.com>
2045         PR fortran/96983
2046         * trans-intrinsic.c (build_round_expr): Do not implicitly assume
2047         that __float128 is the 128-bit floating-point type.
2049 2021-03-08  Harald Anlauf  <anlauf@gmx.de>
2051         PR fortran/49278
2052         * data.c (gfc_assign_data_value): Reject variable with PARAMETER
2053         attribute in DATA statement.
2055 2021-03-05  Tobias Burnus  <tobias@codesourcery.com>
2057         PR fortran/99355
2058         PR fortran/57871
2059         * invoke.texi (-freal{4,8}-real-*): Extend description.
2060         * primary.c (match_real_constant): Also promote real literals
2061         with '_kind' number.
2063 2021-03-04  Tobias Burnus  <tobias@codesourcery.com>
2065         PR fortran/99355
2066         * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Avoid
2067         redoing kind conversions.
2068         * primary.c (match_real_constant): Likewise.
2070 2021-02-28  Jakub Jelinek  <jakub@redhat.com>
2072         PR fortran/99303
2073         * openmp.c (gfc_omp_requires_add_clause): Fix up diagnostic message
2074         wordings.
2075         (resolve_omp_clauses): Likewise.
2077 2021-02-28  Jakub Jelinek  <jakub@redhat.com>
2079         PR fortran/99300
2080         * frontend-passes.c (doloop_code): Replace double space in diagnostics
2081         with a single space.
2083 2021-02-24  Paul Thomas  <pault@gcc.gnu.org>
2085         PR fortran/98342
2086         * trans-expr.c (gfc_conv_derived_to_class): Add optional arg.
2087         'derived_array' to hold the fixed, parmse expr in the case of
2088         assumed rank formal arguments. Deal with optional arguments.
2089         (gfc_conv_procedure_call): Null 'derived' array for each actual
2090         argument. Add its address to the call to gfc_conv_derived_to_
2091         class. Access the 'data' field of scalar descriptors before
2092         deallocating allocatable components. Also strip NOPs before the
2093         calls to gfc_deallocate_alloc_comp. Use 'derived' array as the
2094         input to gfc_deallocate_alloc_comp if it is available.
2095         * trans.h : Include the optional argument 'derived_array' to
2096         the prototype of gfc_conv_derived_to_class. The default value
2097         is NULL_TREE.
2099 2021-02-23  Paul Thomas  <pault@gcc.gnu.org>
2101         PR fortran/99124
2102         * resolve.c (resolve_fl_procedure): Include class results in
2103         the test for F2018, C15100.
2104         * trans-array.c (get_class_info_from_ss): Do not use the saved
2105         descriptor to obtain the class expression for variables. Use
2106         gfc_get_class_from_expr instead.
2108 2021-02-23  Harald Anlauf  <anlauf@gmx.de>
2110         PR fortran/99206
2111         * simplify.c (gfc_simplify_reshape): Set string length for
2112         character arguments.
2114 2021-02-22  Tobias Burnus  <tobias@codesourcery.com>
2116         PR fortran/99171
2117         * trans-openmp.c (gfc_omp_is_optional_argument): Regard optional
2118         dummy procs as nonoptional as no special treatment is needed.
2120 2021-02-21  Harald Anlauf  <anlauf@gmx.de>
2122         * trans-expr.c (gfc_conv_procedure_call): Do not add clobber to
2123         allocatable intent(out) argument.
2125 2021-02-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2127         PR fortran/98686
2128         * match.c (gfc_match_namelist): If BT_UNKNOWN, check for
2129         IMPLICIT NONE and and issue an error, otherwise set the type
2130         to its IMPLICIT type so that any subsequent use of objects will
2131         will confirm their types.
2133 2021-02-19  Harald Anlauf  <anlauf@gmx.de>
2135         * symbol.c (gfc_add_flavor): Reverse order of conditions.
2137 2021-02-19  Tobias Burnus  <tobias@codesourcery.com>
2139         PR fortran/99010
2140         * dependency.c (gfc_dep_resolver): Fix coarray handling.
2142 2021-02-19  Tobias Burnus  <tobias@codesourcery.com>
2144         PR fortran/99146
2145         * interface.c:
2147 2021-02-19  Tobias Burnus  <tobias@codesourcery.com>
2149         PR fortran/99027
2150         * simplify.c (simplify_bound_dim): Honor DIMEN_ELEMENT
2151         when using dim=.
2153 2021-02-17  Julian Brown  <julian@codesourcery.com>
2155         * openmp.c (resolve_omp_clauses): Disallow selecting components
2156         of arrays of derived type.
2158 2021-02-17  Julian Brown  <julian@codesourcery.com>
2160         * trans-openmp.c (gfc_trans_omp_clauses): Handle element selection
2161         for arrays of derived types.
2163 2021-02-16  Tobias Burnus  <tobias@codesourcery.com>
2165         * expr.c (gfc_is_simplify_contiguous): Handle REF_INQUIRY, i.e.
2166         %im and %re which are EXPR_VARIABLE.
2167         * openmp.c (resolve_omp_clauses): Diagnose %re/%im explicitly.
2169 2021-02-16  Tobias Burnus  <tobias@codesourcery.com>
2171         PR fortran/99111
2172         * io.c (resolve_tag_format): Reject BT_DERIVED/CLASS/VOID
2173         as (array-valued) FORMAT tag.
2175 2021-02-12  Tobias Burnus  <tobias@codesourcery.com>
2177         PR fortran/99043
2178         * trans-expr.c (gfc_conv_procedure_call): Don't reset
2179         rank of assumed-rank array.
2181 2021-02-11  Paul Thomas  <pault@gcc.gnu.org>
2183         PR fortran/98897
2184         * match.c (gfc_match_call): Include associate names as possible
2185         entities with typebound subroutines. The target needs to be
2186         resolved for the type.
2188 2021-02-11  Paul Thomas  <pault@gcc.gnu.org>
2190         PR fortran/99060
2191         * primary.c (gfc_match_varspec): Test for non-null 'previous'
2192         before using its name in the error message.
2194 2021-02-11  Tobias Burnus  <tobias@codesourcery.com>
2196         * intrinsic.texi (FINDLOC): Add 'MASK' to argument table.
2197         (MAXLOC, MAXVAL, MINLOC, MINVAL): For 'MASK', remove 'an
2198         array' as scalars are also permitted.
2200 2021-02-10  Julian Brown  <julian@codesourcery.com>
2202         PR fortran/98979
2203         * openmp.c (resolve_omp_clauses): Omit OpenACC update in
2204         contiguity check and stride-specified error.
2206 2021-02-04  Julian Brown  <julian@codesourcery.com>
2208         * openmp.c (resolve_omp_clauses): Omit OpenACC update in
2209         contiguity check and stride-specified error.
2211 2021-02-04  Julian Brown  <julian@codesourcery.com>
2213         * trans-openmp.c (gfc_trans_omp_clauses): Use class_pointer attribute
2214         for BT_CLASS.
2216 2021-02-04  Julian Brown  <julian@codesourcery.com>
2218         * trans-openmp.c (gfc_trans_omp_clauses): Fix dereferencing for
2219         BT_DERIVED members.
2221 2021-02-04  Tobias Burnus  <tobias@codesourcery.com>
2223         * openmp.c (resolve_omp_clauses): Explicitly diagnose
2224         substrings as not permitted.
2226 2021-02-03  Jeff Law  <law@redhat.com>
2228         * intrinsic.texi (ANINT): Fix typo.
2230 2021-02-03  Tobias Burnus  <tobias@codesourcery.com>
2232         PR fortran/98913
2233         * dependency.c (gfc_dep_resolver): Treat local access
2234         to coarrays like any array access in dependency analysis.
2236 2021-01-28  Harald Anlauf  <anlauf@gmx.de>
2238         PR fortran/86470
2239         * trans.c (gfc_call_malloc): Allocate area of size 1 if passed
2240         size is NULL (as documented).
2242 2021-01-27  Paul Thomas  <pault@gcc.gnu.org>
2244         PR fortran/93924
2245         PR fortran/93925
2246         * trans-expr.c (gfc_conv_procedure_call): Suppress the call to
2247         gfc_conv_intrinsic_to_class for unlimited polymorphic procedure
2248         pointers.
2249         (gfc_trans_assignment_1): Similarly suppress class assignment
2250         for class valued procedure pointers.
2252 2021-01-27  Paul Thomas  <pault@gcc.gnu.org>
2254         PR fortran/98472
2255         * trans-array.c (gfc_conv_expr_descriptor): Include elemental
2256         procedure pointers in the assert under the comment 'elemental
2257         function' and eliminate the second, spurious assert.
2259 2021-01-25  Harald Anlauf  <anlauf@gmx.de>
2261         PR fortran/70070
2262         * data.c (create_character_initializer): Check substring indices
2263         against bounds.
2264         (gfc_assign_data_value): Catch error returned from
2265         create_character_initializer.
2267 2021-01-25  Tobias Burnus  <tobias@codesourcery.com>
2269         * intrinsic.texi (CO_BROADCAST, CO_MIN, CO_REDUCE, CO_SUM): Fix typos.
2271 2021-01-25  Steve Kargl  <kargl@gcc.gnu.org>
2273         PR fortran/98517
2274         * resolve.c (resolve_charlen): Check that length expression is
2275         present before testing for scalar/integer..
2277 2021-01-22  Paul Thomas  <pault@gcc.gnu.org>
2279         PR fortran/98565
2280         * trans-intrinsic.c (gfc_conv_associated): Do not add a _data
2281         component for scalar class function targets. Instead, fix the
2282         function result and access the _data from that.
2284 2021-01-21  Jorge D'Elia  <jdelia@cimec.unl.edu.ar>
2286         * intrinsic.texi (CO_MAX): Fix typo.
2288 2021-01-21  Paul Thomas  <pault@gcc.gnu.org>
2290         PR fortran/96320
2291         * decl.c (gfc_match_modproc): It is not an error to find a
2292         module procedure declaration within a contains block.
2293         * expr.c (gfc_check_vardef_context): Pure procedure result is
2294         assignable. Change 'own_scope' accordingly.
2295         * resolve.c (resolve_typebound_procedure): A procedure that
2296         has the module procedure attribute is almost certainly a
2297         module procedure, whatever its interface.
2299 2021-01-19  Tobias Burnus  <tobias@codesourcery.com>
2301         PR fortran/98476
2302         * openmp.c (resolve_omp_clauses): Change use_device_ptr
2303         to use_device_addr for unless type(c_ptr); check all
2304         list item for is_device_ptr.
2306 2021-01-16  Kwok Cheung Yeung  <kcy@codesourcery.com>
2308         * dump-parse-tree.c (show_omp_clauses): Handle detach clause.
2309         * frontend-passes.c (gfc_code_walker): Walk detach expression.
2310         * gfortran.h (struct gfc_omp_clauses): Add detach field.
2311         (gfc_c_intptr_kind): New.
2312         * openmp.c (gfc_free_omp_clauses): Free detach clause.
2313         (gfc_match_omp_detach): New.
2314         (enum omp_mask1): Add OMP_CLAUSE_DETACH.
2315         (enum omp_mask2): Remove OMP_CLAUSE_DETACH.
2316         (gfc_match_omp_clauses): Handle OMP_CLAUSE_DETACH for OpenMP.
2317         (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DETACH.
2318         (resolve_omp_clauses): Prevent use of detach with mergeable and
2319         overriding the data sharing mode of the event handle.
2320         * trans-openmp.c (gfc_trans_omp_clauses): Handle detach clause.
2321         * trans-types.c (gfc_c_intptr_kind): New.
2322         (gfc_init_kinds): Initialize gfc_c_intptr_kind.
2323         * types.def
2324         (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT): Rename
2325         to...
2326         (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT_PTR):
2327         ...this.  Add extra argument.
2329 2021-01-14  Harald Anlauf  <anlauf@gmx.de>
2331         * gfortran.h (gfc_resolve_substring): Add prototype.
2332         * primary.c (match_string_constant): Simplify substrings with
2333         constant starting and ending points.
2334         * resolve.c: Rename resolve_substring to gfc_resolve_substring.
2335         (gfc_resolve_ref): Use renamed function gfc_resolve_substring.
2337 2021-01-14  Harald Anlauf  <anlauf@gmx.de>
2339         PR fortran/98661
2340         * resolve.c (resolve_component): Derived type components with
2341         ALLOCATABLE or POINTER attribute shall have a deferred shape.
2343 2021-01-14  Harald Anlauf  <anlauf@gmx.de>
2345         Revert:
2346         2021-01-14  Harald Anlauf  <anlauf@gmx.de>
2348         PR fortran/98661
2349         * resolve.c (resolve_component): Derived type components with
2350         ALLOCATABLE or POINTER attribute shall have a deferred shape.
2352 2021-01-14  Harald Anlauf  <anlauf@gmx.de>
2354         PR fortran/98661
2355         * resolve.c (resolve_component): Derived type components with
2356         ALLOCATABLE or POINTER attribute shall have a deferred shape.
2358 2021-01-08  Paul Thomas  <pault@gcc.gnu.org>
2360         PR fortran/93794
2361         * trans-expr.c (gfc_conv_component_ref): Remove the condition
2362         that deferred character length components only be allocatable.
2364 2021-01-08  Paul Thomas  <pault@gcc.gnu.org>
2366         PR fortran/98458
2367         * simplify.c (is_constant_array_expr): If an array constructor
2368         expression has elements other than constants or structures, try
2369         fixing the expression with gfc_reduce_init_expr. Also, if shape
2370         is NULL, obtain the array size and set it.
2372 2021-01-07  Paul Thomas  <pault@gcc.gnu.org>
2374         PR fortran/93701
2375         * resolve.c (find_array_spec): Put static prototype for
2376         resolve_assoc_var before this function and call for associate
2377         variables.
2379 2021-01-06  Harald Anlauf  <anlauf@gmx.de>
2381         * resolve.c (resolve_component): Add check for valid CLASS
2382         reference before trying to access CLASS data.
2384 2021-01-04  Martin Liska  <mliska@suse.cz>
2386         * ChangeLog-2018: Remove duplicate ChangeLog entries.
2388 2021-01-01  Harald Anlauf  <anlauf@gmx.de>
2390         * class.c (gfc_find_vtab): Add check on attribute is_class.
2392 2021-01-01  Jakub Jelinek  <jakub@redhat.com>
2394         * gfortranspec.c (lang_specific_driver): Update copyright notice
2395         dates.
2396         * gfc-internals.texi: Bump @copying's copyright year.
2397         * gfortran.texi: Ditto.
2398         * intrinsic.texi: Ditto.
2399         * invoke.texi: Ditto.
2401 2021-01-01  Jakub Jelinek  <jakub@redhat.com>
2403         * ChangeLog-2020: Rotate ChangeLog.  New file.
2406 Copyright (C) 2021 Free Software Foundation, Inc.
2408 Copying and distribution of this file, with or without modification,
2409 are permitted in any medium without royalty provided the copyright
2410 notice and this notice are preserved.