1 2021-11-12 Tobias Burnus <tobias@codesourcery.com>
3 * parse.c (decode_omp_directive): Fix permitting 'nowait' for some
4 combined directives, add missing 'omp end ... loop'.
5 (gfc_ascii_statement): Fix ST_OMP_END_TEAMS_LOOP result.
6 * openmp.c (resolve_omp_clauses): Add missing combined loop constructs
7 case values to the 'if(directive-name: ...)' check.
8 * trans-openmp.c (gfc_split_omp_clauses): Put nowait on target if
9 first leaf construct accepting it.
11 2021-11-12 Martin Jambor <mjambor@suse.cz>
13 * trans-types.c (gfc_get_array_descr_info): Use build_debug_expr_decl
14 instead of building DEBUG_EXPR_DECL manually.
16 2021-11-12 Mikael Morin <mikael@gcc.gnu.org>
19 * intrinsic.c (add_sym_4ind): Remove.
20 (add_functions): Use add_sym4 instead of add_sym4ind.
21 Don’t special case the index intrinsic.
22 * iresolve.c (gfc_resolve_index_func): Use the individual arguments
23 directly instead of the full argument list.
24 * intrinsic.h (gfc_resolve_index_func): Update the declaration
26 * trans-decl.c (gfc_get_extern_function_decl): Don’t modify the
27 list of arguments in the case of the index intrinsic.
28 * trans-array.h (gfc_get_intrinsic_for_expr,
29 gfc_get_proc_ifc_for_expr): New.
30 * trans-array.c (gfc_get_intrinsic_for_expr,
31 arg_evaluated_for_scalarization): New.
32 (gfc_walk_elemental_function_args): Add intrinsic procedure
33 as argument. Count arguments. Check arg_evaluated_for_scalarization.
34 * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
35 * trans-stmt.c (get_intrinsic_for_code): New.
36 (gfc_trans_call): Update call.
38 2021-11-12 Jakub Jelinek <jakub@redhat.com>
40 * types.def (BT_FN_VOID_UINT_UINT): Remove.
41 (BT_FN_BOOL_UINT_UINT_UINT_BOOL): New.
43 2021-11-11 Tobias Burnus <tobias@codesourcery.com>
45 * gfortran.h (struct gfc_omp_clauses): Rename num_teams to
46 num_teams_upper, add num_teams_upper.
47 * dump-parse-tree.c (show_omp_clauses): Update to handle
48 lower-bound num_teams clause.
49 * frontend-passes.c (gfc_code_walker): Likewise
50 * openmp.c (gfc_free_omp_clauses, gfc_match_omp_clauses,
51 resolve_omp_clauses): Likewise.
52 * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses,
53 gfc_trans_omp_target): Likewise.
55 2021-11-11 Jakub Jelinek <jakub@redhat.com>
57 * trans-openmp.c (gfc_trans_omp_clauses): Use
58 OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of OMP_CLAUSE_NUM_TEAMS_EXPR.
60 2021-11-10 Harald Anlauf <anlauf@gmx.de>
64 * check.c (gfc_check_shape): Avoid NULL pointer dereference on
66 * simplify.c (gfc_simplify_cshift): Avoid NULL pointer dereference
68 (gfc_simplify_transpose): Likewise.
70 2021-11-09 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
73 * class.c (generate_finalization_wrapper): Do not leak
74 finalization wrappers if they will not be used.
75 * expr.c (gfc_free_actual_arglist): Formatting fix.
76 * gfortran.h (gfc_free_symbol): Pass argument by reference.
77 (gfc_release_symbol): Likewise.
78 (gfc_free_namespace): Likewise.
79 * symbol.c (gfc_release_symbol): Adjust acordingly.
80 (free_components): Set procedure pointer components
81 of derived types to NULL after freeing.
82 (free_tb_tree): Likewise.
83 (gfc_free_symbol): Set sym to NULL after freeing.
84 (gfc_free_namespace): Set namespace to NULL after freeing.
86 2021-11-09 Martin Liska <mliska@suse.cz>
88 * symbol.c (gfc_get_ultimate_derived_super_type): Remove.
90 2021-11-09 Aldy Hernandez <aldyh@redhat.com>
92 * misc.c (gfc_dummy_typename): Make sure ts->kind is
95 2021-11-07 Thomas Koenig <tkoenig@gcc.gnu.org>
97 * intrinsic.c (add_subroutines): Change keyword "operator"
98 to the correct one, "operation".
99 * check.c (gfc_check_co_reduce): Change OPERATOR to
100 OPERATION in error messages.
101 * intrinsic.texi: Change OPERATOR to OPERATION in
104 2021-11-07 Sandra Loosemore <sandra@codesourcery.com>
106 * interface.c (gfc_compare_actual_formal): Continue checking
107 all arguments after encountering an error.
108 * intrinsic.c (do_ts29113_check): Likewise.
109 * resolve.c (resolve_operator): Continue resolving on op2 error.
111 2021-11-06 Harald Anlauf <anlauf@gmx.de>
114 * decl.c (add_init_expr_to_sym): Reject rank mismatch between
115 array and its initializer.
117 2021-11-05 Harald Anlauf <anlauf@gmx.de>
120 * expr.c (simplify_parameter_variable): Copy shape of referenced
121 subobject when simplifying.
123 2021-11-05 Harald Anlauf <anlauf@gmx.de>
126 * match.c (gfc_match_common): Check array spec of a symbol in a
127 COMMON object list and reject it if it is a coarray.
129 2021-11-05 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
132 * decl.c (gfc_match_implicit_none): Fix typo in warning.
133 * resolve.c (resolve_unknown_f): Reject external procedures
134 without explicit EXTERNAL attribute whe IMPLICIT none (external)
137 2021-11-05 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
139 * decl.c (gfc_insert_kind_parameter_exprs): Make static.
140 * expr.c (gfc_build_init_expr): Make static
141 (gfc_build_default_init_expr): Move below its static helper.
142 * gfortran.h (gfc_insert_kind_parameter_exprs, gfc_add_saved_common,
143 gfc_add_common, gfc_use_derived_tree, gfc_free_charlen,
144 gfc_get_ultimate_derived_super_type,
145 gfc_resolve_oacc_parallel_loop_blocks, gfc_build_init_expr,
146 gfc_iso_c_sub_interface): Delete.
147 * symbol.c (gfc_new_charlen, gfc_get_derived_super_type): Make
150 2021-11-05 Sandra Loosemore <sandra@codesourcery.com>
153 * gfortran.texi (Mixed-Language Programming): Talk about C++,
156 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
158 * gfortran.texi (Projects): Add bullet for helping with
159 incomplete standards compliance.
160 (Proposed Extensions): Delete section.
162 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
164 * intrinsic.texi (Introduction to Intrinsics): Genericize
165 references to standard versions.
166 * invoke.texi (-fall-intrinsics): Likewise.
167 (-fmax-identifier-length=): Likewise.
169 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
171 * gfortran.texi (Interoperability with C): Copy-editing. Add
173 (Intrinsic Types): Likewise.
174 (Derived Types and struct): Likewise.
175 (Interoperable Global Variables): Likewise.
176 (Interoperable Subroutines and Functions): Likewise.
177 (Working with C Pointers): Likewise.
178 (Further Interoperability of Fortran with C): Likewise. Rewrite
179 to reflect that this is now fully supported by gfortran.
181 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
183 * gfortran.texi (About GNU Fortran): Consolidate material
184 formerly in other sections. Copy-editing.
185 (Preprocessing and conditional compilation): Delete, moving
186 most material to invoke.texi.
187 (GNU Fortran and G77): Delete.
188 (Project Status): Delete.
190 (Fortran 95 status): Mention conditional compilation here.
191 (Fortran 2003 status): Rewrite to mention the 1 missing feature
192 instead of all the ones implemented.
193 (Fortran 2008 status): Similarly for the 2 missing features.
194 (Fortran 2018 status): Rewrite to reflect completion of TS29113
196 * invoke.texi (Preprocessing Options): Move material formerly
197 in introductory chapter here.
199 2021-11-04 Sandra Loosemore <sandra@codesourcery.com>
201 * gfortran.texi (Standards): Move discussion of specific
202 standard versions here....
203 (Fortran standards status): ...from here, and delete this node.
205 2021-10-31 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
207 * symbol.c (gfc_get_typebound_proc): Revert memcpy.
209 2021-10-31 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
211 * resolve.c (resolve_fl_procedure): Initialize
212 allocatable_or_pointer.
214 2021-10-30 Manfred Schwarb <manfred99@gmx.ch>
216 * intrinsic.texi: Remove entries for SHORT and LONG intrinsics.
218 2021-10-30 Manfred Schwarb <manfred99@gmx.ch>
220 * check.c (gfc_check_intconv): Change error message.
222 2021-10-30 Manfred Schwarb <manfred99@gmx.ch>
224 * intrinsic.texi (REAL): Fix entries in Specific names table.
226 2021-10-30 Manfred Schwarb <manfred99@gmx.ch>
228 * intrinsic.texi: Adjust @columnfractions commands to improve
229 appearance for narrow 80 character terminals.
231 2021-10-30 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
233 * parse.c (clean_up_modules): Free gsym.
235 2021-10-30 Harald Anlauf <anlauf@gmx.de>
237 * gfortran.texi (bug reports): credit Gerhard Steinmetz for
238 numerous bug reports.
240 2021-10-30 Steve Kargl <kargl@gcc.gnu.org>
243 * resolve.c (resolve_select): Generate regular gfc_error on
244 invalid conversions instead of an gfc_internal_error.
246 2021-10-29 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
248 * symbol.c (free_tb_tree): Free type-bound procedure struct.
249 (gfc_get_typebound_proc): Use explicit memcpy for clarity.
251 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
253 * intrinsic.h (gfc_check_sum, gfc_resolve_atan2d, gfc_resolve_kill,
254 gfc_resolve_kill_sub): Delete declaration.
256 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
258 * trans-types.h (gfc_convert_function_code): Delete.
260 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
262 * trans-stmt.h (gfc_trans_deallocate_array): Delete.
264 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
266 * trans-array.c (gfc_trans_scalarized_loop_end): Make static.
267 * trans-array.h (gfc_trans_scalarized_loop_end,
268 gfc_conv_tmp_ref, gfc_conv_array_transpose): Delete declaration.
270 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
272 * constructor.c (gfc_constructor_get_base): Make static.
273 (gfc_constructor_expr_foreach, gfc_constructor_swap): Delete.
274 * constructor.h (gfc_constructor_get_base): Remove declaration.
275 (gfc_constructor_expr_foreach, gfc_constructor_swap): Delete.
277 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
279 * decl.c (gfc_match_old_kind_spec, set_com_block_bind_c,
280 set_verify_bind_c_sym, set_verify_bind_c_com_block,
281 get_bind_c_idents, gfc_match_suffix, gfc_get_type_attr_spec,
282 check_extended_derived_type): Make static.
283 (gfc_match_gcc_unroll): Add comment.
284 * match.c (gfc_match_small_int_expr): Delete definition.
285 * match.h (gfc_match_small_int_expr): Delete declaration.
286 (gfc_match_name_C, gfc_match_old_kind_spec, set_com_block_bind_c,
287 set_verify_bind_c_sym, set_verify_bind_c_com_block,
288 get_bind_c_idents, gfc_match_suffix,
289 gfc_get_type_attr_spec): Delete declaration.
291 2021-10-27 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
293 * expr.c (is_non_empty_structure_constructor): Make static.
294 * gfortran.h (gfc_check_any_c_kind): Delete.
295 * match.c (gfc_match_label): Make static.
296 * match.h (gfc_match_label): Delete declaration.
297 * scanner.c (file_changes_cur, file_changes_count,
298 file_changes_allocated): Make static.
299 * trans-expr.c (gfc_get_character_len): Make static.
300 (gfc_class_len_or_zero_get): Make static.
301 (VTAB_GET_FIELD_GEN): Undefine.
302 (gfc_get_class_array_ref): Make static.
303 (gfc_finish_interface_mapping): Make static.
304 * trans-types.c (gfc_check_any_c_kind): Delete.
305 (pfunc_type_node, dtype_type_node, gfc_get_ppc_type): Make static.
306 * trans-types.h (gfc_get_ppc_type): Delete declaration.
307 * trans.c (gfc_msg_wrong_return): Delete.
308 * trans.h (gfc_class_len_or_zero_get, gfc_class_vtab_extends_get,
309 gfc_vptr_extends_get, gfc_get_class_array_ref, gfc_get_character_len,
310 gfc_finish_interface_mapping, gfc_msg_wrong_return,
311 gfc_get_function_decl): Delete declaration.
313 2021-10-27 Tobias Burnus <tobias@codesourcery.com>
315 * trans-stmt.c (gfc_trans_select_rank_cases): Fix condition
316 for allocatables/pointers.
318 2021-10-26 Harald Anlauf <anlauf@gmx.de>
321 * symbol.c (gfc_check_conflict): Add conflict check for PDT KIND
322 and LEN type parameters.
324 2021-10-26 Harald Anlauf <anlauf@gmx.de>
327 * decl.c (match_attr_spec): Remove invalid integer kind checks on
328 KIND and LEN attributes of PDTs.
330 2021-10-26 Harald Anlauf <anlauf@gmx.de>
333 * resolve.c (resolve_structure_cons): Reject invalid array spec of
334 a DT component referenced in a structure constructor.
336 2021-10-26 Tobias Burnus <tobias@codesourcery.com>
339 * trans-decl.c (gfc_conv_cfi_to_gfc): Properly handle nonconstant
342 2021-10-25 Andrew MacLeod <amacleod@redhat.com>
344 * trans-decl.c (gfc_conv_cfi_to_gfc): Initialize rank to NULL_TREE.
346 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
349 * Make-lang.in: Allow dvi-formatted documentation
352 2021-10-22 Tobias Burnus <tobias@codesourcery.com>
355 * trans-expr.c (gfc_trans_assignment_1): Add STRIP_NOPS.
357 2021-10-21 Chung-Lin Tang <cltang@codesourcery.com>
359 * decl.c (gfc_match_end): Add COMP_OMP_STRICTLY_STRUCTURED_BLOCK case
360 together with COMP_BLOCK.
361 * parse.c (parse_omp_structured_block): Change return type to
362 'gfc_statement', add handling for strictly-structured block case, adjust
363 recursive calls to parse_omp_structured_block.
364 (parse_executable): Adjust calls to parse_omp_structured_block.
365 * parse.h (enum gfc_compile_state): Add
366 COMP_OMP_STRICTLY_STRUCTURED_BLOCK.
367 * trans-openmp.c (gfc_trans_omp_workshare): Add EXEC_BLOCK case
370 2021-10-21 Sandra Loosemore <sandra@codesourcery.com>
373 * expr.c (gfc_simplify_expr): Handle GFC_ISYM_SHAPE along with
374 GFC_ISYM_LBOUND and GFC_ISYM_UBOUND.
375 * trans-array.c (gfc_conv_ss_startstride): Likewise.
376 (set_loop_bounds): Likewise.
377 * trans-intrinsic.c (gfc_trans_intrinsic_bound): Extend to
378 handle SHAPE. Correct logic for zero-size special cases and
379 detecting assumed-rank arrays associated with an assumed-size
381 (gfc_conv_intrinsic_shape): Deleted.
382 (gfc_conv_intrinsic_function): Handle GFC_ISYM_SHAPE like
383 GFC_ISYM_LBOUND and GFC_ISYM_UBOUND.
384 (gfc_add_intrinsic_ss_code): Likewise.
385 (gfc_walk_intrinsic_bound): Likewise.
387 2021-10-20 Chung-Lin Tang <cltang@codesourcery.com>
389 * openmp.c (gfc_match_omp_clause_reduction): Add 'openmp_target' default
390 false parameter. Add 'always,tofrom' map for OMP_LIST_IN_REDUCTION case.
391 (gfc_match_omp_clauses): Add 'openmp_target' default false parameter,
392 adjust call to gfc_match_omp_clause_reduction.
393 (match_omp): Adjust call to gfc_match_omp_clauses
394 * trans-openmp.c (gfc_trans_omp_taskgroup): Add call to
395 gfc_match_omp_clause, create and return block.
397 2021-10-19 Tobias Burnus <tobias@codesourcery.com>
399 * trans-types.c (create_fn_spec): For allocatable/pointer
400 character(len=:), use 'w' not 'R' as fn spec for the length dummy
403 2021-10-19 Tobias Burnus <tobias@codesourcery.com>
406 * trans-expr.c (gfc_conv_procedure_call): Use TREE_OPERAND not
407 build_fold_indirect_ref_loc to undo an ADDR_EXPR.
409 2021-10-18 Tobias Burnus <tobias@codesourcery.com>
418 * decl.c (gfc_verify_c_interop_param): Remove 'sorry' for
419 scalar allocatable/pointer and len=*.
420 * expr.c (is_CFI_desc): Return true for for those.
421 * gfortran.h (CFI_type_kind_shift, CFI_type_mask,
422 CFI_type_from_type_kind, CFI_VERSION, CFI_MAX_RANK,
423 CFI_attribute_pointer, CFI_attribute_allocatable,
424 CFI_attribute_other, CFI_type_Integer, CFI_type_Logical,
425 CFI_type_Real, CFI_type_Complex, CFI_type_Character,
426 CFI_type_ucs4_char, CFI_type_struct, CFI_type_cptr,
427 CFI_type_cfunptr, CFI_type_other): New #define.
428 * trans-array.c (CFI_FIELD_BASE_ADDR, CFI_FIELD_ELEM_LEN,
429 CFI_FIELD_VERSION, CFI_FIELD_RANK, CFI_FIELD_ATTRIBUTE,
430 CFI_FIELD_TYPE, CFI_FIELD_DIM, CFI_DIM_FIELD_LOWER_BOUND,
431 CFI_DIM_FIELD_EXTENT, CFI_DIM_FIELD_SM,
432 gfc_get_cfi_descriptor_field, gfc_get_cfi_desc_base_addr,
433 gfc_get_cfi_desc_elem_len, gfc_get_cfi_desc_version,
434 gfc_get_cfi_desc_rank, gfc_get_cfi_desc_type,
435 gfc_get_cfi_desc_attribute, gfc_get_cfi_dim_item,
436 gfc_get_cfi_dim_lbound, gfc_get_cfi_dim_extent, gfc_get_cfi_dim_sm):
437 New define/functions to access the CFI array descriptor.
438 (gfc_conv_descriptor_type): New function for the GFC descriptor.
439 (gfc_get_array_span): Handle expr of CFI descriptors and
440 assumed-type descriptors.
441 (gfc_trans_array_bounds): Remove 'static'.
442 (gfc_conv_expr_descriptor): For assumed type, use the dtype of
444 (structure_alloc_comps): Remove ' ' inside tabs.
445 * trans-array.h (gfc_trans_array_bounds, gfc_conv_descriptor_type,
446 gfc_get_cfi_desc_base_addr, gfc_get_cfi_desc_elem_len,
447 gfc_get_cfi_desc_version, gfc_get_cfi_desc_rank,
448 gfc_get_cfi_desc_type, gfc_get_cfi_desc_attribute,
449 gfc_get_cfi_dim_lbound, gfc_get_cfi_dim_extent, gfc_get_cfi_dim_sm):
451 * trans-decl.c (gfor_fndecl_cfi_to_gfc, gfor_fndecl_gfc_to_cfi):
453 (gfc_build_builtin_function_decls): Remove their initialization.
454 (gfc_get_symbol_decl, create_function_arglist,
455 gfc_trans_deferred_vars): Update for CFI.
456 (convert_CFI_desc): Remove and replace by ...
457 (gfc_conv_cfi_to_gfc): ... this function
458 (gfc_generate_function_code): Call it; create local GFC var for CFI.
459 * trans-expr.c (gfc_maybe_dereference_var): Handle CFI.
460 (gfc_conv_subref_array_arg): Handle the if-noncontigous-only copy in
461 when the result should be a descriptor.
462 (gfc_conv_gfc_desc_to_cfi_desc): Completely rewritten.
463 (gfc_conv_procedure_call): CFI fixes.
464 * trans-openmp.c (gfc_omp_is_optional_argument,
465 gfc_omp_check_optional_argument): Handle optional
467 * trans-stmt.c (gfc_trans_select_rank_cases): Cleanup, avoid invalid
468 code for allocatable/pointer dummies, which cannot be assumed size.
469 * trans-types.c (gfc_cfi_descriptor_base): New global var.
470 (gfc_get_dtype_rank_type): Skip rank init for rank < 0.
471 (gfc_sym_type): Handle CFI dummies.
472 (gfc_get_function_type): Update call.
473 (gfc_get_cfi_dim_type, gfc_get_cfi_type): New.
474 * trans-types.h (gfc_sym_type): Update prototype.
475 (gfc_get_cfi_type): New prototype.
476 * trans.c (gfc_trans_runtime_check): Make conditions more consistent
477 to avoid '<logical> AND_THEN <long int>' in conditions.
478 * trans.h (gfor_fndecl_cfi_to_gfc, gfor_fndecl_gfc_to_cfi): Remove
479 global-var declaration.
481 2021-10-18 Tobias Burnus <tobias@codesourcery.com>
484 * intrinsic.c (gfc_convert_type_warn): Fix checks by checking CLASS
485 and do typcheck in correct order for type extension.
486 * misc.c (gfc_typename): Print proper not internal CLASS type name.
488 2021-10-15 Harald Anlauf <anlauf@gmx.de>
489 Tobias Burnus <tobias@codesourcery.com>
492 * decl.c (match_clist_expr): Set rank/shape of clist initializer
494 * resolve.c (resolve_structure_cons): In a structure constructor,
495 compare shapes of array components against declared shape.
497 2021-10-14 Harald Anlauf <anlauf@gmx.de>
500 * simplify.c (gfc_simplify_reshape): Replace assert by error
501 message for negative elements in SHAPE array.
503 2021-10-14 Harald Anlauf <anlauf@gmx.de>
506 * check.c (gfc_check_shape): Reorder checks so that invalid KIND
507 arguments can be detected.
509 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
511 * gfortran.h (enum gfc_statement): Add ST_OMP_DECLARE_VARIANT.
512 (enum gfc_omp_trait_property_kind): New.
513 (struct gfc_omp_trait_property): New.
514 (gfc_get_omp_trait_property): New macro.
515 (struct gfc_omp_selector): New.
516 (gfc_get_omp_selector): New macro.
517 (struct gfc_omp_set_selector): New.
518 (gfc_get_omp_set_selector): New macro.
519 (struct gfc_omp_declare_variant): New.
520 (gfc_get_omp_declare_variant): New macro.
521 (struct gfc_namespace): Add omp_declare_variant field.
522 (gfc_free_omp_declare_variant_list): New prototype.
523 * match.h (gfc_match_omp_declare_variant): New prototype.
524 * openmp.c (gfc_free_omp_trait_property_list): New.
525 (gfc_free_omp_selector_list): New.
526 (gfc_free_omp_set_selector_list): New.
527 (gfc_free_omp_declare_variant_list): New.
528 (gfc_match_omp_clauses): Add extra optional argument. Handle end of
529 clauses for context selectors.
530 (omp_construct_selectors, omp_device_selectors,
531 omp_implementation_selectors, omp_user_selectors): New.
532 (gfc_match_omp_context_selector): New.
533 (gfc_match_omp_context_selector_specification): New.
534 (gfc_match_omp_declare_variant): New.
535 * parse.c: Include tree-core.h and omp-general.h.
536 (decode_omp_directive): Handle 'declare variant'.
537 (case_omp_decl): Include ST_OMP_DECLARE_VARIANT.
538 (gfc_ascii_statement): Handle ST_OMP_DECLARE_VARIANT.
539 (gfc_parse_file): Initialize omp_requires_mask.
540 * symbol.c (gfc_free_namespace): Call
541 gfc_free_omp_declare_variant_list.
542 * trans-decl.c (gfc_get_extern_function_decl): Call
543 gfc_trans_omp_declare_variant.
544 (gfc_create_function_decl): Call gfc_trans_omp_declare_variant.
545 * trans-openmp.c (gfc_trans_omp_declare_variant): New.
546 * trans-stmt.h (gfc_trans_omp_declare_variant): New prototype.
548 2021-10-13 Tobias Burnus <tobias@codesourcery.com>
550 * dump-parse-tree.c (show_omp_clauses): Handle ancestor modifier,
551 avoid ICE for GFC_OMP_ATOMIC_SWAP.
552 * gfortran.h (gfc_omp_clauses): Change 'anecestor' into a bitfield.
554 2021-10-12 Tobias Burnus <tobias@codesourcery.com>
557 * check.c (gfc_check_present): Handle optional CLASS.
558 * interface.c (gfc_compare_actual_formal): Likewise.
559 * trans-array.c (gfc_trans_g77_array): Likewise.
560 * trans-decl.c (gfc_build_dummy_array_decl): Likewise.
561 * trans-types.c (gfc_sym_type): Likewise.
562 * primary.c (gfc_variable_attr): Fixes for dummy and
563 pointer when 'class%_data' is passed.
564 * trans-expr.c (set_dtype_for_unallocated, gfc_conv_procedure_call):
565 For assumed-rank dummy, fix setting rank for dealloc/notassoc actual
566 and setting ubound to -1 for assumed-size actuals.
568 2021-10-10 Harald Anlauf <anlauf@gmx.de>
572 * decl.c (add_init_expr_to_sym): Extend initialization of
573 parameter arrays from scalars to handle derived types.
575 2021-10-09 Harald Anlauf <anlauf@gmx.de>
578 * module.c (read_module): Handle old and new-style relational
579 operators when used in USE module, ONLY: OPERATOR(op).
581 2021-10-08 Sandra Loosemore <sandra@codesourcery.com>
584 * interface.c (gfc_compare_actual_formal): Add diagnostic
585 for F2018:C839. Refactor shared code and fix bugs with class
586 array info lookup, and extend similar diagnostic from PR94110
587 to also cover class types.
589 2021-10-08 Martin Liska <mliska@suse.cz>
591 * options.c (gfc_post_options): Use new macro
594 2021-10-06 Tobias Burnus <tobias@codesourcery.com>
596 * resolve.c (resolve_values): Only show
597 deprecated warning if attr.referenced.
599 2021-10-04 Tobias Burnus <tobias@codesourcery.com>
602 * resolve.c (can_generate_init, resolve_fl_variable_derived,
603 resolve_symbol): Only do initialization with intent(out) if not
604 inside of an interface block.
606 2021-10-01 Martin Sebor <msebor@redhat.com>
609 * array.c: Remove an unnecessary test.
610 * trans-array.c: Same.
612 2021-10-01 Jakub Jelinek <jakub@redhat.com>
614 * gfortran.h (gfc_omp_clauses): Add order_reproducible bitfield.
615 * dump-parse-tree.c (show_omp_clauses): Print REPRODUCIBLE: for it.
616 * openmp.c (gfc_match_omp_clauses): Set order_reproducible for
617 explicit reproducible: modifier.
618 * trans-openmp.c (gfc_trans_omp_clauses): Set
619 OMP_CLAUSE_ORDER_REPRODUCIBLE for order_reproducible.
620 (gfc_split_omp_clauses): Also copy order_reproducible.
622 2021-09-30 Harald Anlauf <anlauf@gmx.de>
625 * simplify.c (simplify_size): Resolve expressions used in array
626 specifications so that SIZE can be simplified.
628 2021-09-30 Harald Anlauf <anlauf@gmx.de>
630 * expr.c: The correct reference to Fortran standard is: F2018:10.1.12.
632 2021-09-30 Tobias Burnus <tobias@codesourcery.com>
636 * trans-intrinsic.c (gfc_conv_same_type_as): Fix handling
638 * trans.h (gfc_vtpr_hash_get): Renamed prototype to ...
639 (gfc_vptr_hash_get): ... this to match function name.
641 2021-09-29 Harald Anlauf <anlauf@gmx.de>
644 * array.c (expand_constructor): Do not dereference NULL pointer.
646 2021-09-27 Tobias Burnus <tobias@codesourcery.com>
649 * trans-array.c (gfc_tree_array_size): New function to
650 find size inline (whole array or one dimension).
651 (array_parameter_size): Use it, take stmt_block as arg.
652 (gfc_conv_array_parameter): Update call.
653 * trans-array.h (gfc_tree_array_size): Add prototype.
654 * trans-decl.c (gfor_fndecl_size0, gfor_fndecl_size1): Remove
656 (gfc_build_intrinsic_function_decls): Remove their initialization.
657 * trans-expr.c (gfc_conv_procedure_call): Update
658 bounds of pointer/allocatable actual args to nonallocatable/nonpointer
659 dummies to be one based.
660 * trans-intrinsic.c (gfc_conv_intrinsic_shape): Fix case for
661 assumed rank with allocatable/pointer dummy.
662 (gfc_conv_intrinsic_size): Update to use inline function.
663 * trans.h (gfor_fndecl_size0, gfor_fndecl_size1): Remove var decl.
665 2021-09-26 Tobias Burnus <tobias@codesourcery.com>
668 * trans-intrinsic.c (gfc_conv_associated): Support assumed-rank
669 'pointer' with scalar/array 'target' argument.
671 2021-09-24 Harald Anlauf <anlauf@gmx.de>
674 * expr.c (is_non_constant_intrinsic): Check for intrinsics
675 excluded in constant expressions (F2018:10.1.2).
676 (gfc_is_constant_expr): Use that check.
678 2021-09-24 Sandra Loosemore <sandra@codesourcery.com>
681 * interface.c (compare_parameter): Enforce F2018 C711.
683 2021-09-24 Tobias Burnus <tobias@codesourcery.com>
686 * scanner.c (load_file): Return void, call (gfc_)fatal_error for
688 (include_line, include_stmt, gfc_new_file): Remove exit call
689 for failed load_file run.
691 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
694 * decl.c (gfc_verify_c_interop_param): Handle F2018 C1557,
697 2021-09-23 Harald Anlauf <anlauf@gmx.de>
698 Tobias Burnus <tobias@codesourcery.com>
701 * trans-intrinsic.c (gfc_conv_allocated): Cleanup. Handle
702 coindexed scalar coarrays.
704 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
707 * interface.c (gfc_compare_actual_formal): Extend existing
708 assumed-type diagnostic to also check for argument with type
711 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
714 * check.c (gfc_check_associated): Allow an assumed-rank
715 array for the pointer argument.
716 * interface.c (compare_parameter): Also give rank mismatch
717 error on assumed-rank array.
719 2021-09-23 Sandra Loosemore <sandra@codesourcery.com>
721 * trans-stmt.c (trans_associate_var): Check that result of
722 GFC_DECL_SAVED_DESCRIPTOR is not null before using it.
724 2021-09-22 Tobias Burnus <tobias@codesourcery.com>
727 * cpp.c (gfc_cpp_register_include_paths, gfc_cpp_post_options):
728 Add new bool verbose_missing_dir_warn argument.
729 * cpp.h (gfc_cpp_post_options): Update prototype.
730 * f95-lang.c (gfc_init): Remove duplicated file-not found diag.
731 * gfortran.h (gfc_check_include_dirs): Takes bool
732 verbose_missing_dir_warn arg.
733 (gfc_new_file): Returns now void.
734 * options.c (gfc_post_options): Update to warn for -I and -J,
735 only, by default but for all when user requested.
736 * scanner.c (gfc_do_check_include_dir):
737 (gfc_do_check_include_dirs, gfc_check_include_dirs): Take bool
738 verbose warn arg and update to avoid printing the same message
740 (load_file): Fix indent.
741 (gfc_new_file): Return void and exit when load_file failed
742 as all other load_file users do.
744 2021-09-22 Tobias Burnus <tobias@codesourcery.com>
746 * trans-expr.c (gfc_simple_for_loop): New.
747 * trans.h (gfc_simple_for_loop): New prototype.
749 2021-09-21 Tobias Burnus <tobias@codesourcery.com>
752 * cpp.c: Define GCC_C_COMMON_C for #include "options.h" to make
753 cpp_reason_option_codes available.
754 (gfc_cpp_register_include_paths): Make static, set pfile's
755 warn_missing_include_dirs and move before caller.
756 (gfc_cpp_init_cb): New, cb code moved from ...
757 (gfc_cpp_init_0): ... here.
758 (gfc_cpp_post_options): Call gfc_cpp_init_cb.
759 (cb_cpp_diagnostic_cpp_option): New. As implemented in c-family
760 to match CppReason flags to -W... names.
761 (cb_cpp_diagnostic): Use it to replace single special case.
762 * cpp.h (gfc_cpp_register_include_paths): Remove as now static.
763 * gfortran.h (gfc_check_include_dirs): New prototype.
764 (gfc_add_include_path): Add new bool arg.
765 * options.c (gfc_init_options): Don't set -Wmissing-include-dirs.
766 (gfc_post_options): Set it here after commandline processing. Call
767 gfc_add_include_path with defer_warn=false.
768 (gfc_handle_option): Call it with defer_warn=true.
769 * scanner.c (gfc_do_check_include_dir, gfc_do_check_include_dirs,
770 gfc_check_include_dirs): New. Diagnostic moved from ...
771 (add_path_to_list): ... here, which came before cmdline processing.
772 Take additional bool defer_warn argument.
773 (gfc_add_include_path): Take additional defer_warn arg.
774 * scanner.h (struct gfc_directorylist): Reorder for alignment issues,
777 2021-09-20 Tobias Burnus <tobias@codesourcery.com>
779 * gfortran.h (gfc_omp_clauses): Add order_unconstrained.
780 * dump-parse-tree.c (show_omp_clauses): Dump it.
781 * openmp.c (gfc_match_omp_clauses): Match unconstrained/reproducible
782 modifiers to ordered(concurrent).
783 (OMP_DISTRIBUTE_CLAUSES): Accept ordered clause.
784 (resolve_omp_clauses): Reject ordered + order on same directive.
785 * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses): Pass
786 on unconstrained modifier of ordered(concurrent).
788 2021-09-17 Harald Anlauf <anlauf@gmx.de>
791 * trans-decl.c (gfc_finish_var_decl): Disable the warning message
792 for variables moved from stack to static storange if they are
793 declared in the main, but allow the move to happen.
795 2021-09-17 Sandra Loosemore <sandra@codesourcery.com>
797 * intrinsic.texi (ISO_C_BINDING): Change C_FLOAT128 to correspond
798 to _Float128 rather than __float128.
799 * iso-c-binding.def (c_float128): Update comments.
800 * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Likewise.
801 (build_round_expr): Likewise.
802 (gfc_build_intrinsic_lib_fndcecls): Likewise.
803 * trans-types.h (gfc_real16_is_float128): Likewise.
805 2021-09-16 Harald Anlauf <anlauf@gmx.de>
808 * trans-expr.c (gfc_conv_procedure_call): Wrap deallocation of
809 allocatable components of optional allocatable derived type
810 procedure arguments with INTENT(OUT) into a presence check.
812 2021-09-14 Harald Anlauf <anlauf@gmx.de>
815 * resolve.c (resolve_entries): Attempt to recover cleanly after
816 rejecting mismatched function entries.
818 2021-09-14 Tobias Burnus <tobias@codesourcery.com>
821 * parse.c (gfc_ascii_statement): Add missing ST_OMP_END_SCOPE.
823 2021-09-13 Harald Anlauf <anlauf@gmx.de>
826 * decl.c (add_init_expr_to_sym): For proper initialization of
827 array-valued named constants the array bounds need to be
828 simplified before adding the initializer.
830 2021-09-13 Harald Anlauf <anlauf@gmx.de>
833 * expr.c (find_substring_ref): Handle given substring start and
834 end indices as signed integers, not unsigned.
836 2021-09-09 Harald Anlauf <anlauf@gmx.de>
839 * trans-expr.c (gfc_conv_substring): Do not generate substring
840 bounds check for implied do loop index variable before it actually
843 2021-09-08 liuhongt <hongtao.liu@intel.com>
845 * options.c (gfc_post_options): Issue an error for
846 -fexcess-precision=16.
848 2021-09-07 Harald Anlauf <anlauf@gmx.de>
851 * expr.c (find_array_element): When bounds cannot be determined as
852 constant, return error instead of aborting.
854 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
856 * openmp.c (gfc_match_omp_flush): Parse 'seq_cst' clause on 'flush'
858 * trans-openmp.c (gfc_trans_omp_flush): Handle OMP_MEMORDER_SEQ_CST.
860 2021-09-03 Tobias Burnus <tobias@codesourcery.com>
862 * decl.c (gfc_verify_c_interop_param): Reject pointer with
863 CONTIGUOUS attributes as dummy arg. Reject character len > 1
864 when passed as byte stream.
866 2021-09-01 Harald Anlauf <anlauf@gmx.de>
869 * resolve.c (resolve_common_vars): Fix grammar and improve wording
870 of error message rejecting an unlimited polymorphic in COMMON.
872 2021-08-31 Harald Anlauf <anlauf@gmx.de>
875 * simplify.c (substring_has_constant_len): Minimize checks for
876 substring expressions being allowed.
878 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
880 * gfortran.h: Add variable for 'ancestor' in struct gfc_omp_clauses.
881 * openmp.c (gfc_match_omp_clauses): Parse device-modifiers 'device_num'
882 and 'ancestor' in 'target device' clauses.
883 * trans-openmp.c (gfc_trans_omp_clauses): Set OMP_CLAUSE_DEVICE_ANCESTOR.
885 2021-08-30 Harald Anlauf <anlauf@gmx.de>
888 * match.c (gfc_match_goto): Allow for whitespace in parsing list
891 2021-08-30 Harald Anlauf <anlauf@gmx.de>
894 * resolve.c (resolve_allocate_expr): An unlimited polymorphic
895 argument to ALLOCATE must be ALLOCATABLE or a POINTER. Fix the
898 2021-08-28 Harald Anlauf <anlauf@gmx.de>
901 * resolve.c (resolve_entries): For functions of type CHARACTER
902 tighten the checks for matching characteristics.
904 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
907 * cpp.c (gfc_cpp_post_options): Call new function
908 diagnostic_initialize_input_context().
910 2021-08-24 Harald Anlauf <anlauf@gmx.de>
913 * trans-decl.c (gfc_finish_var_decl): Adjust check to handle
914 implicit SAVE as well as variables in the main program. Improve
915 warning message text.
917 2021-08-23 Tobias Burnus <tobias@codesourcery.com>
919 * openmp.c (gfc_match_dupl_check, gfc_match_dupl_memorder,
920 gfc_match_dupl_atomic): New.
921 (gfc_match_omp_clauses): Use them; remove duplicate
922 'release'/'relaxed' clause matching; improve error dignostic
925 2021-08-23 Tobias Burnus <tobias@codesourcery.com>
927 * dump-parse-tree.c (show_omp_clauses): Handle 'strict' modifier
928 on grainsize/num_tasks
929 * gfortran.h (gfc_omp_clauses): Add grainsize_strict
930 and num_tasks_strict.
931 * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses):
932 Handle 'strict' modifier on grainsize/num_tasks.
933 * openmp.c (gfc_match_omp_clauses): Likewise.
935 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
938 (error_uinteger): Take 'long long unsigned' instead
939 of 'long unsigned' as argumpent.
940 (error_integer): Take 'long long' instead of 'long'.
941 (error_hwuint, error_hwint): New.
942 (error_print): Update to handle 'll' and 'w'
944 * simplify.c (substring_has_constant_len): Use '%wd'
947 2021-08-20 Harald Anlauf <anlauf@gmx.de>
950 * simplify.c (substring_has_constant_len): Fix format string of
951 gfc_error, pass HOST_WIDE_INT bounds values via char buffer.
953 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
955 * dump-parse-tree.c (show_omp_clauses): Handle 'at', 'severity'
956 and 'message' clauses.
957 (show_omp_node, show_code_node): Handle EXEC_OMP_ERROR.
958 * gfortran.h (gfc_statement): Add ST_OMP_ERROR.
959 (gfc_omp_severity_type, gfc_omp_at_type): New.
960 (gfc_omp_clauses): Add 'at', 'severity' and 'message' clause;
961 use more bitfields + ENUM_BITFIELD.
962 (gfc_exec_op): Add EXEC_OMP_ERROR.
963 * match.h (gfc_match_omp_error): New.
964 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_(AT,SEVERITY,MESSAGE).
965 (gfc_match_omp_clauses): Handle new clauses.
966 (OMP_ERROR_CLAUSES, gfc_match_omp_error): New.
967 (resolve_omp_clauses): Resolve new clauses.
968 (omp_code_to_statement, gfc_resolve_omp_directive): Handle
970 * parse.c (decode_omp_directive, next_statement,
971 gfc_ascii_statement): Handle 'omp error'.
972 * resolve.c (gfc_resolve_blocks): Likewise.
973 * st.c (gfc_free_statement): Likewise.
974 * trans-openmp.c (gfc_trans_omp_error): Likewise.
975 (gfc_trans_omp_directive): Likewise.
976 * trans.c (trans_code): Likewise.
978 2021-08-20 Jakub Jelinek <jakub@redhat.com>
980 * types.def (BT_FN_VOID_CONST_PTR_SIZE): New DEF_FUNCTION_TYPE_2.
981 * f95-lang.c (ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST): Define.
983 2021-08-19 Harald Anlauf <anlauf@gmx.de>
986 * simplify.c (substring_has_constant_len): New.
987 (gfc_simplify_len): Handle case of substrings with constant
990 2021-08-18 Tobias Burnus <tobias@codesourcery.com>
992 * match.h (gfc_match_omp_nothing): New.
993 * openmp.c (gfc_match_omp_nothing): New.
994 * parse.c (decode_omp_directive): Match 'nothing' directive.
996 2021-08-17 Tobias Burnus <tobias@codesourcery.com>
998 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
1000 * gfortran.h (enum gfc_statement): Add ST_OMP_(END_)SCOPE.
1001 (enum gfc_exec_op): Add EXEC_OMP_SCOPE.
1002 * match.h (gfc_match_omp_scope): New.
1003 * openmp.c (OMP_SCOPE_CLAUSES): Define
1004 (gfc_match_omp_scope): New.
1005 (gfc_match_omp_cancellation_point, gfc_match_omp_end_nowait):
1006 Improve error diagnostic.
1007 (omp_code_to_statement): Handle ST_OMP_SCOPE.
1008 (gfc_resolve_omp_directive): Handle EXEC_OMP_SCOPE.
1009 * parse.c (decode_omp_directive, next_statement,
1010 gfc_ascii_statement, parse_omp_structured_block,
1011 parse_executable): Handle OpenMP's scope construct.
1012 * resolve.c (gfc_resolve_blocks): Likewise
1013 * st.c (gfc_free_statement): Likewise
1014 * trans-openmp.c (gfc_trans_omp_scope): New.
1015 (gfc_trans_omp_directive): Call it.
1016 * trans.c (trans_code): handle EXEC_OMP_SCOPE.
1018 2021-08-16 Tobias Burnus <tobias@codesourcery.com>
1020 * dump-parse-tree.c (show_omp_clauses): Handle 'filter' clause.
1021 (show_omp_node, show_code_node): Handle (combined) omp masked construct.
1022 * frontend-passes.c (gfc_code_walker): Likewise.
1023 * gfortran.h (enum gfc_statement): Add ST_OMP_*_MASKED*.
1024 (enum gfc_exec_op): Add EXEC_OMP_*_MASKED*.
1025 * match.h (gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
1026 gfc_match_omp_masked_taskloop_simd, gfc_match_omp_parallel_masked,
1027 gfc_match_omp_parallel_masked_taskloop,
1028 gfc_match_omp_parallel_masked_taskloop_simd): New prototypes.
1029 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_FILTER.
1030 (gfc_match_omp_clauses): Match it.
1031 (OMP_MASKED_CLAUSES, gfc_match_omp_parallel_masked,
1032 gfc_match_omp_parallel_masked_taskloop,
1033 gfc_match_omp_parallel_masked_taskloop_simd,
1034 gfc_match_omp_masked, gfc_match_omp_masked_taskloop,
1035 gfc_match_omp_masked_taskloop_simd): New.
1036 (resolve_omp_clauses): Resolve filter clause.
1037 (gfc_resolve_omp_parallel_blocks, resolve_omp_do,
1038 omp_code_to_statement, gfc_resolve_omp_directive): Handle
1039 omp masked constructs.
1040 * parse.c (decode_omp_directive, case_exec_markers,
1041 gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
1042 parse_executable): Likewise.
1043 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
1044 * st.c (gfc_free_statement): Likewise.
1045 * trans-openmp.c (gfc_trans_omp_clauses): Handle filter clause.
1046 (GFC_OMP_SPLIT_MASKED, GFC_OMP_MASK_MASKED): New enum values.
1047 (gfc_trans_omp_masked): New.
1048 (gfc_split_omp_clauses): Handle combined masked directives.
1049 (gfc_trans_omp_master_taskloop): Rename to ...
1050 (gfc_trans_omp_master_masked_taskloop): ... this; handle also
1051 combined masked directives.
1052 (gfc_trans_omp_parallel_master): Rename to ...
1053 (gfc_trans_omp_parallel_master_masked): ... this; handle
1054 combined masked directives.
1055 (gfc_trans_omp_directive): Handle EXEC_OMP_*_MASKED*.
1056 * trans.c (trans_code): Likewise.
1058 2021-08-15 Harald Anlauf <anlauf@gmx.de>
1061 * match.c (sync_statement): Replace %v code by %e in gfc_match to
1062 allow for function references as STAT and ERRMSG arguments.
1063 * resolve.c (resolve_sync): Adjust checks of STAT= and ERRMSG= to
1064 being definable arguments. Function references with a data
1065 pointer result are accepted.
1066 * trans-stmt.c (gfc_trans_sync): Adjust assertion.
1068 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
1070 * gfortran.h (gfc_omp_proc_bind_kind): Add OMP_PROC_BIND_PRIMARY.
1071 * dump-parse-tree.c (show_omp_clauses): Add TODO comment to
1072 change 'master' to 'primary' in proc_bind for OpenMP 5.1.
1073 * intrinsic.texi (OMP_LIB): Mention OpenMP 5.1; add
1074 omp_proc_bind_primary.
1075 * openmp.c (gfc_match_omp_clauses): Accept
1076 'primary' as alias for 'master'.
1077 * trans-openmp.c (gfc_trans_omp_clauses): Handle
1078 OMP_PROC_BIND_PRIMARY.
1080 2021-08-11 Sandra Loosemore <sandra@codesourcery.com>
1082 * iso-c-binding.def (c_float128, c_float128_complex): Check
1083 float128_type_node instead of gfc_float128_type_node.
1084 * trans-types.c (gfc_init_kinds, gfc_build_real_type):
1085 Update comments re supported 128-bit floating-point types.
1087 2021-08-11 Richard Biener <rguenther@suse.de>
1089 * trans-common.c (create_common): Set TREE_THIS_VOLATILE on the
1090 COMPONENT_REF if the field is volatile.
1092 2021-08-07 Harald Anlauf <anlauf@gmx.de>
1095 * primary.c (gfc_expr_attr): Variable attribute can only be
1096 inquired when symtree is non-NULL.
1098 2021-07-28 Harald Anlauf <anlauf@gmx.de>
1101 * expr.c (gfc_check_vardef_context): Add check for KIND and LEN
1102 parameter inquiries.
1103 * match.c (gfc_match): Fix comment for %v code.
1104 (gfc_match_allocate, gfc_match_deallocate): Replace use of %v code
1105 by %e in gfc_match to allow for function references as STAT and
1107 * resolve.c (resolve_allocate_deallocate): Avoid NULL pointer
1108 dereferences and shortcut for bad STAT and ERRMSG argument to
1109 (DE)ALLOCATE. Remove bogus parts of checks for STAT and ERRMSG.
1111 2021-07-26 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1112 Tobias Burnus <tobias@codesourcery.com>
1119 * trans-decl.c (convert_CFI_desc): Only copy out the descriptor
1121 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Updated attribute
1122 handling which reflect a previous intermediate version of the
1123 standard. Only copy out the descriptor if necessary.
1125 2021-07-23 Harald Anlauf <anlauf@gmx.de>
1128 * check.c (array_check): Adjust check for the case of CLASS
1131 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1132 Joseph Myers <joseph@codesourcery.com>
1133 Cesar Philippidis <cesar@codesourcery.com>
1135 * dump-parse-tree.c (show_attr): Update.
1136 * gfortran.h (symbol_attribute): Add 'oacc_routine_nohost' member.
1137 (gfc_omp_clauses): Add 'nohost' member.
1138 * module.c (ab_attribute): Add 'AB_OACC_ROUTINE_NOHOST'.
1139 (attr_bits, mio_symbol_attribute): Update.
1140 * openmp.c (omp_mask2): Add 'OMP_CLAUSE_NOHOST'.
1141 (gfc_match_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1142 (OACC_ROUTINE_CLAUSES): Add 'OMP_CLAUSE_NOHOST'.
1143 (gfc_match_oacc_routine): Update.
1144 * trans-decl.c (add_attributes_to_decl): Update.
1145 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
1147 2021-07-21 Harald Anlauf <anlauf@gmx.de>
1150 * target-memory.c (gfc_interpret_derived): Size of array component
1151 of derived type can only be computed here for explicit shape.
1152 * trans-types.c (gfc_get_nodesc_array_type): Do not dereference
1155 2021-07-21 Tobias Burnus <tobias@codesourcery.com>
1157 * decl.c (gfc_verify_c_interop_param): Update for F2008 + F2018
1158 changes; reject unsupported bits with 'Error: Sorry,'.
1159 * trans-expr.c (gfc_conv_procedure_call): Fix condition to
1160 For using CFI descriptor with characters.
1162 2021-07-18 Harald Anlauf <anlauf@gmx.de>
1165 * io.c (resolve_tag_format): Extend FORMAT check to unknown type.
1167 2021-07-14 Harald Anlauf <anlauf@gmx.de>
1170 * trans-expr.c (gfc_trans_class_init_assign): Call
1171 gfc_conv_expr_present only for dummy variables.
1173 2021-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1176 * frontend-passes.c (traverse_io_block): Adjust test for
1177 when a variable is eligible for the transformation to
1180 2021-06-28 Martin Sebor <msebor@redhat.com>
1182 * trans-array.c (trans_array_constructor): Replace direct uses
1183 of TREE_NO_WARNING with warning_suppressed_p, and suppress_warning.
1184 * trans-decl.c (gfc_build_qualified_array): Same.
1185 (gfc_build_dummy_array_decl): Same.
1186 (generate_local_decl): Same.
1187 (gfc_generate_function_code): Same.
1188 * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
1189 (gfc_omp_clause_copy_ctor): Same.
1190 * trans-types.c (get_dtype_type_node): Same.
1191 (gfc_get_desc_dim_type): Same.
1192 (gfc_get_array_descriptor_base): Same.
1193 (gfc_get_caf_vector_type): Same.
1194 (gfc_get_caf_reference_type): Same.
1195 * trans.c (gfc_create_var_np): Same.
1197 2021-06-23 Tobias Burnus <tobias@codesourcery.com>
1199 * dump-parse-tree.c (show_omp_clauses): Fix enum type used
1200 for dumping gfc_omp_defaultmap_category.
1202 2021-06-23 Andre Vehreschild <vehre@gcc.gnu.org>
1205 * trans-intrinsic.c (conv_co_collective): Check stat for null ptr
1206 before dereferrencing.
1208 2021-06-18 Harald Anlauf <anlauf@gmx.de>
1212 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Unconditionally
1213 convert result of min/max to result type.
1215 2021-06-16 Harald Anlauf <anlauf@gmx.de>
1219 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
1221 * match.c (gfc_match_pointer_assignment): Likewise.
1222 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
1225 2021-06-16 Harald Anlauf <anlauf@gmx.de>
1228 2021-06-16 Harald Anlauf <anlauf@gmx.de>
1232 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
1234 * match.c (gfc_match_pointer_assignment): Likewise.
1235 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
1238 2021-06-16 Harald Anlauf <anlauf@gmx.de>
1242 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer
1244 * match.c (gfc_match_pointer_assignment): Likewise.
1245 * parse.c (gfc_check_do_variable): Avoid comparison with NULL
1248 2021-06-15 Tobias Burnus <tobias@codesourcery.com>
1251 * dump-parse-tree.c (show_omp_clauses): Update for defaultmap.
1252 * f95-lang.c (LANG_HOOKS_OMP_ALLOCATABLE_P,
1253 LANG_HOOKS_OMP_SCALAR_TARGET_P): New.
1254 * gfortran.h (enum gfc_omp_defaultmap,
1255 enum gfc_omp_defaultmap_category): New.
1256 * openmp.c (gfc_match_omp_clauses): Update defaultmap matching.
1257 * trans-decl.c (gfc_finish_decl_attrs): Set GFC_DECL_SCALAR_TARGET.
1258 * trans-openmp.c (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
1259 (gfc_omp_scalar_p): Take 'ptr_alloc_ok' argument.
1260 (gfc_trans_omp_clauses, gfc_split_omp_clauses): Update for
1262 * trans.h (gfc_omp_scalar_p): Update prototype.
1263 (gfc_omp_allocatable_p, gfc_omp_scalar_target_p): New.
1264 (struct lang_decl): Add scalar_target.
1265 (GFC_DECL_SCALAR_TARGET, GFC_DECL_GET_SCALAR_TARGET): New.
1267 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
1269 * resolve.c (resolve_variable): Remove *XCNEW used to
1270 nullify nullified memory.
1272 2021-06-09 Martin Liska <mliska@suse.cz>
1274 * intrinsic.texi: Add missing @headitem to tables with a header.
1276 2021-06-09 Jakub Jelinek <jakub@redhat.com>
1279 * trans-openmp.c (gfc_omp_finish_clause): Gimplify OMP_CLAUSE_SIZE.
1281 2021-06-08 Tobias Burnus <tobias@codesourcery.com>
1284 * trans-openmp.c (gfc_add_clause_implicitly): New.
1285 (gfc_split_omp_clauses): Use it.
1286 (gfc_free_split_omp_clauses): New.
1287 (gfc_trans_omp_do_simd, gfc_trans_omp_parallel_do,
1288 gfc_trans_omp_parallel_do_simd, gfc_trans_omp_distribute,
1289 gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_taskloop,
1290 gfc_trans_omp_master_taskloop, gfc_trans_omp_parallel_master): Use it.
1292 2021-06-08 Martin Liska <mliska@suse.cz>
1294 * intrinsic.texi: Fix typo.
1295 * trans-expr.c (gfc_trans_pointer_assignment): Likewise.
1297 2021-06-05 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1304 * trans-array.c (gfc_get_array_span): rework the way character
1305 array "span" was calculated.
1306 (gfc_conv_expr_descriptor): improve handling of character sections
1307 and unlimited polymorphic objects.
1308 * trans-expr.c (gfc_get_character_len): new function to calculate
1309 character string length.
1310 (gfc_get_character_len_in_bytes): new function to calculate
1311 character string length in bytes.
1312 (gfc_conv_scalar_to_descriptor): add call to set the "span".
1313 (gfc_trans_pointer_assignment): set "_len" and antecipate the
1314 initialization of the deferred character length hidden argument.
1315 * trans-intrinsic.c (gfc_conv_associated): set "force_no_tmp" to
1316 avoid the creation of a temporary.
1317 * trans-types.c (gfc_get_dtype_rank_type): rework type detection
1318 so that unlimited polymorphic objects get proper type infomation,
1319 also important for bind(c).
1320 (gfc_get_dtype): add argument to pass the rank if necessary.
1321 (gfc_get_array_type_bounds): cosmetic change to have character
1322 arrays called character instead of unknown.
1323 * trans-types.h (gfc_get_dtype): modify prototype.
1324 * trans.c (get_array_span): rework the way character array "span"
1326 * trans.h (gfc_get_character_len): new prototype.
1327 (gfc_get_character_len_in_bytes): new prototype.
1328 Add "unlimited_polymorphic" flag to "gfc_se" type to signal when
1329 expression carries an unlimited polymorphic object.
1331 2021-06-04 Harald Anlauf <anlauf@gmx.de>
1334 * frontend-passes.c (inline_matmul_assign): Do not inline matmul
1335 if the assignment to the resulting array if it is not of canonical
1336 type (real/integer/complex/logical).
1338 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
1340 * dump-parse-tree.c (show_code_node): Handle
1341 EXEC_OMP_(TARGET_)(,PARALLEL_,TEAMS_)LOOP.
1343 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
1345 * scanner.c (skip_fixed_omp_sentinel): Set openacc_flag if
1346 this is not an (OpenMP) continuation line.
1347 (skip_fixed_oacc_sentinel): Likewise for openmp_flag and OpenACC.
1348 (gfc_next_char_literal): gfc_error_now to force error for mixed OMP/ACC
1349 continuation once per location and return '\n'.
1351 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
1354 * openmp.c (gfc_match_omp_clauses): Fix typo in error message.
1356 2021-06-04 Tobias Burnus <tobias@codesourcery.com>
1359 * dump-parse-tree.c (show_omp_clauses): Handle bind clause.
1360 (show_omp_node): Handle loop directive.
1361 * frontend-passes.c (gfc_code_walker): Likewise.
1362 * gfortran.h (enum gfc_statement): Add
1363 ST_OMP_(END_)(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
1364 (enum gfc_omp_bind_type): New.
1365 (gfc_omp_clauses): Use it.
1366 (enum gfc_exec_op): Add EXEC_OMP_(TARGET_)(|PARALLEL_|TEAMS_)LOOP.
1367 * match.h (gfc_match_omp_loop, gfc_match_omp_parallel_loop,
1368 gfc_match_omp_target_parallel_loop, gfc_match_omp_target_teams_loop,
1369 gfc_match_omp_teams_loop): New.
1370 * openmp.c (enum omp_mask1): Add OMP_CLAUSE_BIND.
1371 (gfc_match_omp_clauses): Handle it.
1372 (OMP_LOOP_CLAUSES, gfc_match_omp_loop, gfc_match_omp_teams_loop,
1373 gfc_match_omp_target_teams_loop, gfc_match_omp_parallel_loop,
1374 gfc_match_omp_target_parallel_loop): New.
1375 (resolve_omp_clauses, resolve_omp_do, omp_code_to_statement,
1376 gfc_resolve_omp_directive): Handle omp loop.
1377 * parse.c (decode_omp_directive case_exec_markers, gfc_ascii_statement,
1378 parse_omp_do, parse_executable): Likewise.
1379 (parse_omp_structured_block): Remove ST_ which use parse_omp_do.
1380 * resolve.c (gfc_resolve_blocks): Add omp loop.
1381 * st.c (gfc_free_statement): Likewise.
1382 * trans-openmp.c (gfc_trans_omp_clauses): Handle bind clause.
1383 (gfc_trans_omp_do, gfc_trans_omp_parallel_do, gfc_trans_omp_distribute,
1384 gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_directive):
1385 Handle loop directive.
1386 (gfc_split_omp_clauses): Likewise; fix firstprivate/lastprivate
1387 and (in_)reduction for taskloop.
1388 * trans.c (trans_code): Handle omp loop directive.
1390 2021-06-01 Tobias Burnus <tobias@codesourcery.com>
1393 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
1394 (parallel) master taskloop (simd).
1395 * frontend-passes.c (gfc_code_walker): Set in_omp_workshare
1396 to false for parallel master taskloop (simd).
1397 * gfortran.h (enum gfc_statement):
1398 Add ST_OMP_(END_)(PARALLEL_)MASTER_TASKLOOP(_SIMD).
1399 (enum gfc_exec_op): EXEC_OMP_(PARALLEL_)MASTER_TASKLOOP(_SIMD).
1400 * match.h (gfc_match_omp_master_taskloop,
1401 gfc_match_omp_master_taskloop_simd,
1402 gfc_match_omp_parallel_master_taskloop,
1403 gfc_match_omp_parallel_master_taskloop_simd): New prototype.
1404 * openmp.c (gfc_match_omp_parallel_master_taskloop,
1405 gfc_match_omp_parallel_master_taskloop_simd,
1406 gfc_match_omp_master_taskloop,
1407 gfc_match_omp_master_taskloop_simd): New.
1408 (gfc_match_omp_taskloop_simd): Permit 'reduction' clause.
1409 (resolve_omp_clauses): Handle new combined directives; remove
1410 inscan-reduction check to reduce multiple errors; add
1411 task-reduction error for 'taskloop simd'.
1412 (gfc_resolve_omp_parallel_blocks,
1413 resolve_omp_do, omp_code_to_statement,
1414 gfc_resolve_omp_directive): Handle new combined constructs.
1415 * parse.c (decode_omp_directive, next_statement,
1416 gfc_ascii_statement, parse_omp_do, parse_omp_structured_block,
1417 parse_executable): Likewise.
1418 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
1419 * st.c (gfc_free_statement): Likewise.
1420 * trans.c (trans_code): Likewise.
1421 * trans-openmp.c (gfc_split_omp_clauses,
1422 gfc_trans_omp_directive): Likewise.
1423 (gfc_trans_omp_parallel_master): Move after gfc_trans_omp_master_taskloop;
1424 handle parallel master taskloop (simd) as well.
1425 (gfc_trans_omp_taskloop): Take gfc_exec_op as arg.
1426 (gfc_trans_omp_master_taskloop): New.
1428 2021-05-30 Gerald Pfeifer <gerald@pfeifer.com>
1430 * gfortran.texi (BOZ literal constants): Fix typo.
1432 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
1434 * dump-parse-tree.c (show_iterator): New.
1435 (show_omp_namelist): Handle iterators.
1436 (show_omp_clauses): Handle affinity.
1437 * gfortran.h (gfc_free_omp_namelist): New union with 'udr' and new 'ns'.
1438 * match.c (gfc_free_omp_namelist): Add are to choose union element.
1439 * openmp.c (gfc_free_omp_clauses, gfc_match_omp_detach,
1440 gfc_match_omp_clause_reduction, gfc_match_omp_flush): Update
1441 call to gfc_free_omp_namelist.
1442 (gfc_match_omp_variable_list): Likewise; permit preceeding whitespace.
1443 (enum omp_mask1): Add OMP_CLAUSE_AFFINITY.
1444 (gfc_match_iterator): New.
1445 (gfc_match_omp_clauses): Use it; update call to gfc_free_omp_namelist.
1446 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_AFFINITY.
1447 (gfc_match_omp_taskwait): Match depend clause.
1448 (resolve_omp_clauses): Handle affinity; update for udr/union change.
1449 (gfc_resolve_omp_directive): Resolve clauses of taskwait.
1450 * st.c (gfc_free_statement): Update gfc_free_omp_namelist call.
1451 * trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Likewise
1452 (handle_iterator): New.
1453 (gfc_trans_omp_clauses): Handle iterators for depend/affinity clause.
1454 (gfc_trans_omp_taskwait): Handle depend clause.
1455 (gfc_trans_omp_directive): Update call.
1457 2021-05-27 Harald Anlauf <anlauf@gmx.de>
1460 * trans-intrinsic.c (gfc_conv_intrinsic_size): Use CLASS data
1461 attributes for CLASS arrays for generation of runtime error.
1463 2021-05-27 Harald Anlauf <anlauf@gmx.de>
1466 * trans-array.c (gfc_conv_ss_startstride): Do not call check for
1467 presence of a dummy argument when a symbol actually refers to a
1470 2021-05-25 Tobias Burnus <tobias@codesourcery.com>
1471 Johannes Nendwich <a08727063@unet.univie.ac.at>
1473 * intrinsic.texi (GERROR, GETARGS, GETLOG, NORM2, PARITY, RANDOM_INIT,
1474 RANDOM_NUMBER): Fix typos and copy'n'paste errors.
1476 2021-05-24 Tobias Burnus <tobias@codesourcery.com>
1479 * trans-expr.c (gfc_copy_class_to_class): Add unshare_expr.
1480 * trans-openmp.c (gfc_is_polymorphic_nonptr,
1481 gfc_is_unlimited_polymorphic_nonptr): New.
1482 (gfc_omp_clause_copy_ctor, gfc_omp_clause_dtor): Handle
1483 polymorphic scalars.
1485 2021-05-23 Harald Anlauf <anlauf@gmx.de>
1488 * trans-expr.c (gfc_conv_procedure_call): Adjust check for
1489 implicit conversion of actual argument to an unlimited polymorphic
1492 2021-05-23 Tobias Burnus <tobias@codesourcery.com>
1494 * intrinsic.texi (ATOMIC_ADD, ATOMIC_FETCH_ADD): Use the
1495 proper variable name in the description.
1497 2021-05-22 Andre Vehreschild <vehre@gcc.gnu.org>
1498 Steve Kargl <kargl@gcc.gnu.org>
1501 * trans-decl.c (gfc_build_builtin_function_decls): Move decl.
1502 * trans-intrinsic.c (conv_intrinsic_random_init): Use bool for
1503 lib-call of caf_random_init instead of logical (4-byte).
1504 * trans.h: Add tree var for random_init.
1506 2021-05-20 Marcel Vollweiler <marcel@codesourcery.com>
1508 * openmp.c (gfc_match_omp_clauses): Support map-type-modifier 'close'.
1510 2021-05-18 Tobias Burnus <tobias@codesourcery.com>
1513 * openmp.c (omp_code_to_statement): Add missing EXEC_OMP_DEPOBJ.
1515 2021-05-17 Harald Anlauf <anlauf@gmx.de>
1518 * trans-decl.c (gfc_finish_var_decl): Add check for explicit SAVE
1521 2021-05-17 Tobias Burnus <tobias@codesourcery.com>
1524 * resolve.c (gfc_resolve_code): Reject nonintrinsic assignments in
1527 2021-05-14 Tobias Burnus <tobias@codesourcery.com>
1529 * dump-parse-tree.c (show_omp_node, show_code_node): Handle
1530 EXEC_OMP_PARALLEL_MASTER.
1531 * frontend-passes.c (gfc_code_walker): Likewise.
1532 * gfortran.h (enum gfc_statement): Add ST_OMP_PARALLEL_MASTER and
1533 ST_OMP_END_PARALLEL_MASTER.
1534 (enum gfc_exec_op): Add EXEC_OMP_PARALLEL_MASTER..
1535 * match.h (gfc_match_omp_parallel_master): Handle it.
1536 * openmp.c (gfc_match_omp_parallel_master, resolve_omp_clauses,
1537 omp_code_to_statement, gfc_resolve_omp_directive): Likewise.
1538 * parse.c (decode_omp_directive, case_exec_markers,
1539 gfc_ascii_statement, parse_omp_structured_block,
1540 parse_executable): Likewise.
1541 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
1542 * st.c (gfc_free_statement): Likewise.
1543 * trans-openmp.c (gfc_trans_omp_parallel_master,
1544 gfc_trans_omp_workshare, gfc_trans_omp_directive): Likewise.
1545 * trans.c (trans_code): Likewise.
1547 2021-05-14 Tobias Burnus <tobias@codesourcery.com>
1549 * resolve.c (resolve_symbol): Handle implicit SAVE of main-program
1550 for vars in 'omp threadprivate' and 'omp declare target'.
1552 2021-05-10 Martin Liska <mliska@suse.cz>
1554 * decl.c (variable_decl): Use startswith
1555 function instead of strncmp.
1556 (gfc_match_end): Likewise.
1557 * gfortran.h (gfc_str_startswith): Likewise.
1558 * module.c (load_omp_udrs): Likewise.
1559 (read_module): Likewise.
1560 * options.c (gfc_handle_runtime_check_option): Likewise.
1561 * primary.c (match_arg_list_function): Likewise.
1562 * trans-decl.c (gfc_get_symbol_decl): Likewise.
1563 * trans-expr.c (gfc_conv_procedure_call): Likewise.
1564 * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Likewise.
1566 2021-05-06 Paul Thomas <pault@gcc.gnu.org>
1570 * class.c (gfc_build_class_symbol): Remove the error that
1571 disables assumed size class arrays. Class array types that are
1572 not deferred shape or assumed rank are given a unique name and
1573 placed in the procedure namespace.
1574 * trans-array.c (gfc_trans_g77_array): Obtain the data pointer
1576 (gfc_trans_dummy_array_bias): Suppress the runtime error for
1577 extent violations in explicit shape class arrays because it
1579 * trans-expr.c (gfc_conv_procedure_call): Handle assumed size
1580 class actual arguments passed to non-descriptor formal args by
1581 using the data pointer, stored as the symbol's backend decl.
1583 2021-05-05 Harald Anlauf <anlauf@gmx.de>
1586 * interface.c (gfc_compare_actual_formal): Continue checks after
1587 emitting warning for argument length mismatch.
1588 * trans-expr.c (gfc_conv_procedure_call): Check for NULL pointer
1591 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
1594 * trans-openmp.c (gfc_trans_omp_depobj): Fix pasto in enum values.
1596 2021-04-28 Tobias Burnus <tobias@codesourcery.com>
1598 * openmp.c (gfc_match_omp_variable_list): Gobble whitespace before
1599 checking whether a '%' or parenthesis-open follows as next character.
1601 2021-04-28 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1604 * trans-expr.c (gfc_conv_procedure_call): Evaluate function result
1605 and then pass a pointer.
1607 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1608 Nathan Sidwell <nathan@codesourcery.com>
1609 Tom de Vries <vries@codesourcery.com>
1610 Julian Brown <julian@codesourcery.com>
1611 Kwok Cheung Yeung <kcy@codesourcery.com>
1613 * lang.opt (Wopenacc-parallelism): New.
1615 2021-04-24 Harald Anlauf <anlauf@gmx.de>
1618 * check.c (variable_check): Allow function reference having a data
1620 (arg_strlen_is_zero): New function.
1621 (gfc_check_fgetputc_sub): Add static check of character and status
1623 (gfc_check_fgetput_sub): Likewise.
1624 * intrinsic.c (add_subroutines): Fix argument name for the
1625 character argument to intrinsic subroutines fget[c], fput[c].
1627 2021-04-24 Harald Anlauf <anlauf@gmx.de>
1630 * expr.c (gfc_check_vardef_context): Extend check to allow pointer
1631 from a function reference.
1633 2021-04-22 Martin Liska <mliska@suse.cz>
1637 * frontend-passes.c (optimize_expr): Fix typos and missing comments.
1639 2021-04-22 Michael Meissner <meissner@linux.ibm.com>
1642 * trans-intrinsic.c (build_round_expr): If int type is larger than
1643 long long, do the round and convert to the integer type. Do not
1644 try to find a floating point type the exact size of the integer
1647 2021-04-21 Tobias Burnus <tobias@codesourcery.com>
1649 * dump-parse-tree.c (show_omp_namelist): Handle depobj + mutexinoutset
1650 in the depend clause.
1651 (show_omp_clauses, show_omp_node, show_code_node): Handle depobj.
1652 * gfortran.h (enum gfc_statement): Add ST_OMP_DEPOBJ.
1653 (enum gfc_omp_depend_op): Add OMP_DEPEND_UNSET,
1654 OMP_DEPEND_MUTEXINOUTSET and OMP_DEPEND_DEPOBJ.
1655 (gfc_omp_clauses): Add destroy, depobj_update and depobj.
1656 (enum gfc_exec_op): Add EXEC_OMP_DEPOBJ
1657 * match.h (gfc_match_omp_depobj): Match 'omp depobj'.
1658 * openmp.c (gfc_match_omp_clauses): Add depobj + mutexinoutset
1660 (gfc_match_omp_depobj, resolve_omp_clauses, gfc_resolve_omp_directive):
1661 Handle 'omp depobj'.
1662 * parse.c (decode_omp_directive, next_statement, gfc_ascii_statement):
1664 * resolve.c (gfc_resolve_code): Likewise.
1665 * st.c (gfc_free_statement): Likewise.
1666 * trans-openmp.c (gfc_trans_omp_clauses): Handle depobj + mutexinoutset
1667 in the depend clause.
1668 (gfc_trans_omp_depobj, gfc_trans_omp_directive): Handle EXEC_OMP_DEPOBJ.
1669 * trans.c (trans_code): Likewise.
1671 2021-04-20 Paul Thomas <pault@gcc.gnu.org>
1674 * trans-decl.c (gfc_get_symbol_decl): Replace test for host
1675 association with a check that the current and symbol namespaces
1678 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1680 * lang.opt (fopenacc-kernels=): Remove.
1682 2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1685 * trans-array.c (gfc_trans_deferred_array): Add code to initialize
1686 pointers and allocatables with correct TKR parameters.
1688 2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com>
1691 * resolve.c: Add association check before de-referencing pointer.
1693 2021-04-16 Harald Anlauf <anlauf@gmx.de>
1694 Paul Thomas <pault@gcc.gnu.org>
1697 * module.c (write_symtree): Do not write interface of intrinsic
1698 procedure to module file for F2003 and newer.
1700 2021-04-15 Paul Thomas <pault@gcc.gnu.org>
1703 * symbol.c: Remove trailing white space.
1704 * trans-array.c (gfc_trans_create_temp_array): Create a class
1705 temporary for class expressions and assign the new descriptor
1707 (build_class_array_ref): If the class expr can be extracted,
1708 then use that for 'decl'. Class function results are reliably
1709 handled this way. Call gfc_find_and_cut_at_last_class_ref to
1710 eliminate largely redundant code. Remove dead code and recast
1711 the rest of the code to extract 'decl' for remaining cases.
1712 Call gfc_build_spanned_array_ref.
1713 (gfc_alloc_allocatable_for_assignment): Use class descriptor
1714 element length for 'elemsize1'. Eliminate repeat set of dtype
1715 for class expressions.
1716 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Include
1717 additional code from build_class_array_ref, and use optional
1718 gfc_typespec pointer argument.
1719 (gfc_trans_scalar_assign): Make use of pre and post blocks for
1720 all class expressions.
1721 * trans.c (get_array_span): For unlimited polymorphic exprs
1722 multiply the span by the value of the _len field.
1723 (gfc_build_spanned_array_ref): New function.
1724 (gfc_build_array_ref): Call gfc_build_spanned_array_ref and
1725 eliminate repeated code.
1726 * trans.h: Add arg to gfc_find_and_cut_at_last_class_ref and
1727 add prototype for gfc_build_spanned_array_ref.
1729 2021-04-14 Martin Liska <mliska@suse.cz>
1731 * intrinsic.texi: The table has first column empty and it makes
1732 trouble when processing makeinfo --xml output.
1734 2021-04-09 Tobias Burnus <tobias@codesourcery.com>
1737 * trans-types.c (gfc_get_function_type): Also generate hidden
1738 coarray argument for character arguments.
1740 2021-04-03 Paul Thomas <pault@gcc.gnu.org>
1743 * interface.c (compare_parameter): The codimension attribute is
1744 applied to the _data field of class formal arguments.
1746 2021-04-01 Harald Anlauf <anlauf@gmx.de>
1749 * simplify.c (gfc_simplify_transpose): Properly initialize
1752 2021-03-28 Paul Thomas <pault@gcc.gnu.org>
1755 * trans-expr.c (gfc_conv_procedure_call): Use the _data attrs
1756 for class expressions and detect proc pointer evaluations by
1757 the non-null actual argument list.
1759 2021-03-27 Steve Kargl <kargl@gcc.gnu.org>
1761 * misc.c (gfc_typename): Fix off-by-one in buffer sizes.
1763 2021-03-26 Tobias Burnus <tobias@codesourcery.com>
1766 * intrinsic.c (gfc_intrinsic_func_interface): Set
1767 attr.proc = PROC_INTRINSIC if FL_PROCEDURE.
1769 2021-03-24 Tobias Burnus <tobias@codesourcery.com>
1772 * resolve.c (resolve_operator): Make 'msg' buffer larger
1775 2021-03-23 Tobias Burnus <tobias@codesourcery.com>
1778 * trans-decl.c (build_function_decl): Add comment;
1779 increment hidden_typelist for caf_token/caf_offset.
1780 * trans-types.c (gfc_get_function_type): Add comment;
1781 add missing caf_token/caf_offset args.
1783 2021-03-22 Tobias Burnus <tobias@codesourcery.com>
1786 * match.c (select_type_set_tmp, gfc_match_select_type,
1787 gfc_match_select_rank): Fix 'name' buffersize to avoid out of bounds.
1788 * resolve.c (resolve_select_type): Likewise.
1790 2021-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1792 * frontend-passes.c (inline_limit_check): Add rank_a
1793 argument. If a is rank 1, set the second dimension to 1.
1794 (inline_matmul_assign): Pass rank_a argument to inline_limit_check.
1795 (call_external_blas): Likewise.
1797 2021-03-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1800 * frontend-passes.c (doloop_contained_procedure_code):
1801 Properly handle EXEC_IOLENGTH.
1803 2021-03-15 Paul Thomas <pault@gcc.gnu.org>
1806 * trans-stmt.c (gfc_trans_allocate): Mark the initialization
1807 assignment by setting init_flag.
1809 2021-03-14 Harald Anlauf <anlauf@gmx.de>
1810 Paul Thomas <pault@gcc.gnu.org>
1812 * trans-expr.c (gfc_conv_procedure_call): Fix runtime checks for
1814 * trans-intrinsic.c (gfc_conv_intrinsic_size): Likewise.
1816 2021-03-13 Paul Thomas <pault@gcc.gnu.org>
1819 * trans-array.c (gfc_conv_expr_descriptor): For deferred length
1820 length components use the ss_info string length instead of
1821 gfc_get_expr_charlen. Make sure that the deferred string length
1822 is a variable before assigning to it. Otherwise use the expr.
1823 * trans-expr.c (gfc_conv_string_length): Make sure that the
1824 deferred string length is a variable before assigning to it.
1826 2021-03-12 Tobias Burnus <tobias@codesourcery.com>
1829 * resolve.c (resolve_symbol): Accept vars which are in DATA
1830 and hence (either) implicit SAVE (or in common).
1832 2021-03-10 Harald Anlauf <anlauf@gmx.de>
1835 * data.c (gfc_assign_data_value): Reject non-constant character
1837 * trans-array.c (gfc_conv_array_initializer): Restrict loop to
1838 elements which are defined to avoid NULL pointer dereference.
1840 2021-03-10 Tobias Burnus <tobias@codesourcery.com>
1842 * intrinsic.texi (MIN): Correct 'maximum' to 'minimum'.
1844 2021-03-10 Eric Botcazou <ebotcazou@adacore.com>
1847 * trans-intrinsic.c (build_round_expr): Do not implicitly assume
1848 that __float128 is the 128-bit floating-point type.
1850 2021-03-08 Harald Anlauf <anlauf@gmx.de>
1853 * data.c (gfc_assign_data_value): Reject variable with PARAMETER
1854 attribute in DATA statement.
1856 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
1860 * invoke.texi (-freal{4,8}-real-*): Extend description.
1861 * primary.c (match_real_constant): Also promote real literals
1862 with '_kind' number.
1864 2021-03-04 Tobias Burnus <tobias@codesourcery.com>
1867 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Avoid
1868 redoing kind conversions.
1869 * primary.c (match_real_constant): Likewise.
1871 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1874 * openmp.c (gfc_omp_requires_add_clause): Fix up diagnostic message
1876 (resolve_omp_clauses): Likewise.
1878 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1881 * frontend-passes.c (doloop_code): Replace double space in diagnostics
1882 with a single space.
1884 2021-02-24 Paul Thomas <pault@gcc.gnu.org>
1887 * trans-expr.c (gfc_conv_derived_to_class): Add optional arg.
1888 'derived_array' to hold the fixed, parmse expr in the case of
1889 assumed rank formal arguments. Deal with optional arguments.
1890 (gfc_conv_procedure_call): Null 'derived' array for each actual
1891 argument. Add its address to the call to gfc_conv_derived_to_
1892 class. Access the 'data' field of scalar descriptors before
1893 deallocating allocatable components. Also strip NOPs before the
1894 calls to gfc_deallocate_alloc_comp. Use 'derived' array as the
1895 input to gfc_deallocate_alloc_comp if it is available.
1896 * trans.h : Include the optional argument 'derived_array' to
1897 the prototype of gfc_conv_derived_to_class. The default value
1900 2021-02-23 Paul Thomas <pault@gcc.gnu.org>
1903 * resolve.c (resolve_fl_procedure): Include class results in
1904 the test for F2018, C15100.
1905 * trans-array.c (get_class_info_from_ss): Do not use the saved
1906 descriptor to obtain the class expression for variables. Use
1907 gfc_get_class_from_expr instead.
1909 2021-02-23 Harald Anlauf <anlauf@gmx.de>
1912 * simplify.c (gfc_simplify_reshape): Set string length for
1913 character arguments.
1915 2021-02-22 Tobias Burnus <tobias@codesourcery.com>
1918 * trans-openmp.c (gfc_omp_is_optional_argument): Regard optional
1919 dummy procs as nonoptional as no special treatment is needed.
1921 2021-02-21 Harald Anlauf <anlauf@gmx.de>
1923 * trans-expr.c (gfc_conv_procedure_call): Do not add clobber to
1924 allocatable intent(out) argument.
1926 2021-02-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1929 * match.c (gfc_match_namelist): If BT_UNKNOWN, check for
1930 IMPLICIT NONE and and issue an error, otherwise set the type
1931 to its IMPLICIT type so that any subsequent use of objects will
1932 will confirm their types.
1934 2021-02-19 Harald Anlauf <anlauf@gmx.de>
1936 * symbol.c (gfc_add_flavor): Reverse order of conditions.
1938 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1941 * dependency.c (gfc_dep_resolver): Fix coarray handling.
1943 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1948 2021-02-19 Tobias Burnus <tobias@codesourcery.com>
1951 * simplify.c (simplify_bound_dim): Honor DIMEN_ELEMENT
1954 2021-02-17 Julian Brown <julian@codesourcery.com>
1956 * openmp.c (resolve_omp_clauses): Disallow selecting components
1957 of arrays of derived type.
1959 2021-02-17 Julian Brown <julian@codesourcery.com>
1961 * trans-openmp.c (gfc_trans_omp_clauses): Handle element selection
1962 for arrays of derived types.
1964 2021-02-16 Tobias Burnus <tobias@codesourcery.com>
1966 * expr.c (gfc_is_simplify_contiguous): Handle REF_INQUIRY, i.e.
1967 %im and %re which are EXPR_VARIABLE.
1968 * openmp.c (resolve_omp_clauses): Diagnose %re/%im explicitly.
1970 2021-02-16 Tobias Burnus <tobias@codesourcery.com>
1973 * io.c (resolve_tag_format): Reject BT_DERIVED/CLASS/VOID
1974 as (array-valued) FORMAT tag.
1976 2021-02-12 Tobias Burnus <tobias@codesourcery.com>
1979 * trans-expr.c (gfc_conv_procedure_call): Don't reset
1980 rank of assumed-rank array.
1982 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
1985 * match.c (gfc_match_call): Include associate names as possible
1986 entities with typebound subroutines. The target needs to be
1987 resolved for the type.
1989 2021-02-11 Paul Thomas <pault@gcc.gnu.org>
1992 * primary.c (gfc_match_varspec): Test for non-null 'previous'
1993 before using its name in the error message.
1995 2021-02-11 Tobias Burnus <tobias@codesourcery.com>
1997 * intrinsic.texi (FINDLOC): Add 'MASK' to argument table.
1998 (MAXLOC, MAXVAL, MINLOC, MINVAL): For 'MASK', remove 'an
1999 array' as scalars are also permitted.
2001 2021-02-10 Julian Brown <julian@codesourcery.com>
2004 * openmp.c (resolve_omp_clauses): Omit OpenACC update in
2005 contiguity check and stride-specified error.
2007 2021-02-04 Julian Brown <julian@codesourcery.com>
2009 * openmp.c (resolve_omp_clauses): Omit OpenACC update in
2010 contiguity check and stride-specified error.
2012 2021-02-04 Julian Brown <julian@codesourcery.com>
2014 * trans-openmp.c (gfc_trans_omp_clauses): Use class_pointer attribute
2017 2021-02-04 Julian Brown <julian@codesourcery.com>
2019 * trans-openmp.c (gfc_trans_omp_clauses): Fix dereferencing for
2022 2021-02-04 Tobias Burnus <tobias@codesourcery.com>
2024 * openmp.c (resolve_omp_clauses): Explicitly diagnose
2025 substrings as not permitted.
2027 2021-02-03 Jeff Law <law@redhat.com>
2029 * intrinsic.texi (ANINT): Fix typo.
2031 2021-02-03 Tobias Burnus <tobias@codesourcery.com>
2034 * dependency.c (gfc_dep_resolver): Treat local access
2035 to coarrays like any array access in dependency analysis.
2037 2021-01-28 Harald Anlauf <anlauf@gmx.de>
2040 * trans.c (gfc_call_malloc): Allocate area of size 1 if passed
2041 size is NULL (as documented).
2043 2021-01-27 Paul Thomas <pault@gcc.gnu.org>
2047 * trans-expr.c (gfc_conv_procedure_call): Suppress the call to
2048 gfc_conv_intrinsic_to_class for unlimited polymorphic procedure
2050 (gfc_trans_assignment_1): Similarly suppress class assignment
2051 for class valued procedure pointers.
2053 2021-01-27 Paul Thomas <pault@gcc.gnu.org>
2056 * trans-array.c (gfc_conv_expr_descriptor): Include elemental
2057 procedure pointers in the assert under the comment 'elemental
2058 function' and eliminate the second, spurious assert.
2060 2021-01-25 Harald Anlauf <anlauf@gmx.de>
2063 * data.c (create_character_initializer): Check substring indices
2065 (gfc_assign_data_value): Catch error returned from
2066 create_character_initializer.
2068 2021-01-25 Tobias Burnus <tobias@codesourcery.com>
2070 * intrinsic.texi (CO_BROADCAST, CO_MIN, CO_REDUCE, CO_SUM): Fix typos.
2072 2021-01-25 Steve Kargl <kargl@gcc.gnu.org>
2075 * resolve.c (resolve_charlen): Check that length expression is
2076 present before testing for scalar/integer..
2078 2021-01-22 Paul Thomas <pault@gcc.gnu.org>
2081 * trans-intrinsic.c (gfc_conv_associated): Do not add a _data
2082 component for scalar class function targets. Instead, fix the
2083 function result and access the _data from that.
2085 2021-01-21 Jorge D'Elia <jdelia@cimec.unl.edu.ar>
2087 * intrinsic.texi (CO_MAX): Fix typo.
2089 2021-01-21 Paul Thomas <pault@gcc.gnu.org>
2092 * decl.c (gfc_match_modproc): It is not an error to find a
2093 module procedure declaration within a contains block.
2094 * expr.c (gfc_check_vardef_context): Pure procedure result is
2095 assignable. Change 'own_scope' accordingly.
2096 * resolve.c (resolve_typebound_procedure): A procedure that
2097 has the module procedure attribute is almost certainly a
2098 module procedure, whatever its interface.
2100 2021-01-19 Tobias Burnus <tobias@codesourcery.com>
2103 * openmp.c (resolve_omp_clauses): Change use_device_ptr
2104 to use_device_addr for unless type(c_ptr); check all
2105 list item for is_device_ptr.
2107 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2109 * dump-parse-tree.c (show_omp_clauses): Handle detach clause.
2110 * frontend-passes.c (gfc_code_walker): Walk detach expression.
2111 * gfortran.h (struct gfc_omp_clauses): Add detach field.
2112 (gfc_c_intptr_kind): New.
2113 * openmp.c (gfc_free_omp_clauses): Free detach clause.
2114 (gfc_match_omp_detach): New.
2115 (enum omp_mask1): Add OMP_CLAUSE_DETACH.
2116 (enum omp_mask2): Remove OMP_CLAUSE_DETACH.
2117 (gfc_match_omp_clauses): Handle OMP_CLAUSE_DETACH for OpenMP.
2118 (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DETACH.
2119 (resolve_omp_clauses): Prevent use of detach with mergeable and
2120 overriding the data sharing mode of the event handle.
2121 * trans-openmp.c (gfc_trans_omp_clauses): Handle detach clause.
2122 * trans-types.c (gfc_c_intptr_kind): New.
2123 (gfc_init_kinds): Initialize gfc_c_intptr_kind.
2125 (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT): Rename
2127 (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT_PTR):
2128 ...this. Add extra argument.
2130 2021-01-14 Harald Anlauf <anlauf@gmx.de>
2132 * gfortran.h (gfc_resolve_substring): Add prototype.
2133 * primary.c (match_string_constant): Simplify substrings with
2134 constant starting and ending points.
2135 * resolve.c: Rename resolve_substring to gfc_resolve_substring.
2136 (gfc_resolve_ref): Use renamed function gfc_resolve_substring.
2138 2021-01-14 Harald Anlauf <anlauf@gmx.de>
2141 * resolve.c (resolve_component): Derived type components with
2142 ALLOCATABLE or POINTER attribute shall have a deferred shape.
2144 2021-01-14 Harald Anlauf <anlauf@gmx.de>
2147 2021-01-14 Harald Anlauf <anlauf@gmx.de>
2150 * resolve.c (resolve_component): Derived type components with
2151 ALLOCATABLE or POINTER attribute shall have a deferred shape.
2153 2021-01-14 Harald Anlauf <anlauf@gmx.de>
2156 * resolve.c (resolve_component): Derived type components with
2157 ALLOCATABLE or POINTER attribute shall have a deferred shape.
2159 2021-01-08 Paul Thomas <pault@gcc.gnu.org>
2162 * trans-expr.c (gfc_conv_component_ref): Remove the condition
2163 that deferred character length components only be allocatable.
2165 2021-01-08 Paul Thomas <pault@gcc.gnu.org>
2168 * simplify.c (is_constant_array_expr): If an array constructor
2169 expression has elements other than constants or structures, try
2170 fixing the expression with gfc_reduce_init_expr. Also, if shape
2171 is NULL, obtain the array size and set it.
2173 2021-01-07 Paul Thomas <pault@gcc.gnu.org>
2176 * resolve.c (find_array_spec): Put static prototype for
2177 resolve_assoc_var before this function and call for associate
2180 2021-01-06 Harald Anlauf <anlauf@gmx.de>
2182 * resolve.c (resolve_component): Add check for valid CLASS
2183 reference before trying to access CLASS data.
2185 2021-01-04 Martin Liska <mliska@suse.cz>
2187 * ChangeLog-2018: Remove duplicate ChangeLog entries.
2189 2021-01-01 Harald Anlauf <anlauf@gmx.de>
2191 * class.c (gfc_find_vtab): Add check on attribute is_class.
2193 2021-01-01 Jakub Jelinek <jakub@redhat.com>
2195 * gfortranspec.c (lang_specific_driver): Update copyright notice
2197 * gfc-internals.texi: Bump @copying's copyright year.
2198 * gfortran.texi: Ditto.
2199 * intrinsic.texi: Ditto.
2200 * invoke.texi: Ditto.
2202 2021-01-01 Jakub Jelinek <jakub@redhat.com>
2204 * ChangeLog-2020: Rotate ChangeLog. New file.
2207 Copyright (C) 2021 Free Software Foundation, Inc.
2209 Copying and distribution of this file, with or without modification,
2210 are permitted in any medium without royalty provided the copyright
2211 notice and this notice are preserved.