2025-04-25 Thomas Schwinge Backported from trunk: 2025-03-20 Jakub Jelinek PR c++/119370 * decl2.cc (set_context_for_auto_vars_r): New function. (emit_partial_init_fini_fn): Call walk_tree with that function on &init before walk_tree with copy_tree_body_r. Backported from trunk: 2025-02-25 Jakub Jelinek PR c++/118876 * cp-tree.h (register_dtor_fn): Add a bool argument defaulted to false. * decl.cc (start_cleanup_fn): Add OMP_TARGET argument, use "__omp_tcf" prefix rather than "__tcf" in that case. Add "omp declare target" and "omp declare target nohost" attributes to the fndecl. (register_dtor_fn): Add OMP_TARGET argument, pass it down to start_cleanup_fn. * decl2.cc (one_static_initialization_or_destruction): Add OMP_TARGET argument, pass it down to register_dtor_fn. (emit_partial_init_fini_fn): Pass omp_target to one_static_initialization_or_destruction. (handle_tls_init): Pass false to one_static_initialization_or_destruction. Backported from trunk: 2024-08-07 Julian Brown Tobias Burnus * decl2.cc (tree-inline.h): Include. (static_init_fini_fns): Bump to four entries. Update comment. (start_objects, start_partial_init_fini_fn): Add 'omp_target' parameter. Support "declare target" decls. Update forward declaration. (emit_partial_init_fini_fn): Add 'host_fn' parameter. Return tree for the created function. Support "declare target". (OMP_SSDF_IDENTIFIER): New macro. (partition_vars_for_init_fini): Support partitioning "declare target" variables also. (generate_ctor_or_dtor_function): Add 'omp_target' parameter. Support "declare target" decls. (c_parse_final_cleanups): Support constructors/destructors on OpenMP offload targets. Revert: 2023-05-12 Julian Brown * decl2.cc (tree-inline.h): Include. (static_init_fini_fns): Bump to four entries. Update comment. (start_objects, start_partial_init_fini_fn): Add 'omp_target' parameter. Support "declare target" decls. Update forward declaration. (emit_partial_init_fini_fn): Add 'host_fn' parameter. Return tree for the created function. Support "declare target". (OMP_SSDF_IDENTIFIER): New macro. (partition_vars_for_init_fini): Support partitioning "declare target" variables also. (generate_ctor_or_dtor_function): Add 'omp_target' parameter. Support "declare target" decls. (c_parse_final_cleanups): Support constructors/destructors on OpenMP offload targets. 2025-04-17 Kwok Cheung Yeung * parser.cc (cp_parser_omp_clause_map): Apply iterator to push and pop mapper clauses. * semantics.cc (cxx_omp_map_array_section): Allow array types for base type of array sections. 2025-04-17 Kwok Cheung Yeung * parser.cc (cp_parser_omp_iterators): Use macros for accessing iterator elements. (cp_parser_omp_clause_affinity): Likewise. (cp_parser_omp_clause_depend): Likewise. (cp_parser_omp_clause_from_to): Likewise. (cp_parser_omp_clause_map): Likewise. * semantics.cc (cp_omp_finish_iterators): Likewise. 2025-04-17 Kwok Cheung Yeung * semantics.cc (handle_omp_array_sections): Add extra argument. Set argument to true if array section has a stride that is not one. (finish_omp_clauses): Disable strided updates when iterators are used in the clause. Emit sorry if strided. 2025-04-17 Kwok Cheung Yeung * parser.cc (cp_parser_omp_clause_from_to): Parse 'iterator' modifier. * semantics.cc (finish_omp_clauses): Finish iterators for to/from clauses. 2025-04-17 Kwok Cheung Yeung * parser.cc (cp_parser_omp_clause_map): Parse 'iterator' modifier. * semantics.cc (finish_omp_clauses): Finish iterators. Apply iterators to generated clauses. 2025-04-17 Kwok Cheung Yeung * pt.cc (tsubst_omp_clause_decl): Use OMP_ITERATOR_DECL_P. * semantics.cc (handle_omp_array_sections): Likewise. (finish_omp_clauses): Likewise. 2025-03-27 Tobias Burnus Backported from master: 2025-03-27 Tobias Burnus * cp-tree.h (cp_finish_omp_init_prefer_type): Add. * decl.cc (omp_declare_variant_finalize_one): Call it. * pt.cc (tsubst_attribute): Minor rebustification for OpenMP append_args handling. * semantics.cc (cp_omp_init_prefer_type_update): Rename to ... (cp_finish_omp_init_prefer_type): ... this; remove static attribute and return modified tree. Move clause handling to ... (finish_omp_clauses): ... the caller. 2025-03-27 Thomas Schwinge Backported from trunk: 2025-03-26 Thomas Schwinge Jason Merrill * rtti.cc (throw_bad_typeid): Adjust implicit '__cxa_bad_typeid' prototype to reality. Adjust all users. 2025-03-25 Thomas Schwinge Backported from trunk: 2025-03-21 Jason Merrill * init.cc (throw_bad_array_new_length): Returns void. Backported from trunk: 2025-03-21 Thomas Schwinge * rtti.cc (throw_bad_cast): Adjust implicit '__cxa_bad_cast' prototype to reality. 2025-03-21 Paul-Antoine Arras Backported from master: 2025-03-21 Paul-Antoine Arras Tobias Burnus * parser.cc (cp_parser_omp_clause_init): Make addressable. 2025-01-30 Tobias Burnus Backported from master: 2025-01-30 Tobias Burnus * parser.cc (cp_finish_omp_declare_variant): Modify how append_args is saved internally. * pt.cc (tsubst_attribute): Likewise. (tsubst_omp_clauses): Remove C_ORT_OMP_DECLARE_SIMD from interop handling as no longer called for it. * decl.cc (omp_declare_variant_finalize_one): Update append_args changes; fixes for ADL input. 2025-01-28 Tobias Burnus Backported from master: 2025-01-17 Tobias Burnus PR fortran/118321 * decl.cc (omp_declare_variant_finalize_one): Shift adjust_args index by one for non-static class function's 'this' pointer. 2025-01-28 Tobias Burnus Backported from master: 2025-01-03 Tobias Burnus * parser.cc (cp_parser_omp_var_list_no_open, cp_parser_omp_var_list): For kind=0 (= OMP_CLAUSE_ERROR), store also the expression location in the tree list. (cp_parser_oacc_data_clause_deviceptr, cp_finish_omp_declare_variant): Use that location instead or input_location/the before-parsing location. * semantics.cc (finish_omp_threadprivate): Likewise. 2025-01-28 Tobias Burnus Backported from master: 2024-12-18 Tobias Burnus * decl.cc (omp_declare_variant_finalize_one): Handle append_args. * parser.cc (cp_parser_omp_clause_init_modifiers): New; split of from ... (cp_parser_omp_clause_init): ... here; call it. (cp_parser_omp_all_clauses): Replace interop parsing by a call to ... (cp_parser_omp_clause_interop): ... this new function; set tree used/read. (cp_finish_omp_declare_variant): Parse 'append_args' clause. (cp_parser_omp_declare): Update comment. * pt.cc (tsubst_attribute, tsubst_omp_clauses): Handle template substitution also for declare variant's append_args clause, using for 'init' the same code as for interop's init clause. 2025-01-27 Tobias Burnus Backported from master: 2025-01-15 Tobias Burnus PR c++/118486 * decl.cc (omp_declare_variant_finalize_one): When resolving the variant to use, handle variant calls with TARGET_EXPR. 2025-01-27 Tobias Burnus Backported from master: 2024-12-13 Tobias Burnus * parser.cc (cp_parser_omp_construct, cp_parser_pragma): Reject OpenMP expressions in constexpr functions. 2025-01-27 Tobias Burnus Backported from master: 2024-12-12 Tobias Burnus * parser.cc (OMP_DISPATCH_CLAUSE_MASK): Add has_device_addr clause. 2025-01-27 Tobias Burnus Backported from master: 2024-11-22 Tobias Burnus * parser.cc (cp_parser_omp_clause_name, cp_parser_omp_all_clauses, cp_parser_omp_dispatch_body): Handle 'interop' clause. * pt.cc (tsubst_omp_clauses): Likewise. * semantics.cc (finish_omp_clauses): Likewise. 2025-01-27 Tobias Burnus Backported from master: 2024-11-22 Tobias Burnus * parser.cc (INCLUDE_STRING): Define. (cp_parser_omp_clause_name): Handle init, use, and destroy clauses. (cp_parser_omp_all_clauses): Likewise; use C_ORT_OMP_INTEROP, if 'use' is permitted, for c_finish_omp_clauses. (cp_parser_omp_modifier_prefer_type, cp_parser_omp_clause_init, OMP_INTEROP_CLAUSE_MASK, cp_parser_omp_interop): New. (cp_parser_pragma): Handle 'interop' directive. * pt.cc (tsubst_omp_clauses): Handle init, use, and destroy clauses. (tsubst_stmt): Handle OMP_INTEROP. * semantics.cc (cp_omp_init_prefer_type_update): New. (finish_omp_clauses): Handle init, use, and destroy clauses and add clause check for 'depend' on 'interop'. 2025-01-27 Paul-Antoine Arras Backported from master: 2025-01-10 Paul-Antoine Arras * parser.cc (cp_parser_pragma): Replace call to cp_parser_omp_dispatch with cp_parser_omp_construct and check context. 2025-01-27 Paul-Antoine Arras Backported from master: 2025-01-02 Paul-Antoine Arras * parser.cc (cp_parser_omp_dispatch): Handle INDIRECT_REF. 2025-01-27 Paul-Antoine Arras Backported from master: 2024-11-20 Paul-Antoine Arras * decl.cc (omp_declare_variant_finalize_one): Set adjust_args need_device_ptr attribute. * parser.cc (cp_parser_direct_declarator): Update call to cp_parser_late_return_type_opt. (cp_parser_late_return_type_opt): Add 'tree parms' parameter. Update call to cp_parser_late_parsing_omp_declare_simd. (cp_parser_omp_clause_name): Handle nocontext and novariants clauses. (cp_parser_omp_clause_novariants): New function. (cp_parser_omp_clause_nocontext): Likewise. (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_NOVARIANTS and PRAGMA_OMP_CLAUSE_NOCONTEXT. (cp_parser_omp_dispatch_body): New function, inspired from cp_parser_assignment_expression and cp_parser_postfix_expression. (OMP_DISPATCH_CLAUSE_MASK): Define. (cp_parser_omp_dispatch): New function. (cp_finish_omp_declare_variant): Add parameter. Handle adjust_args clause. (cp_parser_late_parsing_omp_declare_simd): Add parameter. Update calls to cp_finish_omp_declare_variant and cp_finish_omp_declare_variant. (cp_parser_omp_construct): Handle PRAGMA_OMP_DISPATCH. (cp_parser_pragma): Likewise. * semantics.cc (finish_omp_clauses): Handle OMP_CLAUSE_NOCONTEXT and OMP_CLAUSE_NOVARIANTS. * pt.cc (tsubst_omp_clauses): Handle OMP_CLAUSE_NOCONTEXT and OMP_CLAUSE_NOVARIANTS. (tsubst_stmt): Handle OMP_DISPATCH. (tsubst_expr): Handle IFN_GOMP_DISPATCH. 2025-01-23 Tobias Burnus Backported from master: 2024-10-31 Tobias Burnus * decl.cc (omp_declare_variant_finalize_one): Use STRIP_REFERENCE_REF instead of doing it manually. 2025-01-23 Tobias Burnus Backported from master: 2024-10-31 Tobias Burnus * decl.cc (omp_declare_variant_finalize_one): Strip indirect ref around variant-function call when processing a variant. 2025-01-23 Tobias Burnus Backported from master: 2024-09-25 Tobias Burnus * parser.cc (cp_parser_omp_declare_target): Set target-used bit in omp_requires_mask. 2024-12-06 Andrew Stubbs Kwok Cheung Yeung * parser.cc (cp_parser_omp_clause_from_to): Move an "else" clause to a higher nesting level. 2024-05-15 Jakub Jelinek * semantics.cc (finish_omp_clauses): Diagnose grainsize used together with num_tasks. 2024-05-04 Sandra Loosemore * decl2.cc (cplus_decl_attributes): Don't add "omp declare target block". 2024-05-04 Sandra Loosemore * cp-tree.h (struct saved_scope): Add new field x_processing_omp_trait_property_expr. (processing_omp_trait_property_expr): Define * decl.cc (omp_declare_variant_finalize_one): Adjust arguments to omp_context_selector_matches. * parser.cc (cp_parser_omp_context_selector): Remove metadirective_p argument and conditionalization. (cp_parser_omp_context_selector_specification): Remove metadirective_p argument and adjust call not to pass it on. (cp_finish_omp_declare_variant): Adjust arguments on call to above. (cp_parser_omp_metadirective): Likewise. * pt.cc (tsubst_omp_context_selector): Adjust error behavior. (tsubst_stmt): Adjust call to omp_context_selector_matches. * semantics.cc (finish_id_expression_1): Do not diagnose error for use of parameter in declare variant selector here. 2024-05-04 Sandra Loosemore * parser.cc (cp_parser_skip_to_end_of_block_or_statement): Add metadirective_p parameter, use it to control brace/parentheses behavior for metadirectives. (mangle_metadirective_region_label): New. (cp_parser_label_for_labeled_statement): Use it. (cp_parser_jump_statement): Likewise. (cp_parser_omp_context_selector): Add metadirective_p parameter, use it to control error behavior for non-constant exprs properties. (cp_parser_omp_context_selector_specification): Add metadirective_p parameter, use it for cp_parser_omp_context_selector call. (cp_finish_omp_declare_variant): Adjust call to cp_parser_omp_context_selector_specification. (analyze_metadirective_body): New. (cp_parser_omp_metadirective): New. (cp_parser_pragma): Handle PRAGMA_OMP_METADIRECTIVE. * parser.h (struct cp_parser): Add fields for metadirective parsing state. * pt.cc (tsubst_omp_context_selector): New. (tsubst_stmt): Handle OMP_METADIRECTIVE. 2024-05-04 Sandra Loosemore * decl.cc (omp_declare_variant_finalize_one): Update call to omp_context_selector_matches to pass additional arguments. * parser.cc (cp_finish_omp_declare_variant): Likewise for omp_check_context_selector. 2023-10-26 Tobias Burnus * cp-tree.h (finish_omp_allocate): New prototype. * parser.cc (struct cp_omp_loc_tree, cp_check_omp_allocate_allocator_r): New. (cp_parser_omp_allocate): Call it; remove sorry, improve checks, call finish_omp_allocate. * pt.cc (tsubst_stmt): Call finish_omp_allocate. * semantics.cc (finish_omp_allocate): New. 2023-08-10 Julian Brown * parser.cc (cp_parser_omp_var_list_no_open): Support array-shaping operator in 'declare mapper' definitions. (cp_parser_omp_clause_from_to): Add parsing for mapper modifier. (cp_parser_omp_clause_map): Pass C_ORT_OMP_DECLARE_MAPPER to cp_parser_omp_var_list_no_open in mapper definitions. (cp_parser_omp_target_update): Instantiate mappers. 2023-09-05 Julian Brown * cp-objcp-common.cc (cp_common_init_ts): Add array-shape cast support. * cp-tree.def (OMP_ARRAYSHAPE_CAST_EXPR): Add tree code. * cp-tree.h (DECLTYPE_FOR_OMP_ARRAYSHAPE_CAST): Add flag. (cp_omp_create_arrayshape_type, cp_build_omp_arrayshape_cast): Add prototypes. (grok_omp_array_section, build_omp_array_section): Add stride parameters. * decl.cc (create_anon_array_type): New function. (cp_omp_create_arrayshape_type): New function. * decl2.cc (grok_omp_array_section): Add stride parameter. (min_vis_expr_r): Add OMP_ARRAYSHAPE_CAST_EXPR support. * error.cc (dump_expr): Add stride support for OMP_ARRAY_SECTION. * mangle.cc (write_expression): Add OMP_ARRAYSHAPE_CAST_EXPR support. * operators.def (OMP_ARRAYSHAPE_CAST_EXPR): Add. * parser.cc (cp_parser_new): Initialise omp_array_shaping_op_p and omp_has_array_shape_p fields. (cp_parser_statement_expr): Don't allow array shaping op in statement exprs. (cp_parser_postfix_open_square_expression): Add stride parsing for array sections. Use array section code to represent array refs if we have an array-shaping operator. (cp_parser_parenthesized_expression_list): Don't allow array-shaping op here. (cp_parser_cast_expression): Add array-shaping operator parsing. (cp_parser_lambda_expression): Don't allow array-shaping op in lambda body. (cp_parser_braced_list): Don't allow array-shaping op in braced list. (struct omp_dim): Add stride field. (cp_parser_var_list_no_open): Add stride/array shape support. (cp_parser_omp_target_update): Handle noncontiguous updates. * parser.h (cp_parser): Add omp_array_shaping_op_p and omp_has_array_shape_p fields. * pt.cc (tsubst): Add array-shape cast support. (tsubst_copy, tsubst_copy_and_build): Likewise. Add stride support for OMP_ARRAY_SECTION. (tsubst_omp_clause_decl): Add stride support for OMP_ARRAY_SECTION. * semantics.cc (handle_omp_array_sections_1): Add DISCONTIGUOUS parameter and stride support. (omp_array_section_low_bound): New function. (handle_omp_array_sections): Add DISCONTIGUOUS parameter and stride support. (finish_omp_clauses): Update calls to handle_omp_array_sections, and add noncontiguous array update support. (cp_build_omp_arrayshape_cast): New function. * typeck.cc (structural_comptypes): Add array-shape cast support. (build_omp_array_section): Add stride parameter. (check_for_casting_away_constness): Add OMP_ARRAYSHAPE_CAST_EXPR support. 2023-07-03 Julian Brown * semantics.cc (handle_omp_array_sections): Pass pointer to clause instead of clause. Add PNEXT return parameter for next clause in list to process. (finish_omp_clauses): Update calls to handle_omp_array_sections. Handle cases where initial clause might be replaced. 2023-08-10 Julian Brown * pt.cc (tsubst_omp_clauses): Use C_ORT_OMP_DECLARE_MAPPER. (tsubst_expr): Likewise. 2023-07-06 Julian Brown * parser.cc (cp_parser_omp_target_data): Instantiate mappers for 'omp target data'. (cp_parser_omp_target_enter_data): Instantiate mappers for 'omp target enter data'. (cp_parser_omp_target_exit_data): Instantiate mappers for 'omp target exit data'. (cp_parser_omp_target): Add c_omp_region_type argument to c_omp_instantiate_mappers call. * pt.cc (tsubst_omp_clauses): Instantiate mappers for OMP regions other than just C_ORT_OMP_TARGET. (tsubst_expr): Update call to tsubst_omp_clauses for OMP_TARGET_UPDATE, OMP_TARGET_ENTER_DATA, OMP_TARGET_EXIT_DATA stanza. * semantics.cc (cxx_omp_map_array_section): Avoid calling build_array_ref for non-array/non-pointer bases (error reported already). 2023-06-30 Julian Brown * constexpr.cc (reduced_constant_expression_p): Add OMP_DECLARE_MAPPER case. (cxx_eval_constant_expression, potential_constant_expression_1): Likewise. * cp-gimplify.cc (cxx_omp_finish_mapper_clauses): New function. * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_MAPPER_CLAUSES, LANG_HOOKS_OMP_MAPPER_LOOKUP, LANG_HOOKS_OMP_EXTRACT_MAPPER_DIRECTIVE, LANG_HOOKS_OMP_MAP_ARRAY_SECTION): Define langhooks. * cp-tree.h (lang_decl_base): Add omp_declare_mapper_p field. Recount spare bits comment. (DECL_OMP_DECLARE_MAPPER_P): New macro. (omp_mapper_id, cp_check_omp_declare_mapper, omp_instantiate_mappers, cxx_omp_finish_mapper_clauses, cxx_omp_mapper_lookup, cxx_omp_extract_mapper_directive, cxx_omp_map_array_section: Add prototypes. * decl.cc (check_initializer): Add OpenMP declare mapper support. (cp_finish_decl): Set DECL_INITIAL for OpenMP declare mapper var decls as appropriate. * decl2.cc (mark_used): Instantiate OpenMP "declare mapper" magic var decls. * error.cc (dump_omp_declare_mapper): New function. (dump_simple_decl): Use above. * parser.cc (cp_parser_omp_clause_map): Add KIND parameter. Support "mapper" modifier. (cp_parser_omp_all_clauses): Add KIND argument to cp_parser_omp_clause_map call. (cp_parser_omp_target): Call omp_instantiate_mappers before finish_omp_clauses. (cp_parser_omp_declare_mapper): New function. (cp_parser_omp_declare): Add "declare mapper" support. * pt.cc (tsubst_decl): Adjust name of "declare mapper" magic var decls once we know their type. (tsubst_omp_clauses): Call omp_instantiate_mappers before finish_omp_clauses, for target regions. (tsubst_expr): Support OMP_DECLARE_MAPPER nodes. (instantiate_decl): Instantiate initialiser (i.e definition) for OpenMP declare mappers. * semantics.cc (gimplify.h): Include. (omp_mapper_id, omp_mapper_lookup, omp_extract_mapper_directive, cxx_omp_map_array_section, cp_check_omp_declare_mapper): New functions. (finish_omp_clauses): Delete GOMP_MAP_PUSH_MAPPER_NAME and GOMP_MAP_POP_MAPPER_NAME artificial clauses. (omp_target_walk_data): Add MAPPERS field. (finish_omp_target_clauses_r): Scan for uses of struct/union/class type variables. (finish_omp_target_clauses): Create artificial mapper binding clauses for used structs/unions/classes in offload region. 2023-05-12 Julian Brown * decl2.cc (tree-inline.h): Include. (static_init_fini_fns): Bump to four entries. Update comment. (start_objects, start_partial_init_fini_fn): Add 'omp_target' parameter. Support "declare target" decls. Update forward declaration. (emit_partial_init_fini_fn): Add 'host_fn' parameter. Return tree for the created function. Support "declare target". (OMP_SSDF_IDENTIFIER): New macro. (partition_vars_for_init_fini): Support partitioning "declare target" variables also. (generate_ctor_or_dtor_function): Add 'omp_target' parameter. Support "declare target" decls. (c_parse_final_cleanups): Support constructors/destructors on OpenMP offload targets. 2024-06-05 Jakub Jelinek Frederik Harwath Sandra Loosemore * cp-tree.h (dependent_omp_for_p): Add another tree argument. * parser.cc (check_omp_intervening_code): Reject imperfectly nested tile. (cp_parser_statement_seq_opt): If want_nested_loop, use cp_parser_next_tokens_can_be_canon_loop instead of just checking for RID_FOR keyword. (cp_parser_omp_clause_name): Handle full and partial clause names. (cp_parser_omp_clause_full, cp_parser_omp_clause_partial): New functions. (cp_parser_omp_all_clauses): Formatting fix. Handle PRAGMA_OMP_CLAUSE_PARTIAL and PRAGMA_OMP_CLAUSE_FULL. (cp_parser_next_tokens_can_be_canon_loop): New function. (cp_parser_omp_loop_nest): Parse C++11 attributes. Handle tile/unroll constructs. Use cp_parser_next_tokens_can_be_canon_loop instead of just checking for RID_FOR keyword. Only add_stmt cp_parser_omp_loop_nest result if it is non-NULL. (cp_parser_omp_for_loop): Rename tiling variable to oacc_tiling. For OMP_CLAUSE_SIZES set collapse to list length of OMP_CLAUSE_SIZES_LIST. Use cp_parser_next_tokens_can_be_canon_loop instead of just checking for RID_FOR keyword. Remove spurious semicolon. Don't call c_omp_check_loop_binding_exprs if stmt is NULL. Skip and/or handle generated loops. Remove spurious ()s around & operands. (cp_parser_omp_tile_sizes, cp_parser_omp_tile): New functions. (OMP_UNROLL_CLAUSE_MASK): Define. (cp_parser_omp_unroll): New function. (cp_parser_omp_construct): Handle PRAGMA_OMP_TILE and PRAGMA_OMP_UNROLL. (cp_parser_pragma): Likewise. * semantics.cc (finish_omp_clauses): Don't call fold_build_cleanup_point_expr for cases which obviously won't need it, like checked INTEGER_CSTs. Handle OMP_CLAUSE_{FULL,PARTIAL,SIZES} and diagnose full vs. partial conflict. Adjust wording of some of the conflicting clause diagnostic messages to include word clause. (finish_omp_for): Use decl equal to global_namespace as a marker for generated loop. Pass also body to dependent_omp_for_p. Skip generated loops. (finish_omp_for_block): Skip generated loops. * pt.cc (tsubst_omp_clauses): Handle OMP_CLAUSE_{FULL,PARTIAL,SIZES}. (tsubst_stmt): Handle OMP_TILE and OMP_UNROLL. Handle or skip generated loops. (dependent_omp_for_p): Add body argument. If declv vector element is NULL, find generated loop. * cp-gimplify.cc (cp_gimplify_expr): Handle OMP_TILE and OMP_UNROLL. (cp_fold_r): Likewise. (cp_genericize_r): Likewise. Skip generated loops. 2023-11-19 Tobias Burnus Chung-Lin Tang * parser.cc (cp_parser_omp_clause_uses_allocators): New. (cp_parser_omp_clause_name, cp_parser_omp_all_clauses, OMP_TARGET_CLAUSE_MASK): Handle uses_allocators. * semantics.cc (finish_omp_clauses): Likewise. 2022-03-17 Kwok Cheung Yeung * semantics.cc (handle_omp_array_sections_1): Add check to ensure that clause is a map. 2021-08-19 Chung-Lin Tang * semantics.cc (handle_omp_array_sections_1): Robustify non-contiguous array check and reject non-DECL base-pointer cases as unsupported. 2021-02-01 Chung-Lin Tang * semantics.cc (finish_omp_clauses): Adjust to allow duplicate mapped variables for OpenMP. 2022-02-03 Kwok Cheung Yeung * parser.ccc (cp_parser_omp_clause_map): Update call to cp_parser_omp_var_list_no_open. (cp_parser_omp_all_clauses): Update calls to cp_parser_omp_var_list. 2018-12-13 Cesar Philippidis Nathan Sidwell Julian Brown * parser.c (cp_parser_omp_var_list_no_open): New c_omp_region_type argument. Use it to specialize handling of OMP_CLAUSE_REDUCTION for OpenACC. (cp_parser_omp_var_list): Add c_omp_region_type argument. Update call to cp_parser_omp_var_list_parens. (cp_parser_oacc_data_clause): Update call to cp_parser_omp_var_list. (cp_parser_omp_clause_reduction): Change is_omp boolean parameter to c_omp_region_type. Update call to cp_parser_omp_var_list_no_open. (cp_parser_oacc_all_clauses): Update call to cp_parser_omp_clause_reduction. (cp_parser_omp_all_clauses): Likewise. * semantics.c (finish_omp_reduction_clause): Add c_omp_region_type argument. Suppress user-defined reduction error for OpenACC. (finish_omp_clauses): Emit an error on orphan OpenACC gang reductions. 2020-04-19 Chung-Lin Tang PR other/76739 * semantics.cc (handle_omp_array_sections_1): Add 'bool &non_contiguous' parameter, adjust recursive call site, add cases for allowing pointer based multi-dimensional arrays for OpenACC. (handle_omp_array_sections): Adjust handle_omp_array_sections_1 call, handle non-contiguous case to create dynamic array map.