[gcc/devel/omp/gcc-16] ChangeLog.omp bump
Sandra Loosemore via Gcc-cvs <[email protected]>
| Newsgroups | gmane.comp.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://gcc.gnu.org/g:a106f1d70e9271072c8a2b628857e47b72d0e854 commit a106f1d70e9271072c8a2b628857e47b72d0e854 Author: Sandra Loosemore <[email protected]> Date: Thu Jul 9 19:52:36 2026 +0000 ChangeLog.omp bump Diff: --- contrib/ChangeLog.omp | 7 + gcc/ChangeLog.omp | 845 +++++++++++++++++++++++++++++ gcc/DATESTAMP.omp | 1 + gcc/c-family/ChangeLog.omp | 91 ++++ gcc/c/ChangeLog.omp | 203 +++++++ gcc/cp/ChangeLog.omp | 308 +++++++++++ gcc/fortran/ChangeLog.omp | 652 +++++++++++++++++++++++ gcc/testsuite/ChangeLog.omp | 648 +++++++++++++++++++++++ include/ChangeLog.omp | 80 +++ libgomp/ChangeLog.omp | 1224 +++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 4059 insertions(+) diff --git a/contrib/ChangeLog.omp b/contrib/ChangeLog.omp new file mode 100644 index 000000000000..109b87f62af9 --- /dev/null +++ b/contrib/ChangeLog.omp @@ -0,0 +1,7 @@ +2026-07-09 Tobias Burnus <[email protected]> + + * gcc-changelog/git_repository.py (parse_git_revisions): Optional + exclude_branch_name argument. Skip over merge commits for merges + from exclude branch. + * gcc-changelog/git_update_version.py: Add --suffix, --exclude-branch + and --last-commit to handle vendor branches. Handle merges. \ No newline at end of file diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp new file mode 100644 index 000000000000..111727060040 --- /dev/null +++ b/gcc/ChangeLog.omp @@ -0,0 +1,845 @@ +2026-07-09 Chung-Lin Tang <[email protected]> + Sandra Loosemore <[email protected]> + + * doc/extend.texi: Adjust version references to 2.7 from 2.6. + +2026-07-09 Chung-Lin Tang <[email protected]> + + * config/gcn/gcn-tree.cc (gcn_goacc_reduction_setup): Fix array case + copy source into reduction buffer. + * config/nvptx/nvptx.cc (nvptx_expand_shared_addr): Move default size + init setting place. + (enum nvptx_builtins): Add NVPTX_BUILTIN_BAR_WARPSYNC. + (nvptx_init_builtins): Add DEF() of nvptx_builtin_bar_warpsync. + (nvptx_expand_builtin): Expand NVPTX_BUILTIN_BAR_WARPSYNC. + (nvptx_goacc_reduction_setup): Fix array case copy source into reduction + buffer. + (nvptx_goacc_reduction_fini): Add bar.warpsync for at end of vector-mode + reductions for sm_70 and above. + +2026-07-09 Chung-Lin Tang <[email protected]> + + * config/gcn/gcn-tree.cc (#include "omp-offload.h"): Add include. + (#include "memmodel.h"): Add include. + (gcn_array_reduction_buffers): New vec<tree> + for holding DECLs for reduction buffer pointer variables. + (gcn_lockfull_update): Add pointer type fold_converts. + (gcn_reduction_update): Additions for handling ARRAY_TYPE, pointer to + ARRAY_TYPE, and RECORD_TYPE reductions. + (gcn_goacc_get_worker_red_decl): Adjust parameters to handle + non-constant offset case. + (gcn_goacc_get_worker_array_reduction_buffer): New function. + (gcn_create_if_else_seq): New function. + (gcn_create_do_while_loop_seq): New function. + (gcn_goacc_reduction_setup): Adjustments to handle arrays and records. + (gcn_goacc_reduction_init): Likewise. + (gcn_goacc_reduction_fini): Likewise. + (gcn_goacc_reduction_teardown): Likewise. + * config/nvptx/nvptx.cc (nvptx_gen_shuffle): Properly generate + V2SI shuffle using vec_extract op. + (nvptx_expand_shared_addr): Adjustments to handle non-constant size. + (nvptx_get_shared_red_addr): Adjust type/alignment calculations to + use TYPE_SIZE/ALIGN_UNIT instead of machine mode based. + (nvptx_get_shared_red_addr): New function with array_max_idx parameter. + (nvptx_reduction_update): Additions for handling ARRAY_TYPE, pointer to + ARRA_TYPE, and RECORD_TYPE reductions. + (nvptx_goacc_reduction_setup): Likewise. + (nvptx_goacc_reduction_init): Likewise. + (nvptx_goacc_reduction_fini): Likewise. + (nvptx_goacc_reduction_teardown): Likewise. + * gimplify.cc (gimplify_scan_omp_clauses): Gimplify inside COMPONENT_REF + and convert codes for OMP_CLAUSE_REDUCTION cases. Add DECL_P check for + do_add/do_add_decl goto case. + (gimplify_adjust_omp_clauses): Avoid GOMP_MAP_POINTER OMP_CLAUSE_SIZE + handling for OpenACC kernels. Call omp_add_variable for ARRAY_REF index. + Peel away array MEM_REF for decl lookup. + * omp-low.cc (struct omp_context): + Add 'hash_map<tree, tree> *block_vars_map' field. + (omp_copy_decl_2): Create/lookup using ctx->block_vars_map first. Add + new copy into ctx->block_vars_map. + (install_var_field): Add 'bool field_may_exist = false' parameter. + Adjust lookup assertions. + (delete_omp_context): Add delete of ctx->block_vars_map. + (scan_sharing_clauses): Adjust calls to install_var_field. Adjust + ARRAY_REF pointer type building to use decl type, rather than generic + ptr_type_node. For ARRAY_REFs on offloaded constructs, also add base + expression as field lookup key. + (omp_reduction_init_op): Add ARRAY_TYPE and RECORD_TYPE init op + construction. + (oacc_array_reduction_bias): New function. + (lower_oacc_reductions): Add array reduction handling code. Arrays use + a different mode of IFN parameters, using additional 'array_addr' and + 'array_max_idx' arguments. The LHS var is a simple integer for + dependency ordering. + (lower_omp_target): Adjust 'offload' condition for GOMP_MAP_POINTER + case. Generate BUILT_IN_ALLOCA_WITH_ALIGN to create private copy + for reductions of non-constant size types. + * omp-oacc-neuter-broadcast.cc (worker_single_copy): + Add 'hash_set<tree> *array_reduction_base_vars' parameter. Avoid + propagation for SSA_NAMEs used for array reduction accesses. + (neuter_worker_single): Add 'hash_set<tree> *array_reduction_base_vars' + parameter. Adjust recursive calls to self and worker_single_copy. + (oacc_do_neutering): Add 'hash_set<tree> *array_reduction_base_vars' + parameter. Adjust call to neuter_worker_single. + (execute_omp_oacc_neuter_broadcast): Add local + 'hash_set<tree> array_reduction_base_vars' declaration. Collect MEM_REF + base-pointer SSA_NAMEs of arrays into array_reduction_base_vars. Add + '&array_reduction_base_vars' argument to call of oacc_do_neutering. + * omp-offload.cc (#include "cfghooks.h"): Add include. + (oacc_build_array_copy): New function. + (oacc_build_array_copy_loop): New function. + (oacc_build_indexed_ssa_loop): New function. + (default_goacc_reduction): Adjustments to handle arrays. + * omp-offload.h (oacc_build_array_copy): New declaration. + (oacc_build_array_copy_loop): New declaration. + (oacc_build_indexed_ssa_loop): New declaration. + * tree-loop-distribution.cc (generate_memset_builtin): Under OpenACC, + when last stmt of pre-header block is a UNIQUE(OACC_FORK) internal-fn, + split a new basic block to serve as place of insertion, otherwise + may fail later checking because UNIQUE(OACC_FORK) counts as control + flow stmt. + (generate_memcpy_builtin): Likewise. + +2026-07-09 Sandra Loosemore <[email protected]> + Paul-Antoine Arras <[email protected]> + + * gimplify.cc (omp_build_struct_sibling_lists): Avoid null + pointer dereference from trying to move nodes that aren't + associated with the base object. + +2026-07-09 Julian Brown <[email protected]> + + * gimplify.cc (dwarf2out.h): Include. + (omp_maybe_get_descriptor_from_ptr): New function. + (build_omp_struct_comp_nodes): Use above function to locate array + descriptor when necessary. + (omp_mapping_group_data, omp_mapping_group_ptr, + omp_mapping_group_pset): New functions. + (omp_instantiate_mapper): Handle inlining of "declare mapper" function + bodies containing setup code (e.g. for Fortran). Handle pointers to + derived types. Handle GOMP_MAP_MAPPING_GROUPs. + * tree-pretty-print.cc (dump_omp_clause): Handle + GOMP_MAP_MAPPING_GROUP. + +2026-07-09 Chung-Lin Tang <[email protected]> + Sandra Loosemore <[email protected]> + + * gimple-expr.cc (copy_var_decl): Copy VAR_POINTS_TO_READONLY + for VAR_DECLs. + * omp-low.cc (lower_omp_target): Set VAR_POINTS_TO_READONLY for + variables of receiver refs. + * tree-pretty-print.cc (dump_omp_clause): + Print OMP_CLAUSE_MAP_POINTS_TO_READONLY. + (dump_generic_node): Print SSA_NAME_POINTS_TO_READONLY_MEMORY. + * tree-ssanames.cc (make_ssa_name_fn): Set + SSA_NAME_POINTS_TO_READONLY_MEMORY if DECL_POINTS_TO_READONLY is set. + * tree.h (OMP_CLAUSE_MAP_SIZE_NEEDS_ADJUSTMENT): Expand to + TREE_NO_WARNING instead of TREE_CONSTANT. + (OMP_CLAUSE_MAP_POINTS_TO_READONLY): New macro. + (VAR_POINTS_TO_READONLY): New macro. + +2026-07-09 Sandra Loosemore <[email protected]> + Tobias Burnus <[email protected]> + + * gimplify.cc (modify_call_for_omp_dispatch): Rework logic for + need_device_ptr and need_device_addr adjustments. + +2026-07-09 waffl3x <[email protected]> + Sandra Loosemore <[email protected]> + + PR c++/119659 + PR c++/118859 + PR c++/119601 + PR c++/119602 + PR c++/119775 + * gimplify.cc (modify_call_for_omp_dispatch): Refactor and change + attribute unpacking. For adjust_args variadic functions, expand + numeric ranges with relative bounds. Refactor argument adjustment. + +2026-07-09 Waffl3x <[email protected]> + + * gimplify.cc (gimplify_bind_expr): Add minor C++ specific checks. + +2026-07-09 Julian Brown <[email protected]> + Sandra Loosemore <[email protected]> + + * gimplify.cc (gimplify_adjust_omp_clauses): Don't gimplify + VIEW_CONVERT_EXPR away in GOMP_MAP_TO_GRID/GOMP_MAP_FROM_GRID clauses. + * omp-low.cc (omp_noncontig_descriptor_type): Add SPAN field. + (scan_sharing_clauses): Don't store descriptor size in its + OMP_CLAUSE_SIZE field. + (lower_omp_target): Add missing OMP_CLAUSE_MAP check. Add special-case + string handling. Handle span and bias. Use low bound instead of zero + as index for trailing full dimensions. + +2026-07-09 Julian Brown <[email protected]> + + * gimplify.cc (omp_group_last, omp_group_base): Add GOMP_MAP_TO_GRID, + GOMP_MAP_FROM_GRID support. + (gimplify_adjust_omp_clauses): Support new GOMP_MAP_GRID_DIM, + GOMP_MAP_GRID_STRIDE mapping nodes. Don't crash on e.g. misuse of + ADDR_EXPR in mapping clauses. + * omp-general.cc (omp_parse_noncontiguous_array): New function. + (omp_parse_access_method): Add noncontiguous array support. + (omp_parse_structure_base): Add array-shaping support. + (debug_omp_tokenized_addr): Add ACCESS_NONCONTIG_ARRAY, + ACCESS_NONCONTIG_REF_TO_ARRAY token support. + * omp-general.h (access_method_kinds): Add ACCESS_NONCONTIG_ARRAY and + ACCESS_NONCONTIG_REF_TO_ARRAY access kinds. + * omp-low.cc (omp_noncontig_descriptor_type): New function. + (scan_sharing_clauses): Support noncontiguous array updates. + (lower_omp_target): Likewise. + * tree-pretty-print.cc (dump_omp_clause): Add GOMP_MAP_TO_GRID, + GOMP_MAP_FROM_GRID, GOMP_MAP_GRID_DIM, GOMP_MAP_GRID_STRIDE map kinds. + (dump_generic_node): Add stride support for OMP_ARRAY_SECTION. + * tree.def (OMP_ARRAY_SECTION): Add stride argument. + +2026-07-09 Julian Brown <[email protected]> + Thomas Schwinge <[email protected]> + Sandra Loosemore <[email protected]> + + * gimplify.cc (gimplify_adjust_omp_clauses_1): Set + OMP_CLAUSE_MAP_RUNTIME_IMPLICIT_P for OpenACC also. + +2026-07-09 Julian Brown <[email protected]> + Paul-Antoine Arras <[email protected]> + Sandra Loosemore <[email protected]> + + * gimplify.cc (gimplify_adjust_omp_clauses_1): Handle "oacc declare + create" attribute. + +2026-07-09 Julian Brown <[email protected]> + Sandra Loosemore <[email protected]> + + * gimplify.cc (omp_tsort_mark, omp_mapping_group): Move before + gimplify_omp_ctx. Add constructor to omp_mapping_group. + (gimplify_omp_ctx): Add DECL_DATA_CLAUSE field. + (new_omp_context, delete_omp_context): Initialise and free above field. + (omp_gather_mapping_groups_1): Use constructor for omp_mapping_group. + (gimplify_scan_omp_clauses): Record mappings that might be lexically + inherited. Don't remove + GOMP_MAP_FIRSTPRIVATE_POINTER/GOMP_MAP_FIRSTPRIVATE_REFERENCE yet. + (gomp_oacc_needs_data_present): New function. + (gimplify_adjust_omp_clauses_1): Implement lexical inheritance + behaviour for OpenACC. + (gimplify_adjust_omp_clauses): Remove + GOMP_MAP_FIRSTPRIVATE_POINTER/GOMP_MAP_FIRSTPRIVATE_REFERENCE here + instead, after lexical inheritance is done. + +2026-07-09 Chung-Lin Tang <[email protected]> + + * builtins.cc (expand_builtin_omp_builtins): New function. + (expand_builtin): Add expand cases for BUILT_IN_GOMP_BARRIER, + BUILT_IN_OMP_GET_THREAD_NUM, BUILT_IN_OMP_GET_NUM_THREADS, + BUILT_IN_OMP_GET_TEAM_NUM, and BUILT_IN_OMP_GET_NUM_TEAMS using + expand_builtin_omp_builtins, enabled under -fopenmp-target=acc. + * cgraphunit.cc (analyze_functions): Add call to + omp_ompacc_attribute_tagging, enabled under -fopenmp-target=acc. + * common.opt (fopenmp-target=): Add new option and enums. + * config/nvptx/mkoffload.cc (main): Handle -fopenmp-target=. + * config/nvptx/nvptx-protos.h (nvptx_expand_omp_get_num_threads): New + prototype. + (nvptx_mem_shared_p): Likewise. + * config/nvptx/nvptx.cc (omp_num_threads_sym): New global static RTX + symbol for number of threads in team. + (omp_num_threads_align): New var for alignment of omp_num_threads_sym. + (need_omp_num_threads): New bool for if any function references + omp_num_threads_sym. + (nvptx_option_override): Initialize omp_num_threads_sym/align. + (write_as_kernel): Disable normal OpenMP kernel entry under OMPACC mode. + (nvptx_declare_function_name): Disable shim function under OMPACC mode. + Disable soft-stack under OMPACC mode. Add generation of neutering init + code under OMPACC mode. + (nvptx_output_set_softstack): Return "" under OMPACC mode. + (nvptx_expand_call): Set parallelism to vector for function calls with + "ompacc for" attached. + (nvptx_expand_oacc_fork): Set mode to GOMP_DIM_VECTOR under OMPACC mode. + (nvptx_expand_oacc_join): Likewise. + (nvptx_expand_omp_get_num_threads): New function. + (nvptx_mem_shared_p): New function. + (nvptx_mach_max_workers): Return 1 under OMPACC mode. + (nvptx_mach_vector_length): Return 32 under OMPACC mode. + (nvptx_single): Add adjustments for OMPACC mode, which have + parallel-construct fork/joins, and regions of code where neutering is + dynamically determined. + (nvptx_reorg): Enable neutering under OMPACC mode when "ompacc for" + attribute is attached to function. Disable uniform-simt when under + OMPACC mode. + (nvptx_file_end): Write __nvptx_omp_num_threads out when needed. + (nvptx_goacc_fork_join): Return true under OMPACC mode. + * config/nvptx/nvptx.h (struct GTY(()) machine_function): Add + omp_parallel_predicate and omp_fn_entry_num_threads_reg fields. + * config/nvptx/nvptx.md (unspecv): Add UNSPECV_GET_TID, + UNSPECV_GET_NTID, UNSPECV_GET_CTAID, UNSPECV_GET_NCTAID, + UNSPECV_OMP_PARALLEL_FORK, UNSPECV_OMP_PARALLEL_JOIN entries. + (nvptx_shared_mem_operand): New predicate. + (gomp_barrier): New expand pattern. + (omp_get_num_threads): New expand pattern. + (omp_get_num_teams): New insn pattern. + (omp_get_thread_num): Likewise. + (omp_get_team_num): Likewise. + (get_ntid): Likewise. + (nvptx_omp_parallel_fork): Likewise. + (nvptx_omp_parallel_join): Likewise. + * expr.cc (expand_expr_real_1): Call expand_var_decl target hook. + * flag-types.h (omp_target_mode_kind): New flag value enum. + * gimplify.cc (struct gimplify_omp_ctx): Add 'bool ompacc' field. + (gimplify_scan_omp_clauses): Handle OMP_CLAUSE__OMPACC_. + (gimplify_adjust_omp_clauses): Likewise. + (gimplify_omp_ctx_ompacc_p): New function. + (gimplify_omp_for): Handle combined loops under OMPACC. + * lto-wrapper.cc (append_compiler_options): Add OPT_fopenmp_target_. + * omp-builtins.def (BUILT_IN_OMP_GET_THREAD_NUM): Remove CONST. + (BUILT_IN_OMP_GET_NUM_THREADS): Likewise. + * omp-expand.cc (remove_exit_barrier): Disable addressable-var + processing for parallel construct child functions under OMPACC mode. + (expand_oacc_for): Add OMPACC mode handling. + (get_target_arguments): Force thread_limit clause value to 1 under + OMPACC mode. + (expand_omp): Under OMPACC mode, avoid child function expanding of + GIMPLE_OMP_PARALLEL. + * omp-general.cc (omp_extract_for_data): Adjustments for OMPACC mode. + * omp-low.cc (struct omp_context): Add 'bool ompacc_p' field. + (scan_sharing_clauses): Handle OMP_CLAUSE__OMPACC_. + (ompacc_ctx_p): New function. + (scan_omp_parallel): Handle OMPACC mode, avoid creating child function. + (scan_omp_target): Tag "ompacc"/"ompacc for" attributes for target + construct child function, remove OMP_CLAUSE__OMPACC_ clauses. + (lower_oacc_head_mark): Handle OMPACC mode cases. + (lower_omp_for): Adjust OMP_FOR kind from OpenMP to OpenACC kinds, add + vector/gang clauses as needed. Add other OMPACC handling. + (lower_omp_taskreg): Add call to lower_oacc_head_tail for OMPACC case. + (lower_omp_target): Do OpenACC gang privatization under OMPACC case. + (lower_omp_teams): Forward OpenACC privatization variables to outer + target region under OMPACC mode. + (lower_omp_1): Do OpenACC gang privatization under OMPACC case for + GIMPLE_BIND. + * omp-offload.cc (ompacc_supported_clauses_p): New function. + (struct target_region_data): New struct type for tree walk. + (scan_fndecl_for_ompacc): New function. + (scan_omp_target_region_r): New function. + (scan_omp_target_construct_r): New function. + (omp_ompacc_attribute_tagging): New function. + (oacc_dim_call): Add OMPACC case handling. + (execute_oacc_device_lower): Make parts explicitly only OpenACC enabled. + (pass_oacc_device_lower::gate): Enable pass under OMPACC mode. + * omp-offload.h (omp_ompacc_attribute_tagging): New prototype. + * opts.cc (finish_options): Only allow -fopenmp-target= when -fopenmp + and no -fopenacc. + * target-insns.def (gomp_barrier): New defined insn pattern. + (omp_get_thread_num): Likewise. + (omp_get_num_threads): Likewise. + (omp_get_team_num): Likewise. + (omp_get_num_teams): Likewise. + * tree-core.h (enum omp_clause_code): Add new OMP_CLAUSE__OMPACC_ entry + for internal clause. + * tree-nested.cc (convert_nonlocal_omp_clauses): Handle + OMP_CLAUSE__OMPACC_. + * tree-pretty-print.cc (dump_omp_clause): Handle OMP_CLAUSE__OMPACC_. + * tree.cc (omp_clause_num_ops): Add OMP_CLAUSE__OMPACC_ entry. + (omp_clause_code_name): Likewise. + * tree.h (OMP_CLAUSE__OMPACC__FOR): New macro for OMP_CLAUSE__OMPACC_. + +2026-07-09 Andrew Stubbs <[email protected]> + + * tree-vect-data-refs.cc (vect_analyze_data_refs): Workaround an + address-space bug. + +2026-07-09 Tobias Burnus <[email protected]> + Sandra Loosemore <[email protected]> + + * omp-oacc-kernels-decompose.cc (top_level_omp_for_in_stmt, + decompose_kernels_region_body): Handle GIMPLE_DEBUG like + simple assignment. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + * omp-expand.cc (expand_oacc_for): Convert .tile variable to + diff_type before multiplying. + * omp-general.cc (omp_extract_for_data): Use accumulated precision + of all collapsed for-loops as precision of iteration variable, up + to the precision of a long long. + +2026-07-09 Andrew Stubbs <[email protected]> + + * dwarf2out.cc (add_location_or_const_value_attribute): Set + DW_AT_address_class, if appropriate. + +2026-07-09 Andrew Stubbs <[email protected]> + + * dwarf2out.cc (notional_parents_list): New file variable. + (gen_subprogram_die): Record offload kernel functions in + notional_parents_list. + (fixup_notional_parents): New function. + (dwarf2out_finish): Call fixup_notional_parents. + (dwarf2out_c_finalize): Reset notional_parents_list. + +2026-07-09 Julian Brown <[email protected]> + + * omp-offload.cc (oacc_thread_numbers): Add VF_BY_VECTORIZER parameter. + Add overloaded wrapper for previous arguments & behaviour. + (oacc_xform_loop): Lower vector loops to iterate a multiple of + omp_max_vf times over contiguous steps on non-SIMT targets. + +2026-07-09 Cesar Philippidis <[email protected]> + Julian Brown <[email protected]> + Kwok Cheung Yeung <[email protected]> + Tobias Burnus <[email protected]> + Thomas Schwinge <[email protected]> + Paul-Antoine Arras <[email protected]> + + * gimplify.cc (omp_group_base): Handle GOMP_MAP_DECLARE_ALLOCATE + and GOMP_MAP_DECLARE_DEALLOCATE. + (gimplify_adjust_omp_clauses): Likewise. + * omp-low.cc (scan_sharing_clauses): Update handling of OpenACC declare + create, declare copyin and declare deviceptr to have local lifetimes. + (convert_to_firstprivate_int): Handle pointer types. + (convert_from_firstprivate_int): Likewise. Create local storage for + the values being pointed to. Add new orig_type argument. Use + VIEW_CONVERT also for vectors. + (lower_omp_target): Handle GOMP_MAP_DECLARE_{ALLOCATE,DEALLOCATE}. + Add orig_type argument to convert_from_firstprivate_int call. + Allow pointer types with GOMP_MAP_FIRSTPRIVATE_INT. Don't privatize + firstprivate VLAs. + * tree-pretty-print.cc (dump_omp_clause): Handle + GOMP_MAP_DECLARE_{ALLOCATE,DEALLOCATE}. + +2026-07-09 Julian Brown <[email protected]> + Tobias Burnus <[email protected]> + Sandra Loosemore <[email protected]> + + * gimplify.cc (localize_reductions): Rewrite references for + OMP_CLAUSE_PRIVATE also. Do not create local variable for + privatized arrays as the size is not directly known by the type. + +2026-07-09 Cesar Philippidis <[email protected]> + Julian Brown <[email protected]> + Sandra Loosemore <[email protected]> + + * gimplify.cc (privatize_reduction): New struct. + (localize_reductions_r, localize_reductions): New functions. + (gimplify_omp_for): Call localize_reductions. + (gimplify_omp_workshare): Likewise. + * omp-low.cc (lower_oacc_reductions): Handle localized reductions. + Create fewer temp vars. + * tree-core.h (omp_clause_code): Add OMP_CLAUSE_REDUCTION_PRIVATE_DECL + documentation. + * tree.cc (omp_clause_num_ops): Bump number of ops for + OMP_CLAUSE_REDUCTION to 6. + (walk_tree_1): Adjust accordingly. + * tree.h (OMP_CLAUSE_REDUCTION_PRIVATE_DECL): Add macro. + +2026-07-09 Cesar Philippidis <[email protected]> + Chung-Lin Tang <[email protected]> + + * gimplify.cc (omp_add_variable): Enable firstprivate reduction + variables. + +2026-07-09 Cesar Philippidis <[email protected]> + + * omp-low.cc (lower_oacc_head_mark): Don't mark OpenACC auto + loops as independent inside acc parallel regions. + +2026-07-09 Cesar Philippidis <[email protected]> + Julian Brown <[email protected]> + Tobias Burnus <[email protected]> + Kwok Cheung Yeung <[email protected]> + + * omp-low.cc (maybe_lookup_field_in_outer_ctx): New function. + (convert_to_firstprivate_int): New function. + (convert_from_firstprivate_int): New function. + (lower_omp_target): Enable GOMP_MAP_FIRSTPRIVATE_INT in OpenACC. + Remove unused variable. + +2026-07-09 Nathan Sidwell <[email protected]> + Tom de Vries <[email protected]> + Thomas Schwinge <[email protected]> + Julian Brown <[email protected]> + + * doc/invoke.texi (fopenacc-dim): Document syntax for using + runtime value from environment variable. + * omp-offload.cc (oacc_parse_default_dims): Implement it. + +2026-07-09 Sandra Loosemore <[email protected]> + Cesar Philippidis <[email protected]> + + * config/nvptx/nvptx.cc (nvptx_propagate_unified): New. + (nvptx_split_blocks): Call it for cond_uni insn. + (nvptx_expand_cond_uni): New. + (enum nvptx_builtins): Add NVPTX_BUILTIN_COND_UNI. + (nvptx_init_builtins): Initialize it. + (nvptx_expand_builtin): Handle NVPTX_BUILTIN_COND_UNI. + (nvptx_generate_vector_shuffle): Change integral SHIFT operand to + tree BITS operand. + (nvptx_vector_reduction): New. + (nvptx_adjust_reduction_type): New. + (nvptx_goacc_reduction_setup): Use it to adjust the type of ref_to_res. + (nvptx_goacc_reduction_init): Don't update LHS if it doesn't exist. + (nvptx_goacc_reduction_fini): Call nvptx_vector_reduction for vector. + Use it to adjust the type of ref_to_res. + (nvptx_goacc_reduction_teardown): Call nvptx_adjust_reduction_type. + * config/nvptx/nvptx.md (cond_uni): New pattern. + * gimplify.cc (gimplify_adjust_omp_clauses): Add DECL_P check + for OMP_CLAUSE_TASK_REDUCTION. + * omp-low.cc (lower_oacc_reductions): Handle + GOMP_MAP_FIRSTPRIVATE_POINTER. + * omp-offload.cc (default_goacc_reduction): Likewise. + +2026-07-09 Cesar Philippidis <[email protected]> + James Norris <[email protected]> + Julian Brown <[email protected]> + Tobias Burnus <[email protected]> + Thomas Schwinge <[email protected]> + + * gimplify.cc (enum gimplify_omp_var_data): Add GOVD_DEVICETPR. + (oacc_default_clause): Privatize fortran common blocks. + (omp_notice_variable): Add GOVD_DEVICEPTR attribute when appropriate. + Defer the expansion of DECL_VALUE_EXPR for common block decls. + (gimplify_scan_omp_clauses): Add GOVD_DEVICEPTR attribute when + appropriate. + (gimplify_adjust_omp_clauses_1): Set GOMP_MAP_FORCE_DEVICEPTR for + implicit deviceptr mappings. + +2026-07-09 Chung-Lin Tang <[email protected]> + Kwok Cheung Yeung <[email protected]> + Thomas Schwinge <[email protected]> + Paul-Antoine Arras <[email protected]> + Sandra Loosemore <[email protected]> + + PR other/76739 + * builtin-types.def (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_VAR): New type. + * gimplify.cc (omp_group_base): Handle GOMP_MAP_NONCONTIG_ARRAY_*. + (gimplify_scan_omp_clauses): Handle OMP_TARGET_UPDATE. + (gimplify_adjust_omp_clauses): Skip gimplification of + OMP_CLAUSE_SIZE of non-contiguous array maps (which is a TREE_LIST). + * omp-builtins.def (BUILT_IN_GOACC_DATA_START): Adjust function type + to new BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_VAR. + * omp-expand.cc (expand_omp_target): Add non-contiguous array + descriptor pointers to variadic arguments. + * omp-low.cc (append_field_to_record_type): New function. + (create_noncontig_array_descr_type): Likewise. + (create_noncontig_array_descr_init_code): Likewise. + (scan_sharing_clauses): For non-contiguous array map kinds, check for + supported dimension structure, and install non-contiguous array + variable into current omp_context. + (reorder_noncontig_array_clauses): New function. + (scan_omp_target): Call reorder_noncontig_array_clauses to place + non-contiguous array map clauses at beginning of clause sequence. + (lower_omp_target): Add handling for non-contiguous array map kinds, + add all created non-contiguous array descriptors to + gimple_omp_target_data_arg. + * tree-pretty-print.cc (dump_omp_clause): Handle + GOMP_MAP_NONCONTIG_ARRAY_*. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + * langhooks-def.h (lhd_omp_deep_mapping): Add new argument. + * langhooks.cc (lhd_omp_deep_mapping): Likewise. + * langhooks.h (omp_deep_mapping): Likewise. + * omp-low.cc (allocate_omp_iterator_elems): Work on the supplied + iterator set instead of the iterators in a supplied set of clauses. + (free_omp_iterator_elems): Likewise. + (lower_omp_target): Maintain vector of new iterators generated by + deep-mapping. Allocate and free iterator element arrays using + iterators found in clauses and in the new iterator vector. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + Sandra Loosemore <[email protected]> + + * gimplify.cc (enter_omp_iterator_loop_context): New function variant. + (enter_omp_iterator_loop_context): Delegate to new variant. + (exit_omp_iterator_loop_context): New function variant. + (exit_omp_iterator_loop_context): Delegate to new variant. + (assign_to_iterator_elems_array): New. + (add_new_omp_iterators_entry): New. + (add_new_omp_iterators_clause): Delegate to + add_new_omp_iterators_entry. + * gimplify.h (enter_omp_iterator_loop_context): Adjust prototype. + (exit_omp_iterator_loop_context): Remove argument. + (assign_to_iterator_elems_array): New prototype. + (add_new_omp_iterators_entry): New prototype. + * langhooks-def.h (lhd_omp_deep_mapping_cnt): Remove const from + argument. + (lhd_omp_deep_mapping): Likewise. + * langhooks.cc (lhd_omp_deep_mapping_cnt): Likewise. + (lhd_omp_deep_mapping): Likewise. + * langhooks.h (omp_deep_mapping_cnt): Likewise. + (omp_deep_mapping): Likewise. Adjust comments. + * omp-low.cc (lower_omp_map_iterator_expr): Delegate to + assign_to_iterator_elems_array. + (lower_omp_map_iterator_size): Likewise. + (lower_omp_target): Remove sorry for deep mapping. Use a better name + for the deep_map_cnt temporary to make dumps more readable. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + * gimplify.cc (add_new_omp_iterators_clause): New. + (build_omp_struct_comp_nodes): Add extra argument for loops sequence. + Call add_new_omp_iterators_clause on newly generated clauses. + (omp_accumulate_sibling_list): Add extra argument for loops sequence. + Pass to calls to build_omp_struct_comp_nodes. Add iterators to newly + generator clauses for struct accesses. + (omp_build_struct_sibling_lists): Add extra argument for loops + sequence. Pass to call to omp_accumulate_sibling_list. + (gimplify_adjust_omp_clauses): Pass loops sequence to + omp_build_struct_sibling_lists. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + Sandra Loosemore <[email protected]> + + * gimplify.cc (omp_iterator_elems_length): New. + (build_omp_iterators_loops): Change type of elements + array to pointer of pointers if array length is non-constant, and + assign size with indirect reference. Reorder elements added to + iterator vector and add element containing the iteration count. Use + omp_iterator_elems_length to compute element array size required. + * gimplify.h (omp_iterator_elems_length): New prototype. + * omp-low.cc (lower_omp_map_iterator_expr): Reorder elements read + from iterator vector. If elements field is a pointer type, assign + using pointer arithmetic followed by indirect reference, and return + the field directly. + (lower_omp_map_iterator_size): Reorder elements read from iterator + vector. If elements field is a pointer type, assign using pointer + arithmetic followed by indirect reference. + (allocate_omp_iterator_elems): New. + (free_omp_iterator_elems): New. + (lower_omp_target): Call allocate_omp_iterator_elems before inserting + loops sequence, and call free_omp_iterator_elems afterwards. + * tree-pretty-print.cc (dump_omp_iterators): Print extra elements in + iterator vector. + +2026-07-09 Chung-Lin Tang <[email protected]> + + Backported from master: + 2026-06-30 Chung-Lin Tang <[email protected]> + + * gimplify.cc (enum gimplify_omp_var_data): + Add GOVD_USES_ALLOCATORS_ALLOCATOR. + (gimplify_bind_expr): Diagnose missing uses_allocators clause. + (omp_get_attachment): Add GOMP_MAP_USES_ALLOCATORS cases. + (omp_group_base): Likewise. + (gimplify_scan_omp_clauses): Handle uses_allocators. + (gimplify_adjust_omp_clauses_1): Handle GOVD_USES_ALLOCATORS_ALLOCATOR. + * omp-low.cc (scan_sharing_clauses): Check if ALLOCATE clause in target + region has containing USES_ALLOCATORS clause. + Add OMP_CLAUSE_USES_ALLOCATORS cases. + (lower_omp_target): Add OMP_CLAUSE_USES_ALLOCATORS cases. + * tree-pretty-print.cc (dump_omp_clause): Handle GOMP_MAP_USES_ALLOCATORS. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-24 Paul-Antoine Arras <[email protected]> + + * omp-builtins.def (BUILT_IN_GOMP_REDUCTION_START): New builtin. + (BUILT_IN_GOMP_REDUCTION_END): New builtin. + * omp-low.cc (lower_reduction_clauses): Replace + BUILT_IN_GOMP_ATOMIC_START / BUILT_IN_GOMP_ATOMIC_END with + BUILT_IN_GOMP_REDUCTION_START / BUILT_IN_GOMP_REDUCTION_END. + (lower_omp_sections): Likewise. + (lower_omp_scope): Likewise. + (lower_omp_for): Likewise. + * tree-ssa-alias.cc (check_fnspec): Handle + BUILT_IN_GOMP_REDUCTION_START and BUILT_IN_GOMP_REDUCTION_END as + memory barriers. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-24 Paul-Antoine Arras <[email protected]> + + * omp-builtins.def (BUILT_IN_GOMP_BARRIER): Change function to + GOMP_barrier_ext and type to BT_FN_VOID_INT. + (BUILT_IN_GOMP_BARRIER_CANCEL): Change function to + GOMP_barrier_cancel_ext and type to BT_FN_VOID_INT. + * omp-expand.cc (expand_omp_for_static_nochunk): Pass + GOMP_BARRIER_IMPLICIT_WORKSHARE to omp_build_barrier. + (expand_omp_for_static_chunk): Likewise. + (expand_omp_single): Likewise. + * omp-general.cc (omp_build_barrier): Add kind parameter; pass it + to GOMP_barrier_ext or GOMP_barrier_cancel_ext. + * omp-general.h (omp_build_barrier): Update declaration to add + kind parameter. + * omp-low.cc (lower_rec_input_clauses): Determine barrier kind from + the enclosing gimple statement code and pass it to omp_build_barrier. + (lower_omp_for_scan): Pass GOMP_BARRIER_IMPLICIT_WORKSHARE to + omp_build_barrier. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-24 Paul-Antoine Arras <[email protected]> + + * builtin-types.def (BT_COMPLEX_INT, BT_FN_COMPLEX_INT): New types. + * omp-builtins.def (BUILT_IN_GOMP_LOOP_STATIC_WORKSHARING): New + builtin. + (BUILT_IN_GOMP_DISTRIBUTE_STATIC_WORKSHARING): Likewise. + * omp-expand.cc (expand_omp_for_static_nochunk): Replace separate calls + to public API functions with a single call to + GOMP_loop_static_worksharing or GOMP_distribute_static_worksharing, then + unpack id and count. + (expand_omp_for_static_chunk): Likewise. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-24 Paul-Antoine Arras <[email protected]> + + * omp-builtins.def (BUILT_IN_GOMP_HAS_MASKED_THREAD_NUM): New builtin. + * omp-low.cc (lower_omp_master): Call it. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + Backported from master: + 2026-06-23 Kwok Cheung Yeung <[email protected]> + Sandra Loosemore <[email protected]> + + * gimplify.cc (gimplify_omp_affinity): Use macros for accessing + iterator elements. + (compute_omp_iterator_count): Likewise. + (build_omp_iterator_loop): Likewise. + (copy_omp_iterator): Use a boolean to force creation of an + expanded iterator vector, instead of specifying the length explicitly. + (remove_unused_omp_iterator_vars): Use accessor macros. + (build_omp_iterators_loops): Likewise. + (enter_omp_iterator_loop_context_1): Likewise. + (extract_base_bit_offset): Likewise. + * omp-low.cc (lower_omp_map_iterator_expr): Likewise. + (lower_omp_map_iterator_size): Likewise. + * tree-inline.cc (copy_tree_body_r): Likewise. + * tree-pretty-print.cc (dump_omp_iterators): Likewise. + * tree.h (OMP_ITERATOR_VAR, OMP_ITERATOR_BEGIN, OMP_ITERATOR_END, + OMP_ITERATOR_STEP, OMP_ITERATOR_ORIG_STEP, OMP_ITERATOR_BLOCK, + OMP_ITERATOR_LABEL, OMP_ITERATOR_INDEX, OMP_ITERATOR_ELEMS, + OMP_ITERATOR_COUNT, OMP_ITERATOR_EXPANDED_P): New macros. + (make_omp_iterator, make_expanded_omp_iterator): New constructor + functions. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-06-22 Tobias Burnus <[email protected]> + + * omp-general.cc (omp_runtime_api_procname): Update for added + functions and older additions. + * omp-low.cc (scan_omp_1_stmt): Update for added _dim function. + +2026-07-09 Thomas Schwinge <[email protected]> + + Backported from master: + 2026-06-12 Thomas Schwinge <[email protected]> + + PR target/101484 + * config/gcn/gcn.cc (TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID): Implement. + +2026-07-09 Andrew Stubbs <[email protected]> + + Backported from master: + 2026-06-11 Andrew Stubbs <[email protected]> + + * config/gcn/gcn.h (REG_CLASS_NAMES): Add missing comma. + +2026-07-09 Chung-Lin Tang <[email protected]> + + Backported from master: + 2026-06-10 Chung-Lin Tang <[email protected]> + + PR fortran/122910 + * langhooks-def.h (LANG_HOOKS_OMP_ARRAY_DATA_PRIVATIZE): Define. + * langhooks.h (struct lang_hooks_for_decls): Define + omp_array_data_privatize hook. + * omp-low.cc (scan_sharing_clauses): Add new calls to + lang_hooks.decls.omp_array_data_privatize, + (lower_omp_target): Likewise. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + Backported from master: + 2026-06-07 Kwok Cheung Yeung <[email protected]> + Andrew Stubbs <[email protected]> + Sandra Loosemore <[email protected]> + + * gimplify.cc (compute_omp_iterator_count): Account for difference + in loop boundaries in Fortran. + (build_omp_iterator_loop): Change upper boundary condition for + Fortran. Insert block statements into innermost loop. + (remove_unused_omp_iterator_vars): Copy block subblocks of old + iterator to new iterator and remove original. + (extract_base_bit_offset): Add iterator argument. Remove iterator + variables from base. + (omp_accumulate_sibling_list): Add iterator argument to + extract_base_bit_offset. + * tree-pretty-print.cc (dump_block_node): Ignore BLOCK_SUBBLOCKS + containing iterator block statements. + +2026-07-09 Sandra Loosemore <[email protected]> + + Backported from master: + 2026-06-05 Sandra Loosemore <[email protected]> + + * gimplify.cc (remove_unused_omp_iterator_vars): Don't warn about + possibly-unused iterator variables. Simplify control flow of + remaining code. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-05-29 Tobias Burnus <[email protected]> + + PR c/122892 + * gimplify.cc (gimplify_scan_omp_clauses): Update for removed + plural -S in GOMP_OMP_PREDEF_ALLOC_THREAD. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-05-25 Tobias Burnus <[email protected]> + + PR c/125377 + * omp-general.cc (omp_check_for_duplicate_variant): Fix used + tree for 'inform' part of the error message. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-05-19 Paul-Antoine Arras <[email protected]> + Chung-Lin Tang <[email protected]> + Sandra Loosemore <[email protected]> + + * fold-const.cc (operand_compare::operand_equal_p): Handle + OMP_ARRAY_SECTION. + * gimplify.cc (gimplify_scan_omp_clauses): Call + omp_remove_duplicate_maps after partial clause expansion. + * omp-general.cc (omp_remove_duplicate_maps): New function. + * omp-general.h (omp_remove_duplicate_maps): Declare. + * omp-low.cc (install_var_field): Add new 'tree key_expr = NULL_TREE' + default parameter. Set splay-tree lookup key to key_expr instead of + var if key_expr is non-NULL. Adjust call to install_parm_decl. + Update comments. + (scan_sharing_clauses): Use clause tree expression as splay-tree key + for map/to/from and OpenACC firstprivate cases when installing the + variable field into the send/receive record type. + (lower_oacc_reductions): Adjust to find map-clause of reduction + variable, then create receiver-ref. + (lower_omp_target): Adjust to lookup var field using clause expression. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-05-14 Tobias Burnus <[email protected]> + + * langhooks.cc (lhd_omp_deep_mapping_p, lhd_omp_deep_mapping_cnt, + lhd_omp_deep_mapping): Improve interface comment. + * langhooks.h (lhd_omp_deep_mapping_p, lhd_omp_deep_mapping_cnt, + lhd_omp_deep_mapping): Likewise + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-05-13 Tobias Burnus <[email protected]> + + * omp-general.cc (omp_runtime_api_procname): Add omp_control_tool. + +2026-07-09 Sandra Loosemore <[email protected]> + + * Makefile.in (REVISION_s): Change default message. \ No newline at end of file diff --git a/gcc/DATESTAMP.omp b/gcc/DATESTAMP.omp new file mode 100644 index 000000000000..76403c9887d1 --- /dev/null +++ b/gcc/DATESTAMP.omp @@ -0,0 +1 @@ +20260709 diff --git a/gcc/c-family/ChangeLog.omp b/gcc/c-family/ChangeLog.omp new file mode 100644 index 000000000000..7008806f4643 --- /dev/null +++ b/gcc/c-family/ChangeLog.omp @@ -0,0 +1,91 @@ +2026-07-09 Chung-Lin Tang <[email protected]> + Sandra Loosemore <[email protected]> + + * c-cppbuiltin.cc (c_cpp_builtins): Updated _OPENACC to "201811" + for OpenACC 2.7. + +2026-07-09 Chung-Lin Tang <[email protected]> + Sandra Loosemore <[email protected]> + + * c-omp.cc (c_omp_address_inspector::expand_array_base): + Set OMP_CLAUSE_MAP_POINTS_TO_READONLY on pointer clause. + (c_omp_address_inspector::expand_component_selector): Likewise. + +2026-07-09 Julian Brown <[email protected]> + + * c-omp.cc (c_omp_address_inspector::map_supported_p): Support + VIEW_CONVERT_EXPR and ADDR_EXPR codes. + (omp_expand_grid_dim): New function. + (omp_handle_noncontig_array): New function. + (c_omp_address_inspector:expand_array_base): Support noncontiguous + array updates. + (c_omp_address_inspector::expand_component_selector): Support + noncontiguous array updates. + * c-pretty-print.cc (c_pretty_printer::postfix_expression): Add + OMP_ARRAY_SECTION stride support. + +2026-07-09 Julian Brown <[email protected]> + + * c-common.h (expand_array_base, expand_component_selector, + expand_map_clause): Adjust member declarations. + * c-omp.cc (omp_expand_access_chain): Pass and return pointer to + clause. + (c_omp_address_inspector::expand_array_base): Likewise. + (c_omp_address_inspector::expand_component_selector): Likewise. + (c_omp_address_inspector::expand_map_clause): Likewise. + +2026-07-09 Julian Brown <[email protected]> + Sandra Loosemore <[email protected]> + + * c-omp.cc (c_omp_address_inspector::expand_array_base): Don't omit + pointer nodes for OpenACC. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + Andrew Stubbs <[email protected]> + + * c-omp.cc (omp_instantiate_mapper): Apply iterator to new clauses + generated from mapper. + +2026-07-09 Julian Brown <[email protected]> + + Backported from master: + 2026-05-22 Julian Brown <[email protected]> + Tobias Burnus <[email protected]> + + * c-common.h (enum c_omp_region_type): Add C_ORT_UPDATE and + C_ORT_OMP_UPDATE codes. + * c-omp.cc (omp_basic_map_kind_name): New function. + (omp_instantiate_mapper): Add LOC parameter and 'target update' + support. + (c_omp_instantiate_mappers): Add 'target update' support. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-24 Paul-Antoine Arras <[email protected]> + + * c-omp.cc (c_finish_omp_barrier): Pass GOMP_BARRIER_EXPLICIT to + GOMP_barrier_ext. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-05-14 Tobias Burnus <[email protected]> + + * c-omp.cc (omp_map_decayed_kind): Handle map modifiers + also for declare-mapper's map clauses. + +2026-07-09 Julian Brown <[email protected]> + + Backported from master: + 2026-04-29 Julian Brown <[email protected]> + + * c-common.h (c_omp_region_type): Add C_ORT_EXIT_DATA, + C_ORT_OMP_EXIT_DATA. + (c_omp_instantiate_mappers): Add region type parameter. + * c-omp.cc (omp_split_map_kind, omp_join_map_kind, + omp_map_decayed_kind): New functions. + (omp_instantiate_mapper): Add ORT parameter. Implement map kind decay + for instantiated mapper clauses. + (c_omp_instantiate_mappers): Add ORT parameter, pass to + omp_instantiate_mapper. \ No newline at end of file diff --git a/gcc/c/ChangeLog.omp b/gcc/c/ChangeLog.omp new file mode 100644 index 000000000000..6ccb755be41f --- /dev/null +++ b/gcc/c/ChangeLog.omp @@ -0,0 +1,203 @@ +2026-07-09 Chung-Lin Tang <[email protected]> + + * c-parser.cc (c_parser_omp_variable_list): Adjust parsing of opening + square bracket. + (c_parser_omp_clause_reduction): Adjustments for + OpenACC-specific cases. + * c-typeck.cc (c_oacc_reduction_defined_type_p): New function. + (c_oacc_reduction_code_name): Likewise. + (c_finish_omp_clauses): Handle OpenACC cases using new functions. + +2026-07-09 waffl3x <[email protected]> + Sandra Loosemore <[email protected]> + + PR c++/119659 + PR c++/118859 + PR c++/119601 + PR c++/119602 + PR c++/119775 + * c-parser.cc (c_omp_numeric_ranges_always_overlap): New function. + (c_parser_omp_parm_list): New function. + (c_finish_omp_declare_variant): Use c_parser_omp_parm_list instead + of c_parser_omp_variable_list. Refactor, change format of + "omp declare variant variant args" attribute. + +2026-07-09 Waffl3x <[email protected]> + + * c-parser.cc (c_parser_omp_allocate): Change diagnostic. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + * c-typeck.cc (handle_omp_array_sections): Add extra argument. Set + argument to true if array section has a stride that is not one. + (c_finish_omp_clauses): Disable strided updates when iterators are + used in the clause. Emit sorry if strided. + +2026-07-09 Julian Brown <[email protected]> + + * c-parser.cc (c_parser_braced_init): Disallow array-shaping operator + in braced init. + (c_parser_conditional_expression): Disallow array-shaping operator in + conditional expression. + (c_parser_cast_expression): Add array-shaping operator support. + (c_parser_postfix_expression): Disallow array-shaping operator in + statement expressions. + (c_parser_postfix_expression_after_primary): Add OpenMP array section + stride support. + (c_parser_expr_list): Disallow array-shaping operator in expression + lists. + (c_array_type_nelts_total): New function. + (c_parser_omp_variable_list): Support array-shaping operator. + (c_parser_omp_target_update): Recognize GOMP_MAP_TO_GRID and + GOMP_MAP_FROM_GRID map kinds as well as OMP_CLAUSE_TO/OMP_CLAUSE_FROM. + * c-tree.h (c_omp_array_shaping_op_p, c_omp_has_array_shape_p): New + extern declarations. + (create_omp_arrayshape_type): Add prototype. + * c-typeck.cc (c_omp_array_shaping_op_p, c_omp_has_array_shape_p): New + globals. + (build_omp_array_section): Permit integral types, not just integer + constants, when creating array types for array sections. + (create_omp_arrayshape_type): New function. + (handle_omp_array_sections_1): Add DISCONTIGUOUS parameter. Add + strided/rectangular array section support. + (omp_array_section_low_bound): New function. + (handle_omp_array_sections): Add DISCONTIGUOUS parameter. Add + strided/rectangular array section support. + (c_finish_omp_clauses): Update calls to handle_omp_array_sections. + Handle discontiguous updates. + +2026-07-09 Julian Brown <[email protected]> + + * c-parser.cc (c_parser_postfix_expression_after_primary): Dummy stride + support (for now). + (struct omp_dim): Add stride support. + (c_parser_omp_variable_list): Likewise. + * c-tree.h (build_omp_array_section): Update prototype. + * c-typeck.cc (mark_exp_read): Add stride support for + OMP_ARRAY_SECTION. + (build_omp_array_section): Add stride support. + (handle_omp_array_sections_1): Add minimal stride support. + +2026-07-09 Julian Brown <[email protected]> + + * c-typeck.cc (handle_omp_array_sections): Pass pointer to clause to + process instead of clause. + (c_finish_omp_clauses): Update calls to handle_omp_array_sections. + Handle cases where initial clause might be replaced. + +2026-07-09 Julian Brown <[email protected]> + Cesar Philippidis <[email protected]> + Nathan Sidwell <[email protected]> + Kwok Cheung Yeung <[email protected]> + + * c-parser.cc (c_parser_omp_variable_list): New c_omp_region_type + argument. Use it to specialize handling of OMP_CLAUSE_REDUCTION for + OpenACC. + (c_parser_omp_var_list_parens): Add region-type argument to call. + (c_parser_oacc_data_clause): Likewise. + (c_parser_oacc_data_clause_deviceptr): Likewise. + (c_parser_omp_clause_reduction): Change is_omp boolean parameter to + c_omp_region_type. Update call to c_parser_omp_variable_list. + (c_parser_omp_clause_map): Update call to + c_parser_omp_variable_list. + (c_parser_omp_clause_from_to): Likewise. + (c_parser_omp_clause_init): Likewise. + (c_parser_oacc_all_clauses): Update calls to + c_parser_omp_clause_reduction. + (c_parser_omp_all_clauses): Likewise. + (c_parser_oacc_cache): Update call to c_parser_omp_variable_list. + * c-typeck.cc (c_finish_omp_clauses): Emit an error on orphan OpenACC + gang reductions. Suppress user-defined reduction error for OpenACC. + +2026-07-09 Chung-Lin Tang <[email protected]> + Kwok Cheung Yeung <[email protected]> + Thomas Schwinge <[email protected]> + Paul-Antoine Arras <[email protected]> + Sandra Loosemore <[email protected]> + + PR other/76739 + * c-typeck.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. Reject + non-DECL base-pointer cases as unsupported. + (handle_omp_array_sections): Adjust handle_omp_array_sections_1 call, + handle non-contiguous case to create dynamic array map. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + Andrew Stubbs <[email protected]> + + * c-parser.cc (c_parser_omp_clause_map): Apply iterator to push and + pop mapper clauses. + +2026-07-09 Chung-Lin Tang <[email protected]> + + Backported from master: + 2026-06-30 Chung-Lin Tang <[email protected]> + + * c-typeck.cc (c_finish_omp_clauses): Fix comments. + +2026-07-09 Julian Brown <[email protected]> + + Backported from master: + 2026-05-22 Julian Brown <[email protected]> + Tobias Burnus <[email protected]> + + * c-parser.cc (c_parser_omp_clause_from_to): Add parsing + for mapper modifier. + (c_parser_omp_target_update): Instantiate mappers. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + Backported from master: + 2026-06-23 Kwok Cheung Yeung <[email protected]> + Sandra Loosemore <[email protected]> + + * c-parser.cc (c_parser_omp_iterators): Use iterator constructors + and macros for accessing iterator elements. + (c_parser_omp_clause_affinity): Likewise. + (c_parser_omp_clause_depend): Likewise. + (c_parser_omp_clause_map): Likewise. + (c_parser_omp_clause_from_to): Likewise. + * c-typeck.cc (c_omp_finish_iterators): Likewise. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-05-29 Tobias Burnus <[email protected]> + + PR c/122892 + * c-parser.cc (c_parser_omp_allocate): Reject + omp_{cgroup,pteam,thread}_mem_alloc for static variables. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-05-19 Paul-Antoine Arras <[email protected]> + Chung-Lin Tang <[email protected]> + Sandra Loosemore <[email protected]> + + * c-typeck.cc (c_finish_omp_clauses): Call omp_remove_duplicate_maps + before clause expansion. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-05-14 Tobias Burnus <[email protected]> + + * c-parser.cc (c_parser_omp_declare_mapper): Check that the + struct var is actually used by at least one map clause. + +2026-07-09 Julian Brown <[email protected]> + + Backported from master: + 2026-04-29 Julian Brown <[email protected]> + + * c-parser.cc (c_parser_omp_target_data): Instantiate mappers for + 'omp target data'. + (c_parser_omp_target_enter_data): Instantiate mappers for 'omp target + enter data'. + (c_parser_omp_target_exit_data): Instantiate mappers for 'omp target + exit data'. + (c_parser_omp_target): Add c_omp_region_type argument to + c_omp_instantiate_mappers call. + * c-tree.h (c_omp_instantiate_mappers): Remove spurious prototype. \ No newline at end of file diff --git a/gcc/cp/ChangeLog.omp b/gcc/cp/ChangeLog.omp new file mode 100644 index 000000000000..e91c0688faae --- /dev/null +++ b/gcc/cp/ChangeLog.omp @@ -0,0 +1,308 @@ +2026-07-09 Chung-Lin Tang <[email protected]> + + * parser.cc (cp_parser_omp_var_list_no_open): Adjust parsing of opening + square bracket. + (cp_parser_omp_clause_reduction): Adjustments for + OpenACC-specific cases. + * semantics.cc (cp_oacc_reduction_defined_type_p): New function. + (cp_oacc_reduction_code_name): Likewise. + (finish_omp_reduction_clause): Handle OpenACC cases using new + functions. + +2026-07-09 Sandra Loosemore <[email protected]> + Tobias Burnus <[email protected]> + + * parser.cc (cp_finish_omp_declare_variant): Adjust error messages. + +2026-07-09 waffl3x <[email protected]> + Sandra Loosemore <[email protected]> + + PR c++/119659 + PR c++/118859 + PR c++/119601 + PR c++/119602 + PR c++/119775 + PR c++/119659 + PR c++/118859 + PR c++/119601 + PR c++/119602 + PR c++/119775 + * cp-tree.h (finish_omp_parm_list): New declaration. + (finish_omp_adjust_args): New declaration. + * decl.cc (omp_declare_variant_finalize_one): Refactor and change + attribute unpacking, use finish_omp_parm_list and + finish_omp_adjust_args, refactor append_args diagnostics, add + nbase_parms to append_args attribute, remove special handling for + member functions. Clean up handling of TYPE_NO_NAMED_ARGS_STDARG_P. + * parser.cc (cp_parser_direct_declarator): Don't pass parms. + (cp_parser_late_return_type_opt): Remove parms parameter. + (cp_parser_omp_parm_list): New function. + (cp_finish_omp_declare_variant): Remove parms parameter. + Add NULL_TREE instead of nbase_args to append_args_tree. Refactor, + use cp_parser_omp_parm_list not cp_parser_omp_var_list_no_open, + handle "need_device_addr" and remove handling and diagnostics of + parm list arguments that are done too early. Change format of + unnamed variant attribute. + (cp_parser_late_parsing_omp_declare_simd): Remove parms parameter. + * pt.cc (tsubst_attribute): Copy "omp declare variant base" nodes, + substitute parm list numeric range bounds. + * semantics.cc (finish_omp_parm_list): New function. + (finish_omp_adjust_args): New function. + +2026-07-09 Sandra Loosemore <[email protected]> + + PR c/122892 + * semantics.cc (finish_omp_allocate): Diagnose invalid allocators. + +2026-07-09 Waffl3x <[email protected]> + + * parser.cc (cp_parser_omp_allocate): Change var_is_in_scope. + +2026-07-09 Waffl3x <[email protected]> + + * parser.cc (cp_maybe_parse_omp_decl): Sorry for allocate directive. + +2026-07-09 Waffl3x <[email protected]> + + * semantics.cc (finish_omp_allocate): Add sorry. + +2026-07-09 Waffl3x <[email protected]> + + * parser.cc (cp_parser_omp_allocate): Add diagnostics. + +2026-07-09 Waffl3x <[email protected]> + + * parser.cc (cp_parser_omp_allocate): Add allocator clause expr + diagnostics. + +2026-07-09 Waffl3x <[email protected]> + + * typeck.cc (can_do_nrvo_p): Return false for vars in an allocate + directive. + +2026-07-09 Waffl3x <[email protected]> + + * parser.cc (cp_parser_omp_allocate): Force a location wrapper. + * pt.cc (tsubst_stmt): Rewrap location wrappers after tsubst_expr. + +2026-07-09 Waffl3x <[email protected]> + + * parser.cc (cp_parser_omp_allocate): Add diagnostics, wrap a + location into allocator and alignment clause exprs. + * semantics.cc: Include gcc-rich-location.h. + (finish_omp_allocate): Improve and add diagnostics. + +2026-07-09 Waffl3x <[email protected]> + + * constexpr.cc (cxx_eval_constant_expression) + <case OMP_ALLOCATE>: New. + (potential_constant_expression_1) <case OMP_ALLOCATE>: New. + * cp-tree.def (OMP_ALLOCATE): New tree code. + * cp-tree.h (OMP_ALLOCATE_VARS): Define. + (OMP_ALLOCATE_ALLOCATOR): Define. + (OMP_ALLOCATE_ALIGN): Define. + (finish_omp_allocate): New declaration. + * parser.cc (cp_parser_omp_allocate): Rework, remove sorry, call + finish_omp_allocate. + * pt.cc (tsubst_stmt) <case OMP_ALLOCATE>: New. + * semantics.cc (finish_omp_allocate): New definition. + +2026-07-09 Waffl3x <[email protected]> + + * parser.cc (cp_parser_omp_construct) + <case PRAGMA_OMP_ALLOCATE>: Remove. + (cp_parser_pragma): Add comments. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + * 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. + +2026-07-09 Julian Brown <[email protected]> + + * 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. + +2026-07-09 Julian Brown <[email protected]> + + * 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. + +2026-07-09 Julian Brown <[email protected]> + Cesar Philippidis <[email protected]> + Nathan Sidwell <[email protected]> + Kwok Cheung Yeung <[email protected]> + + * parser.cc (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_no_open. + (cp_parser_oacc_data_clause): Update call to + cp_parser_omp_var_list_no_open. + (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_omp_clause_from_to): Update call to + cp_parser_omp_clause_var_list_no_open. + (cp_parser_omp_clause_map): Likewise. + (cp_parser_omp_clause_init): Likewise. + (cp_parser_oacc_all_clauses): Update call to + cp_parser_omp_clause_reduction. + (cp_parser_omp_all_clauses): Likewise. + * semantics.cc (finish_omp_reduction_clause): Add c_omp_region_type + argument. Suppress user-defined reduction error for OpenACC. + (finish_omp_clauses): Update call to finish_omp_reduction_clause. + +2026-07-09 Chung-Lin Tang <[email protected]> + Kwok Cheung Yeung <[email protected]> + Thomas Schwinge <[email protected]> + Paul-Antoine Arras <[email protected]> + Sandra Loosemore <[email protected]> + + 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. Reject + non-DECL base-pointer cases as unsupported. + (handle_omp_array_sections): Adjust handle_omp_array_sections_1 call, + handle non-contiguous case to create dynamic array map. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + Andrew Stubbs <[email protected]> + + * parser.cc (cp_parser_omp_clause_map): Apply iterator to push and + pop mapper clauses. + +2026-07-09 Julian Brown <[email protected]> + + Backported from master: + 2026-05-22 Julian Brown <[email protected]> + Tobias Burnus <[email protected]> + + * parser.cc (cp_parser_omp_clause_from_to): Add parsing for + mapper modifier. + (cp_parser_omp_target_update): Instantiate mappers. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-24 Paul-Antoine Arras <[email protected]> + + * semantics.cc (finish_omp_barrier): Push GOMP_BARRIER_EXPLICIT + onto the argument vector. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + Backported from master: + 2026-06-23 Kwok Cheung Yeung <[email protected]> + Sandra Loosemore <[email protected]> + + * parser.cc (cp_parser_omp_iterators): Use iterator constructors + and 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. + * pt.cc (tsubst_omp_clause_decl): Likewise. + * semantics.cc (cp_omp_finish_iterators): Likewise. + +2026-07-09 Sandra Loosemore <[email protected]> + + Backported from master: + 2026-06-05 Sandra Loosemore <[email protected]> + + * semantics.cc (cxx_omp_map_array_section): Allow ARRAY_TYPE + expressions, not just pointers. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-05-19 Paul-Antoine Arras <[email protected]> + Chung-Lin Tang <[email protected]> + Sandra Loosemore <[email protected]> + + * semantics.cc (finish_omp_clauses): Likewise. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-05-14 Tobias Burnus <[email protected]> + + * semantics.cc (cp_check_omp_declare_mapper): Change what + argument is expected; check that the struct var is used by at + least one map war. Print sorry when compiling with -std=c++98. + * pt.cc (tsubst_stmt, tsubst_expr): Call it. + * parser.cc (cp_parser_omp_declare_mapper): Update call. + +2026-07-09 Julian Brown <[email protected]> + + Backported from master: + 2026-04-29 Julian Brown <[email protected]> + + * 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). \ No newline at end of file diff --git a/gcc/fortran/ChangeLog.omp b/gcc/fortran/ChangeLog.omp new file mode 100644 index 000000000000..d16e87242acc --- /dev/null +++ b/gcc/fortran/ChangeLog.omp @@ -0,0 +1,652 @@ +2026-07-09 Kwok Cheung Yeung <[email protected]> + Andrew Stubbs <[email protected]> + + * openmp.cc (gfc_omp_instantiate_mapper): Add argument for namespace. + Apply namespace to new clauses. Propagate namespace to nested + mappers. + (gfc_omp_instantiate_mappers): Pass namespace of clause to clauses + generated by mappers. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + Sandra Loosemore <[email protected]> + + * trans-openmp.cc (gfc_trans_omp_array_section): Use temporaries only + when translating OpenACC. + +2026-07-09 Chung-Lin Tang <[email protected]> + Sandra Loosemore <[email protected]> + + * cpp.cc (cpp_define_builtins): Updated _OPENACC to "201811" + for OpenACC 2.7. + * intrinsic.texi (OpenACC Module OPENACC): Adjust version + references to 2.7 from 2.6. + +2026-07-09 Chung-Lin Tang <[email protected]> + + * openmp.cc (oacc_reduction_defined_type_p): New function. + (check_omp_clauses_dupl_syms): Adjust array reduction error test. + (resolve_omp_clauses_aff_dep_map_cache): Handle OMP_LIST_REDUCTION. + (resolve_omp_clauses): Adjust OMP_LIST_REDUCTION case. Use + oacc_reduction_defined_type_p for OpenACC. + * trans-openmp.cc (gfc_trans_omp_array_reduction_or_udr): + Add 'stmtblock_t *block', and 'bool openacc' parameters. Add array and + array section handling for openacc case. Adjust part of function to be + !openacc only. + (gfc_trans_omp_reduction_list): + Add 'stmtblock_t *block', and 'bool openacc' parameters, pass to calls + to gfc_trans_omp_array_reduction_or_udr. + (gfc_trans_omp_array_section): Adjust setting of OMP_CLAUSE_SIZE to only + OMP_CLAUSE_MAP clauses. Adjust calculations of decls and bias to use + temporary variables instead of tree expression inside clauses. + (gfc_trans_omp_clauses): Add 'block' and 'openacc' arguments to calls to + gfc_trans_omp_reduction_list. + (gfc_trans_omp_do): Pass 'op == EXEC_OACC_LOOP' as 'bool openacc' + parameter in call to gfc_trans_omp_clauses. + +2026-07-09 Julian Brown <[email protected]> + Andrew Stubbs <[email protected]> + Kwok Cheung Yeung <[email protected]> + Sandra Loosemore <[email protected]> + + * openmp.cc (gfc_match_motion_var_list): Add parsing for mapper + modifier. + (gfc_match_omp_clauses): Adjust error handling for changes to + gfc_match_motion_var_list. + (gfc_omp_instantiate_mapper): Add code argument to get proper + location for diagnostic. + (gfc_omp_instantiate_mappers): Adjust for above change. + * trans-openmp.cc (gfc_trans_omp_clauses): Use correct ref for update + operations. + (gfc_trans_omp_target_update): Instantiate mappers. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-06-17 Tobias Burnus <[email protected]> + + * openmp.cc (match_udr_expr, gfc_match_omp_declare_reduction, + gfc_resolve_omp_udr): Improve diagnostic. + +2026-07-09 Sandra Loosemore <[email protected]> + + Backported from master: + 2026-07-05 Sandra Loosemore <[email protected]> + + * trans.cc (trans_code): Do not try to set location on non-expr + tree expressions, e.g. error_mark_node. + +2026-07-09 Sandra Loosemore <[email protected]> + + Backported from master: + 2026-07-03 Sandra Loosemore <[email protected]> + Tobias Burnus <[email protected]> + + * openmp.cc (resolve_omp_clauses_aff_dep_map_cache): Fix + indentation. + +2026-07-09 Julian Brown <[email protected]> + + * gfortran.h (gfc_omp_namelist_udm): Add MAPPER_ID field to store the + mapper name to use for lookup during resolution. + * module.cc (load_omp_udms, write_omp_udm): Handle MAPPER_ID field. + * openmp.cc (gfc_match_omp_clauses): Handle explicitly-specified + 'default' name. Don't do mapper lookup here, but record mapper name if + the user specifies one. + (resolve_omp_clauses): Do mapper lookup here instead. Report error for + missing named mapper. + +2026-07-09 Julian Brown <[email protected]> + + * gfortran.h (gfc_omp_instantiate_mappers): Adjust declaration + to return an error status instead of void. + * openmp.cc (gfc_gomp_instantiate_mappers): Likewise for the + the definition. + * trans-openmp.cc (gfc_trans_omp_target): Check return status of + call to gfc_omp_instantiate_mappers and insert an error_mark_node + on failure instead of continuing normal processing of the construct. + (gfc_trans_omp_target_data): Likewise. + (gfc_trans_omp_target_enter_data): Likewise. + (gfc_trans_omp_target_exit_data): Likewise. + +2026-07-09 Sandra Loosemore <[email protected]> + Julian Brown <[email protected]> + Tobias Burnus <[email protected]> + + * gfortran.h (gfc_omp_clauses): Add NS field. + * openmp.cc (resolve_omp_clauses): Record namespace containing + clauses. + (resolve_omp_mapper_clauses): New function. + (gfc_resolve_omp_directive): Add NS parameter to resolve_omp_clauses + calls. + (gfc_omp_instantiate_mappers): Call resolve_omp_mapper_clauses if we + instantiate any mappers. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-06-22 Tobias Burnus <[email protected]> + + * openmp.cc (resolve_omp_clauses_aff_dep_map_cache): Split off + from ... + (resolve_omp_clauses): ... here. Call it. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-06-22 Tobias Burnus <[email protected]> + + * openmp.cc (check_omp_clauses_dupl_syms): New; moved code from ... + (resolve_omp_clauses): ... here. Call new function. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-06-22 Tobias Burnus <[email protected]> + + * openmp.cc (resolve_omp_allocate_clauses): New function for + resolving 'allocate' clauses, splitt-off from ... + (resolve_omp_clauses): ... here. Call the new function. + +2026-07-09 Julian Brown <[email protected]> + + * gfortran.h (toc_directive): Move here. + (gfc_omp_instantiate_mappers, gfc_get_location): Add prototypes. + * openmp.cc (omp_split_map_op, omp_join_map_op, omp_map_decayed_kind, + omp_basic_map_kind_name, gfc_subst_replace, gfc_subst_prepend_ref, + gfc_subst_in_expr_1, gfc_subst_in_expr, gfc_subst_mapper_var): Move + here. + (gfc_omp_instantiate_mapper, gfc_omp_instantiate_mappers): Move here + and rename. + * trans-openmp.cc (toc_directive, omp_split_map_op, omp_join_map_op, + omp_map_decayed_kind, gfc_subst_replace, gfc_subst_prepend_ref, + gfc_subst_in_expr_1, gfc_subst_in_expr, gfc_subst_mapper_var, + gfc_trans_omp_instantiate_mapper, gfc_trans_omp_instantiate_mappers): + Remove from here. + (gfc_trans_omp_target, gfc_trans_omp_target_data, + gfc_trans_omp_target_enter_data, gfc_trans_omp_target_exit_data): + Rename calls to gfc_omp_instantiate_mappers. + +2026-07-09 Julian Brown <[email protected]> + + * trans-openmp.cc (omp_split_map_op, omp_join_map_op, + omp_map_decayed_kind): New functions. + (gfc_trans_omp_instantiate_mapper): Add CD parameter. Implement map + kind decay. + (gfc_trans_omp_instantiate_mappers): Add CD parameter. Pass to above + function. + (gfc_trans_omp_target_data): Instantiate mappers for 'omp target data'. + (gfc_trans_omp_target_enter_data): Instantiate mappers for 'omp target + enter data'. + (gfc_trans_omp_target_exit_data): Instantiate mappers for 'omp target + exit data'. + +2026-07-09 Julian Brown <[email protected]> + + * dump-parse-tree.cc (show_attr): Show omp_udm_artificial_var flag. + (show_omp_namelist): Support OMP_MAP_POINTER_ONLY and OMP_MAP_UNSET. + * f95-lang.cc (LANG_HOOKS_OMP_FINISH_MAPPER_CLAUSES, + LANG_HOOKS_OMP_EXTRACT_MAPPER_DIRECTIVE, + LANG_HOOKS_OMP_MAP_ARRAY_SECTION): Define language hooks. + * gfortran.h (gfc_statement): Add ST_OMP_DECLARE_MAPPER. + (symbol_attribute): Add omp_udm_artificial_var attribute. + (gfc_omp_map_op): Add OMP_MAP_POINTER_ONLY and OMP_MAP_UNSET. + (gfc_omp_namelist): Add u3 union containing udm pointer. + (gfc_omp_udm): New struct. + (gfc_omp_namelist_udm): New struct. + (gfc_symtree): Add omp_udm pointer. + (gfc_namespace): Add omp_udm_root symtree. Add omp_udm_ns flag. + (gfc_free_omp_namelist): Update prototype. + (gfc_free_omp_udm, gfc_omp_udm_find, gfc_find_omp_udm, + gfc_resolve_omp_udms): Add prototypes. + * match.cc (gfc_free_omp_namelist): Change FREE_NS and FREE_ALIGN + parameters to LIST number, to handle freeing user-defined mapper + namelists safely. + * match.h (gfc_match_omp_declare_mapper): Add prototype. + * module.cc (ab_attribute): Add AB_OMP_DECLARE_MAPPER_VAR. + (attr_bits): Add OMP_DECLARE_MAPPER_VAR. + (mio_symbol_attribute): Read/write AB_OMP_DECLARE_MAPPER_VAR attribute. + Set referenced attr on read. + (omp_map_clause_ops, omp_map_cardinality): New arrays. + (load_omp_udms, check_omp_declare_mappers): New functions. + (read_module): Load and check OMP declare mappers. + (write_omp_udm, write_omp_udms): New functions. + (write_module): Write OMP declare mappers. + * openmp.cc (gfc_free_omp_clauses, gfc_match_omp_variable_list, + gfc_match_omp_to_link, gfc_match_omp_depend_sink, + gfc_match_omp_clause_reduction): Update calls to gfc_free_omp_namelist. + (gfc_free_omp_udm, gfc_find_omp_udm, gfc_omp_udm_find, + gfc_match_omp_declare_mapper): New functions. + (gfc_match_omp_clauses): Add DEFAULT_MAP_OP parameter. Update calls to + gfc_free_omp_namelist. Add declare mapper support. + (resolve_omp_clauses): Add declare mapper support. Update calls to + gfc_free_omp_namelist. + (gfc_resolve_omp_udm, gfc_resolve_omp_udms): New functions. + * parse.cc (decode_omp_directive): Add declare mapper support. + (case_omp_decl): Add ST_OMP_DECLARE_MAPPER case. + (gfc_ascii_statement): Add ST_OMP_DECLARE_MAPPER case. + * resolve.cc (resolve_types): Call gfc_resolve_omp_udms. + * symbol.cc (free_omp_udm_tree): New function. + (gfc_free_namespace): Call above. + * trans-decl.cc (omp_declare_mapper_ns): New global. + (gfc_finish_var_decl, gfc_generate_function_code): Support declare + mappers. + (gfc_trans_deferred_vars): Ignore artificial declare-mapper vars. + * trans-openmp.cc (tree-iterator.h): Include. + (toc_directive): New enum. + (gfc_trans_omp_array_section): Change OP and OPENMP parameters to + toc_directive CD ('clause directive'). + (gfc_omp_finish_mapper_clauses, gfc_omp_extract_mapper_directive, + gfc_omp_map_array_section): New functions. + (omp_clause_directive): New enum. + (gfc_trans_omp_clauses): Remove DECLARE_SIMD and OPENACC parameters. + Replace with toc_directive CD, defaulting to TOC_OPENMP. Add declare + mapper support and OMP_MAP_POINTER_ONLY support. + (gfc_trans_omp_construct, gfc_trans_oacc_executable_directive, + gfc_trans_oacc_combined_directive): Update calls to + gfc_trans_omp_clauses. + (gfc_subst_replace, gfc_subst_prepend_ref): New variables. + (gfc_subst_in_expr_1, gfc_subst_in_expr, gfc_subst_mapper_var, + gfc_trans_omp_instantiate_mapper, gfc_trans_omp_instantiate_mappers, + gfc_record_mapper_bindings_code_fn, gfc_record_mapper_bindings_expr_fn, + gfc_find_nested_mappers, gfc_record_mapper_bindings): New functions. + (gfc_typespec * hash traits): New template. + (omp_declare_mapper_ns): Extern declaration. + (gfc_trans_omp_target): Call gfc_trans_omp_instantiate_mappers and + gfc_record_mapper_bindings. Update calls to gfc_trans_omp_clauses. + (gfc_trans_omp_declare_simd, gfc_trans_omp_declare_variant): Update + calls to gfc_trans_omp_clauses. + (gfc_trans_omp_mapper_name, gfc_trans_omp_declare_mapper, + gfc_trans_omp_declare_mappers): New functions. + * trans-stmt.h (gfc_trans_omp_declare_mappers): Add prototype. + * trans.h (gfc_omp_finish_mapper_clauses, + gfc_omp_extract_mapper_directive, gfc_omp_map_array_section): Add + prototypes. + +2026-07-09 Chung-Lin Tang <[email protected]> + Sandra Loosemore <[email protected]> + + * trans-openmp.cc (gfc_trans_omp_array_section): + Set OMP_CLAUSE_MAP_POINTS_TO_READONLY on pointer clause. + +2026-07-09 Sandra Loosemore <[email protected]> + Tobias Burnus <[email protected]> + + * trans-openmp.cc (gfc_trans_omp_declare_variant): Disallow + polymorphic and optional arguments with need_device_addr for now, but + don't reject need_device_addr entirely. + +2026-07-09 waffl3x <[email protected]> + Sandra Loosemore <[email protected]> + + PR c++/119659 + PR c++/118859 + PR c++/119601 + PR c++/119602 + PR c++/119775 + * trans-openmp.cc (gfc_trans_omp_declare_variant): Change format of + "omp declare variant variant args" attribute. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + * trans-openmp.cc (gfc_trans_omp_clauses): Disable strided updates + when iterators are used in the clause. + +2026-07-09 Julian Brown <[email protected]> + Sandra Loosemore <[email protected]> + + * trans-openmp.cc (gfc_omp_deep_map_kind_p): Handle + GOMP_MAP_{TO,FROM}_GRID, GOMP_MAP_GRID_{DIM,STRIDE}. + (gfc_trans_omp_arrayshape_type, gfc_omp_calculate_gcd, + gfc_desc_to_omp_noncontig_array, gfc_omp_contiguous_update_p): New + functions. + (gfc_trans_omp_clauses): Handle noncontiguous to/from clauses for OMP + "target update" directives. + +2026-07-09 Julian Brown <[email protected]> + + * trans-openmp.cc (gfc_omp_finish_clause): Treat implicitly-mapped + assumed-size arrays as zero-sized for OpenACC, rather than an error. + +2026-07-09 Julian Brown <[email protected]> + Paul-Antoine Arras <[email protected]> + Sandra Loosemore <[email protected]> + + * trans-openmp.cc (gfc_omp_finish_clause): Handle "declare create" for + scalar allocatable variables. + (gfc_trans_omp_clauses): Don't include allocatable vars in synthetic + "acc data" region created for "declare create" variables. Mark such + variables with the "oacc declare create" attribute instead. Don't + create ALWAYS_POINTER mapping for target-to-host updates of declare + create variables. + (gfc_trans_oacc_declare): Handle empty clause list. + +2026-07-09 Tobias Burnus <[email protected]> + + * openmp.cc (resolve_omp_clauses_aff_dep_map_cache): Apply + to OpenMP target update. + +2026-07-09 Cesar Philippidis <[email protected]> + Julian Brown <[email protected]> + Kwok Cheung Yeung <[email protected]> + Tobias Burnus <[email protected]> + Thomas Schwinge <[email protected]> + Paul-Antoine Arras <[email protected]> + + * gfortran.h (enum gfc_omp_map_op): Add OMP_MAP_DECLARE_ALLOCATE, + OMP_MAP_DECLARE_DEALLOCATE. + (gfc_omp_clauses): Add update_allocatable. + * trans-array.cc (gfc_array_allocate): Call + gfc_trans_oacc_declare_allocate for decls that have oacc_declare_create + attribute set. + * trans-decl.cc (find_module_oacc_declare_clauses): Relax + oacc_declare_create to OMP_MAP_ALLOC, and oacc_declare_copyin to + OMP_MAP_TO, in order to match OpenACC 2.5 semantics. + * trans-openmp.cc (gfc_omp_check_optional_argument): Handle non-decl + case. + (gfc_trans_omp_clauses): Use GOMP_MAP_ALWAYS_POINTER (for update + directive) or GOMP_MAP_FIRSTPRIVATE_POINTER (otherwise) for + allocatable scalar decls. Handle OMP_MAP_DECLARE_{ALLOCATE,DEALLOCATE} + clauses. + (gfc_trans_oacc_executable_directive): Use GOMP_MAP_ALWAYS_POINTER + for allocatable scalar data clauses inside acc update directives. + (gfc_trans_oacc_declare_allocate): New function. + * trans-stmt.cc (gfc_trans_allocate): Call + gfc_trans_oacc_declare_allocate for decls with oacc_declare_create + attribute set. + (gfc_trans_deallocate): Likewise. + * trans.h (gfc_trans_oacc_declare_allocate): Declare. + +2026-07-09 Julian Brown <[email protected]> + Cesar Philippidis <[email protected]> + Nathan Sidwell <[email protected]> + Kwok Cheung Yeung <[email protected]> + + * trans-openmp.cc (gfc_omp_clause_copy_ctor): Permit reductions. + +2026-07-09 Cesar Philippidis <[email protected]> + James Norris <[email protected]> + Julian Brown <[email protected]> + Tobias Burnus <[email protected]> + Thomas Schwinge <[email protected]> + + * openmp.cc (gfc_match_omp_map_clause): Re-write handling of the + deviceptr clause. Add new common_blocks argument. Propagate it to + gfc_match_omp_variable_list. + (gfc_match_omp_clauses): Update calls to gfc_match_omp_map_clauses. + (resolve_positive_int_expr): Promote the warning to an error. + (check_array_not_assumed): Remove pointer check. + (resolve_oacc_nested_loops): Error on do concurrent loops. + * trans-openmp.cc (gfc_omp_finish_clause): Don't create pointer data + mappings for deviceptr clauses. + (gfc_trans_omp_clauses): Likewise. + +2026-07-09 Chung-Lin Tang <[email protected]> + Kwok Cheung Yeung <[email protected]> + Thomas Schwinge <[email protected]> + Paul-Antoine Arras <[email protected]> + Sandra Loosemore <[email protected]> + + PR other/76739 + * f95-lang.cc (DEF_FUNCTION_TYPE_VAR_5): New symbol. + * types.def (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_VAR): New type. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + * trans-openmp.cc (gfc_omp_deep_mapping_map): Add new argument for + vector of newly created iterators. Push new iterators onto the + vector. + (gfc_omp_deep_mapping_comps): Add new argument for vector of new + iterators. Pass argument in calls to gfc_omp_deep_mapping_item and + gfc_omp_deep_mapping_comps. + (gfc_omp_deep_mapping_item): Add new argument for vector of new + iterators. Pass argument in calls to gfc_omp_deep_mapping_map and + gfc_omp_deep_mapping_comps. + (gfc_omp_deep_mapping_do): Add new argument for vector of new + iterators. Pass argument in calls to gfc_omp_deep_mapping_item. + (gfc_omp_deep_mapping_cnt): Pass NULL to new argument for + gfc_omp_deep_mapping_do. + (gfc_omp_deep_mapping): Add new argument for vector of new + iterators. Pass argument in calls to gfc_omp_deep_mapping_do. + * trans.h (gfc_omp_deep_mapping): Add new argument. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + Sandra Loosemore <[email protected]> + + * trans-openmp.cc (gfc_omp_deep_mapping_map): Remove const from ctx + argument. Add arguments for iterators and the statement sequence to + go into the iterator loop. Add statement sequence to iterator loop + body. Generate iterator loop entries for generated maps, insert + the map decls and sizes into the iterator element arrays, replace + original decls with the address of the element arrays, and + sizes/biases with SIZE_INT. + (gfc_omp_deep_mapping_comps): Remove const from ctx. Add argument for + iterators. Pass iterators to calls to gfc_omp_deep_mapping_item and + gfc_omp_deep_mapping_comps. + (gfc_omp_deep_mapping_item): Remove const from ctx. Add argument for + iterators. Collect generated side-effect statements and pass to + gfc_omp_deep_mapping_map along with the iterators. Pass iterators + to gfc_omp_deep_mapping_comps. + (gfc_omp_deep_mapping_do): Remove const from ctx. Pass iterators to + gfc_omp_deep_mapping_item. + (gfc_omp_deep_mapping_cnt): Remove const from ctx. + (gfc_omp_deep_mapping): Likewise. + * trans.h (gfc_omp_deep_mapping_cnt): Likewise. + (gfc_omp_deep_mapping): Likewise. + +2026-07-09 Chung-Lin Tang <[email protected]> + + Backported from master: + 2026-06-30 Chung-Lin Tang <[email protected]> + + * trans-array.cc (gfc_conv_array_initializer): Always set PURPOSE + when building constructor for get_initialized_tmp_var, adjust test + to use integer_zerop instead of != NULL_TREE. + * trans-openmp.cc (gfc_trans_omp_clauses): Handle uses_allocators. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-24 Paul-Antoine Arras <[email protected]> + + * trans-openmp.cc (gfc_trans_omp_barrier): Pass GOMP_BARRIER_EXPLICIT + to GOMP_barrier_ext. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-24 Paul-Antoine Arras <[email protected]> + + * types.def (BT_COMPLEX_INT): New type. + (BT_FN_COMPLEX_INT): New function type. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-06-12 Tobias Burnus <[email protected]> + + * parse.cc (match_word): Add no_substring and + reject_stmt_on_error arguments, defaulting to false and true, + respectively. + (match_word_omp_simd): Do not reject_statement on error and + enable no-substring matching. + (matcha, matcho, matchdo): Call match_word with no_substring + set to true and reject_stmt_on_error set to false. + (decode_omp_directive): Distinguish unknown directive name from + errors found during matching. + (decode_oacc_directive): Likewise; use matcha not match. + (matcha, matcho, matchdo, matchs, matchds): #undef after use. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + Backported from master: + 2026-06-23 Kwok Cheung Yeung <[email protected]> + Sandra Loosemore <[email protected]> + + * trans-openmp.cc (gfc_trans_omp_array_section): Use macros for + accessing iterator elements. + (handle_iterator): Likewise, plus the iterator constructor. + (gfc_trans_omp_clauses): Likewise. + +2026-07-09 Sandra Loosemore <[email protected]> + + Backported from master: + 2026-06-23 Sandra Loosemore <[email protected]> + + * trans-openmp.cc (gfc_trans_omp_array_section): Add comments and + use a more descriptive variable name. + +2026-07-09 Chung-Lin Tang <[email protected]> + + Backported from master: + 2026-06-10 Chung-Lin Tang <[email protected]> + + PR fortran/122910 + * f95-lang.cc (LANG_HOOKS_OMP_ARRAY_DATA_PRIVATIZE): Define as + gfc_omp_array_data_privatize. + * trans-openmp.cc (gfc_omp_array_data_privatize): New function. + * trans.h (gfc_omp_array_data_privatize): New declaration. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-06-09 Tobias Burnus <[email protected]> + + * module.cc (load_omp_udrs): Improve reduction diagnostic output. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + Backported from master: + 2026-06-07 Kwok Cheung Yeung <[email protected]> + Andrew Stubbs <[email protected]> + Sandra Loosemore <[email protected]> + + * dump-parse-tree.cc (show_omp_namelist): Add iterator support for + OMP_LIST_TO and OMP_LIST_FROM. + * match.cc (gfc_free_omp_namelist): Free namespace for OMP_LIST_TO + and OMP_LIST_FROM. + * openmp.cc (gfc_match_motion_var_list): Parse 'iterator' modifier. + (resolve_omp_clauses): Resolve iterators for OMP_LIST_TO and + OMP_LIST_FROM. + * trans-openmp.cc (gfc_trans_omp_clauses): Handle iterators in + OMP_LIST_TO and OMP_LIST_FROM clauses. Add expressions to + iter_block rather than block. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + Backported from master: + 2026-06-07 Kwok Cheung Yeung <[email protected]> + Andrew Stubbs <[email protected]> + Sandra Loosemore <[email protected]> + + * dump-parse-tree.cc (show_omp_namelist): Add iterator support for + OMP_LIST_MAP. + * match.cc (gfc_free_omp_namelist): Free namespace in namelist for + OMP_LIST_MAP. + * openmp.cc (gfc_match_omp_clauses): Parse 'iterator' modifier for + 'map' clause. + (resolve_omp_clauses): Resolve iterators for OMP_LIST_MAP. + * trans-openmp.cc: Include tree-ssa-loop-niter.h. + (gfc_trans_omp_array_section): Add iterator argument. Replace + instances of iterator variables with the initial value when + computing biases. + (gfc_trans_omp_clauses): Handle iterators in OMP_LIST_MAP clauses. + Add expressions to iter_block rather than block. Do not apply + iterators to firstprivate maps. Pass iterator to + gfc_trans_omp_array_section. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-05-29 Tobias Burnus <[email protected]> + + PR c/122892 + * openmp.cc (gfc_resolve_omp_allocate): Reject + omp_{cgroup,pteam,thread}_mem_alloc also for local static + variables. + +2026-07-09 Sandra Loosemore <[email protected]> + + Backported from master: + 2026-05-28 Sandra Loosemore <[email protected]> + + * intrinsic.texi (F_C_STRING): New section. + * trans-intrinsic.cc (conv_trim): Delete. + (conv_isocbinding_function): Rewrite the F_C_STRING case. + +2026-07-09 Sandra Loosemore <[email protected]> + + Backported from master: + 2026-05-28 Sandra Loosemore <[email protected]> + Tobias Burnus <[email protected]> + + * check.cc (gfc_check_c_f_strpointer): New. + * f95-lang.cc (gfc_init_builtin_functions): Add BUILT_IN_STRNLEN. + * gfortran.h (enum gfc_isym_id): Add GFC_ISYM_C_F_STRPOINTER. + * gfortran.texi (Interoperable Subroutines and Functions): Mention + f_c_string and c_f_strpointer. + * intrinsic.cc (add_subroutines): Add c_f_strpointer. Fix nearby + whitespace errors. + (sort_actual): Handle first argument to c_f_strpointer specially. + * intrinsic.h (gfc_check_c_f_strpointer): Declare. + * intrinsic.texi (C_F_STRPOINTER): New section. Add entry to menu + and cross-references from similar functions. + * iso-c-binding.def: Add c_f_strpointer. + * trans-intrinsic.cc (conv_isocbinding_subroutine_strpointer): New. + (gfc_conv_intrinsic_subroutine): Call it. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-05-26 Paul-Antoine Arras <[email protected]> + + * dump-parse-tree.cc (debug): Add debug functions for gfc_omp_namelist + and gfc_omp_clauses. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-05-19 Paul-Antoine Arras <[email protected]> + Chung-Lin Tang <[email protected]> + Sandra Loosemore <[email protected]> + + * gfortran.h (enum gfc_omp_map_op): Dedicate the two LSB to TO and FROM. + * openmp.cc (resolve_omp_clauses): Adjust to allow duplicate + mapped variables for OpenMP. + * trans-openmp.cc (gfc_trans_omp_clauses): Remove duplicates before + clause expansion. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-05-14 Tobias Burnus <[email protected]> + + * trans-openmp.cc (gfc_omp_deep_mapping_p, gfc_omp_deep_mapping_cnt, + gfc_omp_deep_mapping): Improve interface comment. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-05-13 Tobias Burnus <[email protected]> + + * intrinsic.texi (OpenMP Modules): Add named parameters for + omp_control_tool and omp_control_tool_result. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-05-02 Tobias Burnus <[email protected]> + Julian Brown <[email protected]> + + * gfortran.h (enum gfc_omp_list_type): Add this name + to the existing OMP_LIST... enum; add OMP_LIST_NONE. + (gfc_free_omp_namelist): Take that enum as arg instead of bool args. + * match.cc (gfc_free_omp_namelist): Update. + * openmp.cc (gfc_free_omp_clauses, gfc_free_omp_declare_variant_list, + gfc_match_omp_clause_reduction, gfc_match_omp_clauses, + gfc_match_omp_allocate, gfc_match_omp_flush, + gfc_match_omp_declare_target, resolve_omp_clauses, + gfc_resolve_omp_parallel_blocks, resolve_omp_do, + gfc_resolve_oacc_blocks, gfc_resolve_oacc_declare): Update + gfc_free_omp_namelist call and used enum type instead of + int. + * st.cc (gfc_free_statement): Likewise. \ No newline at end of file diff --git a/gcc/testsuite/ChangeLog.omp b/gcc/testsuite/ChangeLog.omp new file mode 100644 index 000000000000..195c25921a66 --- /dev/null +++ b/gcc/testsuite/ChangeLog.omp @@ -0,0 +1,648 @@ +2026-07-09 Kwok Cheung Yeung <[email protected]> + Sandra Loosemore <[email protected]> + + * gfortran.dg/gomp/target-enter-exit-data.f90: Revert expected tree + dumps. + +2026-07-09 Chung-Lin Tang <[email protected]> + Sandra Loosemore <[email protected]> + + * c-c++-common/cpp/openacc-define-3.c: Adjust test. + * gfortran.dg/openacc-define-3.f90: Adjust test. + +2026-07-09 Chung-Lin Tang <[email protected]> + + * c-c++-common/goacc/readonly-2.c: Adjust test. + * c-c++-common/goacc/reduction-9.c: Adjust test. + * c-c++-common/goacc/reduction-11.c: New test. + * c-c++-common/goacc/reduction-12.c: New test. + * c-c++-common/goacc/reduction-13.c: New test. + * c-c++-common/goacc/reduction-14.c: New test. + * c-c++-common/goacc/reduction-15.c: New test. + * c-c++-common/goacc/reduction-16.c: New test. + * g++.dg/goacc/reductions-1.C: Adjust test. + * gfortran.dg/goacc/array-reduction.f90: Adjust test. + * gfortran.dg/goacc/enter-exit-data-2.f90: Adjust test. + * gfortran.dg/goacc/finalize-1.f: Adjust test. + * gfortran.dg/goacc/kernels-decompose-1.f95: Adjust test. + * gfortran.dg/goacc/pr70828.f90: Adjust test. + * gfortran.dg/goacc/reduction.f95: Adjust test. + * gfortran.dg/gomp/target-enter-exit-data.f90: Adjust test. + +2026-07-09 Julian Brown <[email protected]> + Andrew Stubbs <[email protected]> + Kwok Cheung Yeung <[email protected]> + Sandra Loosemore <[email protected]> + + * gfortran.dg/gomp/declare-mapper-24.f90: New test. + * gfortran.dg/gomp/declare-mapper-26.f90: Uncomment 'target update' + part of test. + * gfortran.dg/gomp/declare-mapper-27.f90: New test. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-06-17 Tobias Burnus <[email protected]> + + * gfortran.dg/gomp/declare-reduction-2.f90: Update dg-error. + * gfortran.dg/gomp/udr1.f90: Likewise. + * gfortran.dg/gomp/udr2.f90: Likewise. + * gfortran.dg/gomp/udr3.f90: Likewise. + * gfortran.dg/gomp/udr4.f90: Likewise. + * gfortran.dg/gomp/declare-reduction-5.f90: New test. + +2026-07-09 Julian Brown <[email protected]> + + * gfortran.dg/gomp/declare-mapper-31.f90: New test. + +2026-07-09 Sandra Loosemore <[email protected]> + Julian Brown <[email protected]> + Tobias Burnus <[email protected]> + + * gfortran.dg/gomp/declare-mapper-26.f90: New test. + * gfortran.dg/gomp/declare-mapper-29.f90: New test. + +2026-07-09 Julian Brown <[email protected]> + + * gfortran.dg/gomp/declare-mapper-22.f90: New test. + * gfortran.dg/gomp/declare-mapper-23.f90: New test. + +2026-07-09 Julian Brown <[email protected]> + + * gfortran.dg/gomp/declare-mapper-1.f90: New test. + * gfortran.dg/gomp/declare-mapper-5.f90: New test. + * gfortran.dg/gomp/declare-mapper-14.f90: New test. + +2026-07-09 Chung-Lin Tang <[email protected]> + Sandra Loosemore <[email protected]> + + * c-c++-common/goacc/readonly-1.c: Adjust testcase. + * c-c++-common/goacc/readonly-2.c: New testcase. + * gfortran.dg/goacc/readonly-1.f90: Adjust testcase. + * gfortran.dg/pr67170.f90: Likewise. + +2026-07-09 Sandra Loosemore <[email protected]> + Tobias Burnus <[email protected]> + + * c-c++-common/gomp/adjust-args-10.c: Ignore the new sorry since the + lack of proper diagnostic is already xfail'ed. + * g++.dg/gomp/adjust-args-1.C: Adjust output patterns. + * g++.dg/gomp/adjust-args-17.C: New. + * gcc.dg/gomp/adjust-args-3.c: New. + * gfortran.dg/gomp/adjust-args-14.f90: Don't expect this to fail now. + +2026-07-09 waffl3x <[email protected]> + Sandra Loosemore <[email protected]> + + PR c++/119659 + PR c++/118859 + PR c++/119601 + PR c++/119602 + PR c++/119775 + * c-c++-common/gomp/pr118579.c: Change error text. + * g++.dg/gomp/adjust-args-1.C: Fix error text, add dg-* directives. + * g++.dg/gomp/adjust-args-2.C: Add dg-* directives. + * g++.dg/gomp/append-args-1.C: Add dg-* directives. + * gcc.dg/gomp/adjust-args-1.c: Fix error text, add dg-* directives. + * gcc.dg/gomp/append-args-1.c: Fix error text, add dg-* directives. + * c-c++-common/gomp/adjust-args-7.c: New test. + * c-c++-common/gomp/adjust-args-8.c: New test. + * c-c++-common/gomp/adjust-args-9.c: New test. + * c-c++-common/gomp/adjust-args-10.c: New test. + * c-c++-common/gomp/adjust-args-11.c: New test. + * c-c++-common/gomp/adjust-args-12.c: New test. + * c-c++-common/gomp/adjust-args-13.c: New test. + * c-c++-common/gomp/adjust-args-14.c: New test. + * c-c++-common/gomp/adjust-args-15.c: New test. + * g++.dg/gomp/adjust-args-5.C: New test. + * g++.dg/gomp/adjust-args-6.C: New test. + * g++.dg/gomp/adjust-args-7.C: New test. + * g++.dg/gomp/adjust-args-8.C: New test. + * g++.dg/gomp/adjust-args-9.C: New test. + * g++.dg/gomp/adjust-args-10.C: New test. + * g++.dg/gomp/adjust-args-11.C: New test. + * g++.dg/gomp/adjust-args-12.C: New test. + * g++.dg/gomp/adjust-args-13.C: New test. + * g++.dg/gomp/adjust-args-14.C: New test. + * g++.dg/gomp/adjust-args-15.C: New test. + * g++.dg/gomp/adjust-args-16.C: New test. + * g++.dg/gomp/append-args-9.C: New test. + * g++.dg/gomp/append-args-10.C: New test. + * g++.dg/gomp/append-args-11.C: New test. + * g++.dg/gomp/append-args-omp-interop-t.h: New header. + +2026-07-09 Sandra Loosemore <[email protected]> + + PR c/122892 + * c-c++-common/gomp/allocate-20.c: Remove expected "sorry" for C++, + and add new dg-error patterns for the C++ error messages. + * g++.dg/gomp/allocate-handles-2.C: Replace the implicit loop over + the predefined allocators with explicit calls, since some of them + are expected to trigger an error and others aren't. + +2026-07-09 Waffl3x <[email protected]> + + * g++.dg/gomp/omp-constexpr.C: Add sorry for allocate directive. + * g++.dg/gomp/allocate-24.C: New test. + +2026-07-09 Waffl3x <[email protected]> + + * g++.dg/gomp/allocate-16.C: Remove xfails, check for sorry, modify + cases impacted by sorry. + * g++.dg/gomp/allocate-20.C: New test. + * g++.dg/gomp/allocate-21.C: New test. + +2026-07-09 Waffl3x <[email protected]> + + * g++.dg/gomp/allocate-15.C: Add cases. + +2026-07-09 Waffl3x <[email protected]> + + * c-c++-common/gomp/allocate-5.c: Adjust test. + * c-c++-common/gomp/allocate-12.c: Remove xfail. + * c-c++-common/gomp/allocate-16.c: Likewise. + * c-c++-common/gomp/allocate-21.c: Likewise. + * g++.dg/gomp/allocate-23.C: New test. + +2026-07-09 Waffl3x <[email protected]> + + * g++.dg/gomp/allocate-5.C: Remove workarounds, enable ilp32. + * g++.dg/gomp/allocate-6.C: Likewise. + * g++.dg/gomp/allocate-7.C: Likewise. + * g++.dg/gomp/allocate-22.C: New test. + +2026-07-09 Waffl3x <[email protected]> + + * g++.dg/gomp/allocate-10.C: Remove xfails. + * g++.dg/gomp/allocate-14.C: Likewise. + * g++.dg/gomp/allocate-17.C: Likewise. + +2026-07-09 Waffl3x <[email protected]> + + * c-c++-common/gomp/allocate-9.c: Remove xfails. + * c-c++-common/gomp/allocate-19.c: Remove xfails. + * c-c++-common/gomp/allocate-21.c: New test. + * g++.dg/gomp/allocate-14.C: New test. + * g++.dg/gomp/allocate-15.C: New test. + * g++.dg/gomp/allocate-16.C: New test. + * g++.dg/gomp/allocate-17.C: New test. + * g++.dg/gomp/allocate-18.C: New test. + * g++.dg/gomp/allocate-19.C: New test. + * g++.dg/gomp/allocate-handles-1.C: Remove xfails. + +2026-07-09 Waffl3x <[email protected]> + + * c-c++-common/gomp/allocate-5.c: Modify for C++, remove sorry. + * c-c++-common/gomp/allocate-9.c: Use header, add dg-line modify + for C++, remove sorry. + * c-c++-common/gomp/allocate-10.c: Enable for C++, add dg-bogus. + * c-c++-common/gomp/allocate-11.c: Enable and xfail for C++, + add -Wno-switch-unreachable. + * c-c++-common/gomp/allocate-12.c: Enable for C++, add new xfailing + cases, xfail C++ cases. + * c-c++-common/gomp/allocate-14.c: Enable for C++. + * c-c++-common/gomp/allocate-15.c: Enable for C++. + * c-c++-common/gomp/allocate-16.c: Minor changes, enable for C++, + xfail C++ cases. + * c-c++-common/gomp/allocate-17.c: Remove sorry. + * c-c++-common/gomp/allocate-18.c: Use header, remove sorry. + * c-c++-common/gomp/allocate-19.c: Remove sorry, add C++ diags. + * c-c++-common/gomp/allocate-allocator-handle.h: New header. + * c-c++-common/gomp/directive-1.c: Remove sorry. + * g++.dg/gomp/allocate-5.C: New test. + * g++.dg/gomp/allocate-6.C: New test. + * g++.dg/gomp/allocate-7.C: New test. + * g++.dg/gomp/allocate-8.C: New test. + * g++.dg/gomp/allocate-9.C: New test. + * g++.dg/gomp/allocate-10.C: New test. + * g++.dg/gomp/allocate-11.C: New test. + * g++.dg/gomp/allocate-12.C: New test. + * g++.dg/gomp/allocate-13.C: New test. + * g++.dg/gomp/allocate-handles-1.C: New test. + * g++.dg/gomp/allocate-handles-2.C: New test. + * g++.dg/gomp/allocate-allocator-handle.h: New header. + +2026-07-09 Waffl3x <[email protected]> + + * c-c++-common/gomp/allocate-5.c: Match new diagnostic. + +2026-07-09 Julian Brown <[email protected]> + Sandra Loosemore <[email protected]> + + * gfortran.dg/gomp/noncontig-updates-1.f90: New test. + * gfortran.dg/gomp/noncontig-updates-2.f90: New test. + * gfortran.dg/gomp/noncontig-updates-3.f90: New test. + * gfortran.dg/gomp/noncontig-updates-4.f90: New test. + +2026-07-09 Julian Brown <[email protected]> + + * gcc.dg/gomp/bad-array-shaping-c-1.c: New test. + * gcc.dg/gomp/bad-array-shaping-c-2.c: New test. + * gcc.dg/gomp/bad-array-shaping-c-3.c: New test. + * gcc.dg/gomp/bad-array-shaping-c-4.c: New test. + * gcc.dg/gomp/bad-array-shaping-c-5.c: New test. + * gcc.dg/gomp/bad-array-shaping-c-6.c: New test. + * gcc.dg/gomp/bad-array-shaping-c-7.c: New test. + +2026-07-09 Julian Brown <[email protected]> + + * c-c++-common/gomp/target-map-iterators-1.c: Remove expected sorry. + * g++.dg/gomp/array-shaping-1.C: New test. + * g++.dg/gomp/array-shaping-2.C: New test. + * g++.dg/gomp/bad-array-shaping-1.C: New test. + * g++.dg/gomp/bad-array-shaping-2.C: New test. + * g++.dg/gomp/bad-array-shaping-3.C: New test. + * g++.dg/gomp/bad-array-shaping-4.C: New test. + * g++.dg/gomp/bad-array-shaping-5.C: New test. + * g++.dg/gomp/bad-array-shaping-6.C: New test. + * g++.dg/gomp/bad-array-shaping-7.C: New test. + * g++.dg/gomp/bad-array-shaping-8.C: New test. + * g++.dg/gomp/map-static-cast-lvalue-1.C: Remove expected sorry. + +2026-07-09 Julian Brown <[email protected]> + Thomas Schwinge <[email protected]> + Sandra Loosemore <[email protected]> + + * c-c++-common/goacc/combined-reduction.c: Adjust scan output. + * c-c++-common/goacc/implied-copy-1.c: Likewise. + * c-c++-common/goacc/reduction-1.c: Adjust patterns. + * c-c++-common/goacc/reduction-2.c: Likewise. + * c-c++-common/goacc/reduction-3.c: Likewise. + * c-c++-common/goacc/reduction-4.c: Likewise. + * c-c++-common/goacc/reduction-10.c: Likewise. + * gfortran.dg/goacc/common-block-3.f90: Likewise. + * gfortran.dg/goacc/implied-copy-1.f90: Likewise. + * gfortran.dg/goacc/loop-tree-1.f90: Likewise. + * gfortran.dg/goacc/private-explicit-kernels-1.f95: Likewise. + * gfortran.dg/goacc/private-predetermined-kernels-1.f95: Likewise. + +2026-07-09 Julian Brown <[email protected]> + + * gfortran.dg/goacc/assumed-size.f90: Don't expect error. + +2026-07-09 Julian Brown <[email protected]> + Paul-Antoine Arras <[email protected]> + Sandra Loosemore <[email protected]> + + * c-c++-common/goacc/readonly-1.c: Adjust patterns. + +2026-07-09 Julian Brown <[email protected]> + Sandra Loosemore <[email protected]> + + * c-c++-common/goacc/acc-data-chain.c: New test. + * gfortran.dg/goacc/pr70828.f90: Likewise. + * gfortran.dg/goacc/assumed-size.f90: Likewise. + +2026-07-09 Tobias Burnus <[email protected]> + Sandra Loosemore <[email protected]> + + * c-c++-common/goacc/kernels-decompose-pr103836-1-2.c: Adjust xfails. + * c-c++-common/goacc/kernels-decompose-pr103836-1-3.c: Likewise. + * c-c++-common/goacc/kernels-decompose-pr103836-1-4.c: Likewise. + * c-c++-common/goacc/kernels-decompose-pr104061-1-2.c: Likewise. + * c-c++-common/goacc/kernels-decompose-pr104061-1-3.c: Likewise. + * c-c++-common/goacc/kernels-decompose-pr104061-1-4.c: Likewise. + +2026-07-09 Cesar Philippidis <[email protected]> + Julian Brown <[email protected]> + Kwok Cheung Yeung <[email protected]> + Tobias Burnus <[email protected]> + Thomas Schwinge <[email protected]> + Paul-Antoine Arras <[email protected]> + + * gfortran.dg/goacc/declare-allocatable-1.f90: New test. + * gfortran.dg/goacc/declare-3.f95: Adjust expected dump output. + +2026-07-09 Julian Brown <[email protected]> + Tobias Burnus <[email protected]> + Sandra Loosemore <[email protected]> + + * gfortran.dg/goacc/privatization-1-compute-loop.f90: Add xfails. + * gfortran.dg/goacc/privatization-1-compute.f90: Likewise. + +2026-07-09 Cesar Philippidis <[email protected]> + Julian Brown <[email protected]> + Sandra Loosemore <[email protected]> + + * gfortran.dg/goacc/modules.f95: Remove xfail on bogus warnings. + +2026-07-09 Cesar Philippidis <[email protected]> + Chung-Lin Tang <[email protected]> + + * c-c++-common/goacc/reduction-10.c: New test. + +2026-07-09 Cesar Philippidis <[email protected]> + + * c-c++-common/goacc/loop-auto-1.c: Adjust test case to conform to + the new behavior of the auto clause in OpenACC 2.5. + * c-c++-common/goacc/loop-auto-2.c: Likewise. + * gcc.dg/goacc/loop-processing-1.c: Likewise. + * c-c++-common/goacc/loop-auto-3.c: New test. + * gfortran.dg/goacc/loop-auto-1.f90: New test. + +2026-07-09 Cesar Philippidis <[email protected]> + James Norris <[email protected]> + Tom de Vries <[email protected]> + Julian Brown <[email protected]> + Tobias Burnus <[email protected]> + + * g++.dg/goacc/loop-1.c: New test. + * g++.dg/goacc/loop-2.c: New test. + * g++.dg/goacc/loop-3.c: New test. + +2026-07-09 Julian Brown <[email protected]> + Cesar Philippidis <[email protected]> + Nathan Sidwell <[email protected]> + + * c-c++-common/goacc/reduction-9.c: New. + * g++.dg/goacc/reductions-1.C: New. + * gcc.dg/goacc/loop-processing-1.c: Update. + +2026-07-09 Cesar Philippidis <[email protected]> + James Norris <[email protected]> + Julian Brown <[email protected]> + Tobias Burnus <[email protected]> + Thomas Schwinge <[email protected]> + + * c-c++-common/goacc/deviceptr-4.c: Update. + * gfortran.dg/goacc/loop-2-kernels-tile.f95: Update. + * gfortran.dg/goacc/loop-2-parallel-tile.f95: Update. + * gfortran.dg/goacc/loop-2-serial-tile.f95: Update. + * gfortran.dg/goacc/sie.f95: Update. + * gfortran.dg/goacc/tile-1.f90: Update. + * gfortran.dg/gomp/num-teams-2.f90: Update. + * gfortran.dg/gomp/pr67500.f90: Update. + * gfortran.dg/gomp/pr77516.f90: Update. + +2026-07-09 Chung-Lin Tang <[email protected]> + Kwok Cheung Yeung <[email protected]> + Thomas Schwinge <[email protected]> + Paul-Antoine Arras <[email protected]> + Sandra Loosemore <[email protected]> + + PR other/76739 + * c-c++-common/goacc/data-clause-1.c (foo): Remove expected message. + * c-c++-common/goacc/noncontig_array-1.c: New test. + * g++.dg/goacc/data-clause-1.C (foo): Remove expected message. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + Sandra Loosemore <[email protected]> + + * c-c++-common/gomp/target-map-iterators-3.c: Update expected Gimple + output. + * c-c++-common/gomp/target-map-iterators-5.c: New. + * c-c++-common/gomp/target-update-iterators-3.c: Update expected + Gimple output. + * gfortran.dg/gomp/target-map-iterators-3.f90: Likewise. + * gfortran.dg/gomp/target-map-iterators-5.f90: New. + * gfortran.dg/gomp/target-map-iterators-6.f90: Update expected + Gimple output. + * gfortran.dg/gomp/target-update-iterators-3.f90: Likewise. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-30 Paul-Antoine Arras <[email protected]> + + * c-c++-common/gomp/atomic-builtins-1.c: Skip test when sync_int_128 is + available. + * lib/target-supports.exp (check_effective_target_sync_int_128): Return + 1 for targets that do not emit a call to __atomic_compare_exchange_16. + +2026-07-09 Jakub Jelinek <[email protected]> + + Backported from master: + 2026-06-25 Jakub Jelinek <[email protected]> + + * c-c++-common/gomp/atomic-builtins-1.c: Add int128 effective target. + +2026-07-09 Thomas Schwinge <[email protected]> + + Backported from master: + 2026-06-30 Thomas Schwinge <[email protected]> + + * g++.dg/gomp/deprecate-2.C: Remove obsolete 'dg-excess-errors'. + +2026-07-09 Chung-Lin Tang <[email protected]> + + Backported from master: + 2026-06-30 Chung-Lin Tang <[email protected]> + + * c-c++-common/gomp/uses_allocators-1.c: Adjust test, and move to + ../../libgomp/testsuite/libgomp.c-c++-common/uses_allocators-1.c + * c-c++-common/gomp/uses_allocators-2.c: Move to + ../../libgomp/testsuite/libgomp.c-c++-common/uses_allocators-2.c + * c-c++-common/gomp/uses_allocators-4.c: Adjust test, and move to + ../../libgomp/testsuite/libgomp.c-c++-common/uses_allocators-4.c + * c-c++-common/gomp/uses_allocators-7.c: Move to + ../../libgomp/testsuite/libgomp.c-c++-common/uses_allocators-7.c + * c-c++-common/gomp/uses_allocators-8.c: Move to + ../../libgomp/testsuite/libgomp.c-c++-common/uses_allocators-8.c + * gcc.dg/gomp/deprecate-2.c: Adjust test. + * gfortran.dg/gomp/allocate-1.f90: Likewise. + * gfortran.dg/gomp/scope-6.f90: Likewise. + * g++.dg/gomp/uses_allocators-1.C: Move to + ../../libgomp/testsuite/libgomp.c++/uses_allocators-1.C. + +2026-07-09 Julian Brown <[email protected]> + + Backported from master: + 2026-05-22 Julian Brown <[email protected]> + Tobias Burnus <[email protected]> + + * c-c++-common/gomp/target-update-iterators-1.c: Update for + dg-error change. + * c-c++-common/gomp/declare-mapper-19.c: New test. + +2026-07-09 Thomas Schwinge <[email protected]> + + Backported from master: + 2026-06-24 Thomas Schwinge <[email protected]> + + * gcc.dg/autopar/runtime-auto.c: Adjust. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-24 Paul-Antoine Arras <[email protected]> + + * c-c++-common/gomp/atomic-builtins-1.c: New test. + * c-c++-common/gomp/reduction-builtins-1.c: New test. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-24 Paul-Antoine Arras <[email protected]> + + * g++.dg/gomp/barrier-1.C: Update scan dump. + * g++.dg/gomp/tpl-barrier-1.C: Likewise. + * gcc.dg/gomp/barrier-1.c: Likewise. + * c-c++-common/gomp/implicit-barrier-1.c: New test. + * gfortran.dg/gomp/lastprivate-allocatable-barrier-1.f90: New test. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-24 Paul-Antoine Arras <[email protected]> + + * c-c++-common/gomp/for-8.c: New test. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-24 Paul-Antoine Arras <[email protected]> + + * c-c++-common/gomp/masked-1.c: Add scan directives verifying that + GOMP_has_masked_thread_num is emitted and omp_get_thread_num is not. + * g++.dg/gomp/master-3.C: Update scan-tree-dump-times to look for + GOMP_has_masked_thread_num instead of omp_get_thread_num. + * gcc.dg/gomp/master-3.c: Likewise. + * gfortran.dg/gomp/masked-1.f90: Add scan directive for + GOMP_has_masked_thread_num. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-06-12 Tobias Burnus <[email protected]> + + * gfortran.dg/goacc/asyncwait-4.f95: Update dg-error. + * gfortran.dg/goacc/routine-6.f90: Likewise. + * gfortran.dg/gomp/udr1.f90: Likewise. + * gfortran.dg/gomp/udr2.f90: Likewise. + * gfortran.dg/gomp/udr4.f90: Likewise. + * gfortran.dg/gomp/declare-reduction-2.f90: New test. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-06-09 Tobias Burnus <[email protected]> + + * gfortran.dg/gomp/declare-reduction-1.f90: New test. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + Backported from master: + 2026-06-07 Kwok Cheung Yeung <[email protected]> + Andrew Stubbs <[email protected]> + Sandra Loosemore <[email protected]> + + * gfortran.dg/gomp/target-update-iterators-1.f90: New. + * gfortran.dg/gomp/target-update-iterators-2.f90: New. + * gfortran.dg/gomp/target-update-iterators-3.f90: New. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + Backported from master: + 2026-06-07 Kwok Cheung Yeung <[email protected]> + Andrew Stubbs <[email protected]> + Sandra Loosemore <[email protected]> + + * gfortran.dg/gomp/target-map-iterators-1.f90: New. + * gfortran.dg/gomp/target-map-iterators-2.f90: New. + * gfortran.dg/gomp/target-map-iterators-3.f90: New. + * gfortran.dg/gomp/target-map-iterators-4.f90: New. + * gfortran.dg/gomp/target-map-iterators-6.f90: New. + +2026-07-09 Sandra Loosemore <[email protected]> + + Backported from master: + 2026-06-05 Sandra Loosemore <[email protected]> + + * c-c++-common/gomp/target-map-iterators-2.c: Don't expect warnings + about unused iterator variables. + * c-c++-common/gomp/target-update-iterators-2.c: Likewise. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-05-29 Tobias Burnus <[email protected]> + + PR c/122892 + * gfortran.dg/gomp/allocate-static-3.f90: Modify to also + disallow local static variables. + * c-c++-common/gomp/allocate-20.c: New test. + +2026-07-09 Sandra Loosemore <[email protected]> + + Backported from master: + 2026-05-28 Sandra Loosemore <[email protected]> + + * gfortran.dg/f_c_string3.f90: New. + * gfortran.dg/f_c_string4.f90: New. + * gfortran.dg/f_c_string5.f90: New. + +2026-07-09 Sandra Loosemore <[email protected]> + + Backported from master: + 2026-05-28 Sandra Loosemore <[email protected]> + Tobias Burnus <[email protected]> + + * gfortran.dg/c_f_strpointer-1.f90: New. + * gfortran.dg/c_f_strpointer-2.f90: New. + * gfortran.dg/c_f_strpointer-3.f90: New. + * gfortran.dg/c_f_strpointer-4.f90: New. + * gfortran.dg/c_f_strpointer-5.f90: New. + * gfortran.dg/c_f_strpointer-6.f90: New. + * gfortran.dg/c_f_strpointer-7.f90: New. + * gfortran.dg/c_f_strpointer-8.f90: New. + * gfortran.dg/c_f_strpointer-9.f90: New. + * gfortran.dg/c_f_strpointer-10.f90: New. + * gfortran.dg/pr108961.f90: Rename locally-defined c_f_strpointer. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-05-25 Tobias Burnus <[email protected]> + + PR c/125377 + * c-c++-common/gomp/begin-declare-variant-1.c: New test. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-05-19 Paul-Antoine Arras <[email protected]> + Chung-Lin Tang <[email protected]> + Sandra Loosemore <[email protected]> + + * c-c++-common/gomp/clauses-2.c: Adjust testcase. + * c-c++-common/gomp/map-6.c: Adjust testcase. + * gfortran.dg/gomp/pr107214.f90: Adjust testcase. + * c-c++-common/gomp/map-multi-1.c: New test. + * c-c++-common/gomp/map-multi-2.c: New test. + * gfortran.dg/gomp/map-multi-1.f90: New test. + * gfortran.dg/gomp/map-multi-2.f90: New test. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-05-14 Tobias Burnus <[email protected]> + + * c-c++-common/gomp/declare-mapper-10.c: Exclude C++98. + * c-c++-common/gomp/declare-mapper-15.c: Likewise. + * c-c++-common/gomp/declare-mapper-16.c: Likewise. + * c-c++-common/gomp/declare-mapper-3.c: Likewise. + * c-c++-common/gomp/declare-mapper-4.c: Likewise. + * c-c++-common/gomp/declare-mapper-5.c: Likewise. + * c-c++-common/gomp/declare-mapper-6.c: Likewise. + * c-c++-common/gomp/declare-mapper-7.c: Likewise. + * c-c++-common/gomp/declare-mapper-8.c: Likewise. + * c-c++-common/gomp/declare-mapper-9.c: Likewise. + * g++.dg/gomp/declare-mapper-1.C: Likewise. + * g++.dg/gomp/declare-mapper-2.C: Likewise. + * c-c++-common/gomp/pr122866.c: Expect sorry with C++98. + * c-c++-common/gomp/declare-mapper-11.c: Likewise. + Add dg-error for missing var-in-map-clause use. + * g++.dg/gomp/declare-mapper-3.C: Likewise. + * c-c++-common/gomp/declare-mapper-17.c: New test. + * c-c++-common/gomp/declare-mapper-18.c: New test. + * g++.dg/gomp/declare-mapper-4.C: New test. + * g++.dg/gomp/declare-mapper-5.C: New test. + +2026-07-09 Julian Brown <[email protected]> + + Backported from master: + 2026-04-29 Julian Brown <[email protected]> + + * c-c++-common/gomp/declare-mapper-15.c: New test. + * c-c++-common/gomp/declare-mapper-16.c: New test. + * g++.dg/gomp/declare-mapper-1.C: Adjust expected scan output. \ No newline at end of file diff --git a/include/ChangeLog.omp b/include/ChangeLog.omp new file mode 100644 index 000000000000..d7c4ee61c55e --- /dev/null +++ b/include/ChangeLog.omp @@ -0,0 +1,80 @@ +2026-07-09 Julian Brown <[email protected]> + + * gomp-constants.h (gomp_map_kind): Add GOMP_MAP_TO_GRID, + GOMP_MAP_FROM_GRID, GOMP_MAP_GRID_DIM, GOMP_MAP_GRID_STRIDE map kinds. + +2026-07-09 Julian Brown <[email protected]> + Thomas Schwinge <[email protected]> + Sandra Loosemore <[email protected]> + + * gomp-constants.h (GOMP_MAP_NONCONTIG_ARRAY_P): Tweak condition. + +2026-07-09 Cesar Philippidis <[email protected]> + Julian Brown <[email protected]> + Kwok Cheung Yeung <[email protected]> + Tobias Burnus <[email protected]> + Thomas Schwinge <[email protected]> + Paul-Antoine Arras <[email protected]> + + * gomp-constants.h (enum gomp_map_kind): Define + GOMP_MAP_DECLARE_{ALLOCATE,DEALLOCATE} and GOMP_MAP_FLAG_SPECIAL_4. + +2026-07-09 Chung-Lin Tang <[email protected]> + Kwok Cheung Yeung <[email protected]> + Thomas Schwinge <[email protected]> + Paul-Antoine Arras <[email protected]> + Sandra Loosemore <[email protected]> + + PR other/76739 + * gomp-constants.h (GOMP_MAP_FLAG_SPECIAL_3): Define. + (enum gomp_map_kind): Add GOMP_MAP_NONCONTIG_ARRAY, + GOMP_MAP_NONCONTIG_ARRAY_TO, GOMP_MAP_NONCONTIG_ARRAY_FROM, + GOMP_MAP_NONCONTIG_ARRAY_TOFROM, GOMP_MAP_NONCONTIG_ARRAY_FORCE_TO, + GOMP_MAP_NONCONTIG_ARRAY_FORCE_FROM, + GOMP_MAP_NONCONTIG_ARRAY_FORCE_TOFROM, + GOMP_MAP_NONCONTIG_ARRAY_ALLOC, GOMP_MAP_NONCONTIG_ARRAY_FORCE_ALLOC, + GOMP_MAP_NONCONTIG_ARRAY_FORCE_PRESENT. + (GOMP_MAP_NONCONTIG_ARRAY_P): Define. + +2026-07-09 Chung-Lin Tang <[email protected]> + + Backported from master: + 2026-06-30 Chung-Lin Tang <[email protected]> + + * gomp-constants.h (enum gomp_map_kind): Add GOMP_MAP_USES_ALLOCATORS. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-24 Paul-Antoine Arras <[email protected]> + + * gomp-constants.h (GOMP_BARRIER_IMPLICIT_PARALLEL): New macro. + (GOMP_BARRIER_IMPLICIT_WORKSHARE): New macro. + (GOMP_BARRIER_EXPLICIT): New macro. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-06-19 Tobias Burnus <[email protected]> + + PR libgomp/125877 + * cuda/cuda.h (cuDeviceGetPCIBusId): Declare. + +2026-07-09 Arsen Arsenović <[email protected]> + + Backported from master: + 2026-06-01 Arsen Arsenović <[email protected]> + + * gomp-constants.h (GOMP_VERSION): Bump. Signature of + GOMP_OFFLOAD_run et al changed. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-05-29 Tobias Burnus <[email protected]> + + PR c/122892 + * gomp-constants.h (GOMP_OMP_PREDEF_ALLOC_THREADS): Rename to ... + (GOMP_OMP_PREDEF_ALLOC_THREAD): ... this. + (GOMP_OMP_PREDEF_ALLOC_CGROUP, GOMP_OMP_PREDEF_ALLOC_PTEAM): Define + with the value of omp_{cgroup,pteam}_mem_alloc \ No newline at end of file diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp new file mode 100644 index 000000000000..7ad9f18ff158 --- /dev/null +++ b/libgomp/ChangeLog.omp @@ -0,0 +1,1224 @@ +2026-07-09 Kwok Cheung Yeung <[email protected]> + Andrew Stubbs <[email protected]> + + * testsuite/libgomp.fortran/mapper-iterators-1.f90: New test. + * testsuite/libgomp.fortran/mapper-iterators-2.f90: New test. + * testsuite/libgomp.fortran/mapper-iterators-3.f90: New test. + * testsuite/libgomp.fortran/mapper-iterators-4.f90: New test. + +2026-07-09 Chung-Lin Tang <[email protected]> + Sandra Loosemore <[email protected]> + + * acc_prof.h (_ACC_PROF_INFO_VERSION): Adjust to 201811. + * libgomp.texi (Enabling OpenACC): Adjust version + references to 2.7 from 2.6. + * openacc.f90 (module openacc): Adjust openacc_version to 201811. + * openacc_lib.h (openacc_version): Adjust openacc_version to 201811. + * testsuite/libgomp.oacc-c-c++-common/acc_prof-version-1.c: + Adjust test value to 201811. + * testsuite/libgomp.oacc-fortran/openacc_version-1.f: Adjust + test value to 201811. + * testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Likewise. + +2026-07-09 Chung-Lin Tang <[email protected]> + + * testsuite/libgomp.oacc-c-c++-common/reduction-arrays-2.c: Adjust test. + * testsuite/libgomp.oacc-c-c++-common/reduction-arrays-3.c: Likewise. + * testsuite/libgomp.oacc-c-c++-common/reduction-arrays-4.c: Likewise. + * testsuite/libgomp.oacc-c-c++-common/reduction-arrays-5.c: Likewise. + +2026-07-09 Chung-Lin Tang <[email protected]> + + * testsuite/libgomp.oacc-c-c++-common/reduction.h + (check_reduction_array_xx): New macro. + (operator_apply): Likewise. + (check_reduction_array_op): Likewise. + (check_reduction_arraysec_op): Likewise. + (function_apply): Likewise. + (check_reduction_array_macro): Likewise. + (check_reduction_arraysec_macro): Likewise. + (check_reduction_xxx_xx_all): Likewise. + * testsuite/libgomp.oacc-c-c++-common/reduction-arrays-1.c: New test. + * testsuite/libgomp.oacc-c-c++-common/reduction-arrays-2.c: New test. + * testsuite/libgomp.oacc-c-c++-common/reduction-arrays-3.c: New test. + * testsuite/libgomp.oacc-c-c++-common/reduction-arrays-4.c: New test. + * testsuite/libgomp.oacc-c-c++-common/reduction-arrays-5.c: New test. + * testsuite/libgomp.oacc-c-c++-common/reduction-structs-1.c: New test. + * testsuite/libgomp.oacc-fortran/reduction-10.f90: New test. + * testsuite/libgomp.oacc-fortran/reduction-11.f90: New test. + * testsuite/libgomp.oacc-fortran/reduction-12.f90: New test. + * testsuite/libgomp.oacc-fortran/reduction-13.f90: New test. + * testsuite/libgomp.oacc-fortran/reduction-14.f90: New test. + * testsuite/libgomp.oacc-fortran/reduction-15.f90: New test. + * testsuite/libgomp.oacc-fortran/reduction-16.f90: New test. + +2026-07-09 Julian Brown <[email protected]> + Andrew Stubbs <[email protected]> + Kwok Cheung Yeung <[email protected]> + Sandra Loosemore <[email protected]> + + * testsuite/libgomp.fortran/declare-mapper-25.f90: New test. + * testsuite/libgomp.fortran/declare-mapper-28.f90: New test. + +2026-07-09 Julian Brown <[email protected]> + + * testsuite/libgomp.fortran/declare-mapper-30.f90: New test. + * testsuite/libgomp.fortran/declare-mapper-4.f90: Adjust test for new + lookup behaviour. + +2026-07-09 Julian Brown <[email protected]> + + * testsuite/libgomp.fortran/declare-mapper-2.f90: New test. + * testsuite/libgomp.fortran/declare-mapper-3.f90: New test. + * testsuite/libgomp.fortran/declare-mapper-4.f90: New test. + * testsuite/libgomp.fortran/declare-mapper-6.f90: New test. + * testsuite/libgomp.fortran/declare-mapper-7.f90: New test. + * testsuite/libgomp.fortran/declare-mapper-8.f90: New test. + * testsuite/libgomp.fortran/declare-mapper-9.f90: New test. + * testsuite/libgomp.fortran/declare-mapper-10.f90: New test. + * testsuite/libgomp.fortran/declare-mapper-11.f90: New test. + * testsuite/libgomp.fortran/declare-mapper-12.f90: New test. + * testsuite/libgomp.fortran/declare-mapper-13.f90: New test. + * testsuite/libgomp.fortran/declare-mapper-15.f90: New test. + * testsuite/libgomp.fortran/declare-mapper-17.f90: New test. + * testsuite/libgomp.fortran/declare-mapper-18.f90: New test. + * testsuite/libgomp.fortran/declare-mapper-19.f90: New test. + * testsuite/libgomp.fortran/declare-mapper-20.f90: New test. + * testsuite/libgomp.fortran/declare-mapper-21.f90: New test. + +2026-07-09 Sandra Loosemore <[email protected]> + Tobias Burnus <[email protected]> + + * libgomp.texi: Mark need_device_addr as supported. + * testsuite/libgomp.c++/need-device-ptr.C: New. + * testsuite/libgomp.c-c++-common/dispatch-3.c: New. + * testsuite/libgomp.fortran/adjust-args-array-descriptor.f90: New. + * testsuite/libgomp.fortran/need-device-ptr.f90: New. + +2026-07-09 waffl3x <[email protected]> + Sandra Loosemore <[email protected]> + + PR c++/119659 + PR c++/118859 + PR c++/119601 + PR c++/119602 + PR c++/119775 + * libgomp.texi: Set 'adjust args' variadic arguments support to Y. + +2026-07-09 Waffl3x <[email protected]> + + * testsuite/libgomp.c-c++-common/allocate-7.c: Disable for C++. + +2026-07-09 Waffl3x <[email protected]> + + * testsuite/libgomp.c/allocate-4.c: Move to... + * testsuite/libgomp.c-c++-common/allocate-4.c: ...here. + * testsuite/libgomp.c/allocate-5.c: Move to... + * testsuite/libgomp.c-c++-common/allocate-5.c: ...here. + * testsuite/libgomp.c/allocate-6.c: Move to... + * testsuite/libgomp.c-c++-common/allocate-6.c: ...here. + * testsuite/libgomp.c/allocate-7.c: Move to... + * testsuite/libgomp.c-c++-common/allocate-7.c: ...here. + * testsuite/libgomp.c++/allocate-2.C: New test. + * testsuite/libgomp.c-c++-common/uses_allocators-1.c: Remove sorry. + +2026-07-09 Waffl3x <[email protected]> + + * testsuite/libgomp.c/allocate-7.c: _Alignof to alignof. + +2026-07-09 Julian Brown <[email protected]> + + * target.c (omp_target_memcpy_rect_worker): Add 1D strided transfer + support. + +2026-07-09 Andrew Stubbs <[email protected]> + + * config/gcn/target.c (GOMP_target_ext): Add "signal" field. + Fix atomics race condition. + * config/nvptx/libgomp-nvptx.h (REV_OFFLOAD_QUEUE_SIZE): New define. + (struct rev_offload): Implement ring buffer. + * config/nvptx/target.c (GOMP_target_ext): Likewise. + * env.c (initialize_env): Read GOMP_REVERSE_OFFLOAD_THREADS. + * libgomp-plugin.c (GOMP_PLUGIN_target_rev): Replace "aq" parameter + with "signal" and "use_aq". + * libgomp-plugin.h (GOMP_PLUGIN_target_rev): Likewise. + * libgomp.h (gomp_target_rev): Likewise. + * plugin/plugin-gcn.c (process_reverse_offload): Add "signal". + (console_output): Pass signal value through. + * plugin/plugin-nvptx.c (GOMP_OFFLOAD_openacc_async_construct): + Attach new threads to the numbered device. + Change the flag to CU_STREAM_NON_BLOCKING. + (GOMP_OFFLOAD_run): Implement ring-buffer and remove signalling. + * target.c (gomp_target_rev): Rename to ... + (gomp_target_rev_internal): ... this, and change "dev_num" to + "devicep". + (gomp_target_rev_worker_thread): New function. + (gomp_target_rev): New function (old name). + * libgomp.texi: Document GOMP_REVERSE_OFFLOAD_THREADS. + * testsuite/libgomp.c/reverse-offload-threads-1.c: New test. + * testsuite/libgomp.c/reverse-offload-threads-2.c: New test. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + * target.c (omp_target_memcpy_rect_worker): Require unit strides + and matching element size. + +2026-07-09 Julian Brown <[email protected]> + Sandra Loosemore <[email protected]> + + * libgomp.h (omp_noncontig_array_desc): Add span field. + * target.c (omp_target_memcpy_rect_worker): Add span parameter. Update + forward declaration. Handle span != element_size. + (gomp_update): Handle bias in descriptor's size slot. Update calls to + omp_target_memcpy_rect_worker. + * testsuite/libgomp.fortran/noncontig-updates-1.f90: New test. + * testsuite/libgomp.fortran/noncontig-updates-2.f90: New test. + * testsuite/libgomp.fortran/noncontig-updates-3.f90: New test. + * testsuite/libgomp.fortran/noncontig-updates-4.f90: New test. + * testsuite/libgomp.fortran/noncontig-updates-5.f90: New test. + * testsuite/libgomp.fortran/noncontig-updates-6.f90: New test. + * testsuite/libgomp.fortran/noncontig-updates-7.f90: New test. + * testsuite/libgomp.fortran/noncontig-updates-8.f90: New test. + * testsuite/libgomp.fortran/noncontig-updates-9.f90: New test. + * testsuite/libgomp.fortran/noncontig-updates-10.f90: New test. + * testsuite/libgomp.fortran/noncontig-updates-11.f90: New test. + * testsuite/libgomp.fortran/noncontig-updates-12.f90: New test. + * testsuite/libgomp.fortran/noncontig-updates-13.f90: New test. + +2026-07-09 Julian Brown <[email protected]> + + * testsuite/libgomp.c-c++-common/array-shaping-14.c: New test. + * testsuite/libgomp.c/array-shaping-1.c: New test. + * testsuite/libgomp.c/array-shaping-2.c: New test. + * testsuite/libgomp.c/array-shaping-3.c: New test. + * testsuite/libgomp.c/array-shaping-4.c: New test. + * testsuite/libgomp.c/array-shaping-5.c: New test. + * testsuite/libgomp.c/array-shaping-6.c: New test. + +2026-07-09 Thomas Schwinge <[email protected]> + Sandra Loosemore <[email protected]> + + * testsuite/libgomp.c++/target-flex-300.C: XFAIL. + * testsuite/libgomp.c++/target-flex-60.C: Likewise. + * testsuite/libgomp.c++/target-flex-61.C: Likewise. + * testsuite/libgomp.c++/target-flex-62.C: Likewise. + * testsuite/libgomp.c++/target-flex-81.C: Likewise. + +2026-07-09 Julian Brown <[email protected]> + + * libgomp.h (omp_noncontig_array_desc): New struct. + * target.c (omp_target_memcpy_rect_worker): Add stride array + parameter. Forward declare. Add STRIDES parameter and strided + update support. + (gomp_update): Add noncontiguous (strided/shaped) update support. + * testsuite/libgomp.c++/array-shaping-1.C: New test. + * testsuite/libgomp.c++/array-shaping-2.C: New test. + * testsuite/libgomp.c++/array-shaping-3.C: New test. + * testsuite/libgomp.c++/array-shaping-4.C: New test. + * testsuite/libgomp.c++/array-shaping-5.C: New test. + * testsuite/libgomp.c++/array-shaping-6.C: New test. + * testsuite/libgomp.c++/array-shaping-7.C: New test. + * testsuite/libgomp.c++/array-shaping-8.C: New test. + * testsuite/libgomp.c++/array-shaping-9.C: New test. + * testsuite/libgomp.c++/array-shaping-10.C: New test. + * testsuite/libgomp.c++/array-shaping-11.C: New test. + * testsuite/libgomp.c++/array-shaping-12.C: New test. + * testsuite/libgomp.c++/array-shaping-13.C: New test. + * testsuite/libgomp.c++/map-static-cast-lvalue-1.C: New test. + +2026-07-09 Julian Brown <[email protected]> + Thomas Schwinge <[email protected]> + Sandra Loosemore <[email protected]> + + * testsuite/libgomp.oacc-c-c++-common/implicit-mapping-1.c: New test. + +2026-07-09 Julian Brown <[email protected]> + + * testsuite/libgomp.oacc-fortran/nonlexical-assumed-size-1.f90: New + test. + * testsuite/libgomp.oacc-fortran/nonlexical-assumed-size-2.f90: New + test. + +2026-07-09 Julian Brown <[email protected]> + Paul-Antoine Arras <[email protected]> + Sandra Loosemore <[email protected]> + + * testsuite/libgomp.oacc-fortran/declare-allocatable-1-directive.f90: + Remove xfails. + * testsuite/libgomp.oacc-fortran/declare-allocatable-1-runtime.f90: + Remove xfails. + * testsuite/libgomp.oacc-fortran/declare-allocatable-1.f90: + Remove xfails. + * testsuite/libgomp.oacc-fortran/declare-create-1.f90: New test. + * testsuite/libgomp.oacc-fortran/declare-create-2.f90: New test. + * testsuite/libgomp.oacc-fortran/declare-create-3.f90: New test. + +2026-07-09 Julian Brown <[email protected]> + Sandra Loosemore <[email protected]> + + * testsuite/libgomp.oacc-c-c++-common/pr70828.c: New test. + * testsuite/libgomp.oacc-c-c++-common/pr70828-2.c: Likewise. + * testsuite/libgomp.oacc-fortran/declare-1.f90: Adjust patterns. + * testsuite/libgomp.oacc-fortran/pr70828.f90: New test. + * testsuite/libgomp.oacc-fortran/pr70828-2.f90: Likewise. + * testsuite/libgomp.oacc-fortran/pr70828-3.f90: Likewise. + * testsuite/libgomp.oacc-fortran/pr70828-4.f90: Likewise. + * testsuite/libgomp.oacc-fortran/pr70828-5.f90: Likewise. + * testsuite/libgomp.oacc-fortran/pr70828-6.f90: Likewise. + +2026-07-09 Chung-Lin Tang <[email protected]> + + * config/nvptx/team.c (__nvptx_omp_num_threads): New global variable in + shared memory. + * testsuite/libgomp.c-c++-common/for-17.c: New. + * testsuite/libgomp.c-c++-common/for-18.c: New. + +2026-07-09 Thomas Schwinge <[email protected]> + + * target.c (gomp_unmap_vars_internal): Queue splay-tree keys for + removal after main loop. + +2026-07-09 Tobias Burnus <[email protected]> + + * testsuite/libgomp.fortran/target-enter-data-3a.f90: New test. + +2026-07-09 Tobias Burnus <[email protected]> + + * testsuite/libgomp.fortran/target-13.f90: Update test. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + * testsuite/libgomp.c-c++-common/collapse-4.c: New. + * testsuite/libgomp.fortran/collapse5.f90: New. + +2026-07-09 Andrew Stubbs <[email protected]> + Sandra Loosemore <[email protected]> + + * config/gcn/bar.h (gomp_barrier_init): Limit thread count to the + actual physical number. Return count, not void. + (gomp_barrier_reinit): Likewise. + * config/gcn/team.c (gomp_team_start): Don't attempt to set up + threads that do not exist. + * config/linux/bar.h (gomp_barrier_init): Return count, not void. + (gomp_barrier_reinit): Likewise. + * config/nvptx/bar.h (gomp_barrier_init): Likewise. + (gomp_barrier_reinit): Likewise. + * config/posix/bar.c (gomp_barrier_init): Likewise. + (gomp_barrier_reinit): Likewise. + * config/posix/bar.h: (gomp_barrier_init): Likewise. + (gomp_barrier_reinit): Likewise. + * config/posix/simple-bar.h: (gomp_barrier_init): Likewise. + (gomp_barrier_reinit): Likewise. + * config/rtems/bar.h: (gomp_barrier_init): Likewise. + (gomp_barrier_reinit): Likewise. + * team.c (gomp_new_team): Set nthreads to actual rather than + requested number of threads. + * testsuite/libgomp.c/thread-limit-6.c: New test case. + +2026-07-09 Andrew Stubbs <[email protected]> + + * plugin/plugin-nvptx.c (cleanup_and_alloc): Remove early call to + nvptx_stacks_free. + +2026-07-09 Julian Brown <[email protected]> + + * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: Adjust for loop + lowering changes. + * testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c: Likewise. + * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Likewise. + * testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c: Likewise. + * testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c: Likewise. + * testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c: Likewise. + +2026-07-09 Cesar Philippidis <[email protected]> + Julian Brown <[email protected]> + Kwok Cheung Yeung <[email protected]> + Tobias Burnus <[email protected]> + Thomas Schwinge <[email protected]> + Paul-Antoine Arras <[email protected]> + + * libgomp.h (gomp_acc_declare_allocate): Remove prototype. + * oacc-mem.c (gomp_acc_declare_allocate): New function. + (find_group_last): Handle GOMP_MAP_DECLARE_ALLOCATE and + GOMP_MAP_DECLARE_DEALLOCATE groupings. + (goacc_enter_data_internal): Fix kind check for + GOMP_MAP_DECLARE_ALLOCATE. Pass new pointer argument to + gomp_acc_declare_allocate. Unlock mutex before calling + gomp_acc_declare_allocate and relock it afterwards. + (goacc_exit_data_internal): Unlock device mutex around + gomp_acc_declare_allocate call. Pass new pointer argument. Handle + group pointer mapping for deallocate. + * testsuite/libgomp.oacc-fortran/allocatable-scalar.f90: New test. + * testsuite/libgomp.oacc-fortran/declare-allocatable-1-directive.f90: + Adjust. + * testsuite/libgomp.oacc-fortran/declare-allocatable-1-runtime.f90: + Likewise. + * testsuite/libgomp.oacc-fortran/declare-allocatable-1.f90: + Likewise. + * testsuite/libgomp.oacc-fortran/declare-allocatable-2.f90: New test. + * testsuite/libgomp.oacc-fortran/declare-allocatable-3.f90: New test. + * testsuite/libgomp.oacc-fortran/declare-allocatable-4.f90: New test. + * testsuite/libgomp.oacc-fortran/declare-allocatable-array_descriptor-1-directive.f90: + Adjust. + * testsuite/libgomp.oacc-fortran/declare-allocatable-array_descriptor-1-runtime.f90: + Likewise. + * testsuite/libgomp.oacc-fortran/declare-allocatable-array_descriptor-1.f90: + New test. + +2026-07-09 Julian Brown <[email protected]> + Tobias Burnus <[email protected]> + Sandra Loosemore <[email protected]> + + * testsuite/libgomp.oacc-c++/privatized-ref-3.C: Add xfails. + * testsuite/libgomp.oacc-fortran/optional-private.f90: Likewise. + * testsuite/libgomp.oacc-fortran/privatized-ref-1.f95: Likewise. + +2026-07-09 Cesar Philippidis <[email protected]> + Julian Brown <[email protected]> + Sandra Loosemore <[email protected]> + + * testsuite/libgomp.oacc-fortran/optional-reduction.f90: Remove + xfail on bogus warnings. + * testsuite/libgomp.oacc-fortran/parallel-reduction.f90: Likewise. + * testsuite/libgomp.oacc-fortran/pr70643.f90: Likewise. + * testsuite/libgomp.oacc-fortran/reduction-5.f90: Likewise. + * testsuite/libgomp.oacc-fortran/reduction-7.f90: Likewise. + * testsuite/libgomp.oacc-fortran/reference-reductions.f90: Likewise. + +2026-07-09 Thomas Schwinge <[email protected]> + Maciej W. Rozycki <[email protected]> + + * Makefile.am (libgomp_la_SOURCES): Add + oacc-profiling-acc_register_library.c. + * Makefile.in: Regenerate. + * libgomp.texi: Remove paragraph about acc_register_library. + * oacc-init.c (get_property_any): Add profiling code. + * oacc-parallel.c (GOACC_parallel_keyed_internal): Set device_api for + profiling. + * oacc-profiling-acc_register_library.c: New file. + * oacc-profiling.c (goacc_profiling_initialize): Call + acc_register_library. Avoid duplicate registration. + (acc_register_library): Remove. + * config/nvptx/oacc-profiling-acc_register_library.c: + New empty file. + * config/nvptx/oacc-profiling.c: Likewise. + * testsuite/libgomp.oacc-c-c++-common/acc_prof-dispatch-1.c: Remove + call to acc_register_library. + * testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c: Likewise. + * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c: Likewise. + * testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c: Likewise. + * testsuite/libgomp.oacc-c-c++-common/acc_prof-valid_bytes-1.c: + Likewise. + * testsuite/libgomp.oacc-c-c++-common/acc_prof-version-1.c: Likewise. + +2026-07-09 Cesar Philippidis <[email protected]> + Chung-Lin Tang <[email protected]> + + * testsuite/libgomp.oacc-c-c++-common/privatize-reduction-1.c: New + test. + * testsuite/libgomp.oacc-c-c++-common/privatize-reduction-2.c: New + test. + +2026-07-09 Cesar Philippidis <[email protected]> + + * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Adjust test case + to conform to the new behavior of the auto clause in OpenACC 2.5. + +2026-07-09 Cesar Philippidis <[email protected]> + Julian Brown <[email protected]> + Tobias Burnus <[email protected]> + Kwok Cheung Yeung <[email protected]> + + * testsuite/libgomp.oacc-c++/firstprivate-int.C: New test. + * testsuite/libgomp.oacc-c-c++-common/firstprivate-int.c: New + test. + * testsuite/libgomp.oacc-c-c++-common/data-firstprivate-1.c: XFAIL + execution test. + * testsuite/libgomp.oacc-fortran/firstprivate-int.f90: New test. + +2026-07-09 Nathan Sidwell <[email protected]> + Tom de Vries <[email protected]> + Thomas Schwinge <[email protected]> + Julian Brown <[email protected]> + + * testsuite/libgomp.oacc-c-c++-common/loop-default-compile.c: New. + +2026-07-09 Cesar Philippidis <[email protected]> + James Norris <[email protected]> + Tom de Vries <[email protected]> + Julian Brown <[email protected]> + Tobias Burnus <[email protected]> + + * testsuite/libgomp.oacc-fortran/data-3.f90: Update parallel + regions to denote variables copyied in via acc enter data as + present. + * testsuite/libgomp.oacc-c-c++-common/subr.h: Reimplement. + * testsuite/libgomp.oacc-c-c++-common/subr.ptx: Regenerated PTX. + * testsuite/libgomp.oacc-c-c++-common/timer.h: Removed. + * testsuite/libgomp.oacc-c-c++-common/lib-69.c: Change async checks. + * testsuite/libgomp.oacc-c-c++-common/lib-70.c: Likewise. + * testsuite/libgomp.oacc-c-c++-common/lib-72.c: Rework kernel i/f and + change async checks. + * testsuite/libgomp.oacc-c-c++-common/lib-73.c: Likewise. + * testsuite/libgomp.oacc-c-c++-common/lib-74.c: Rework kernel i/f and + timing checks. + * testsuite/libgomp.oacc-c-c++-common/lib-75.c: Likewise. + * testsuite/libgomp.oacc-c-c++-common/lib-76.c: Likewise. + * testsuite/libgomp.oacc-c-c++-common/lib-78.c: Likewise. + * testsuite/libgomp.oacc-c-c++-common/lib-79.c: Likewise. + * testsuite/libgomp.oacc-c-c++-common/lib-81.c: Likewise. + * testsuite/libgomp.oacc-c-c++-common/lib-82.c: Likewise. + * testsuite/libgomp.oacc-c-c++-common/lib-93.c: New test. + +2026-07-09 Julian Brown <[email protected]> + Cesar Philippidis <[email protected]> + Nathan Sidwell <[email protected]> + + * testsuite/libgomp.oacc-c-c++-common/par-reduction-3.c: New. + * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt-2.c: New. + * testsuite/libgomp.oacc-fortran/reduction-9.f90: New. + +2026-07-09 Cesar Philippidis <[email protected]> + James Norris <[email protected]> + Julian Brown <[email protected]> + Tobias Burnus <[email protected]> + Thomas Schwinge <[email protected]> + + * oacc-parallel.c (GOACC_parallel_keyed): Handle Fortran deviceptr + clause. + (GOACC_data_start): Likewise. + * testsuite/libgomp.oacc-fortran/deviceptr-1.f90: New test. + +2026-07-09 Chung-Lin Tang <[email protected]> + Kwok Cheung Yeung <[email protected]> + Thomas Schwinge <[email protected]> + Paul-Antoine Arras <[email protected]> + Sandra Loosemore <[email protected]> + + PR other/76739 + * libgomp.h (goacc_map_vars): Add 'struct goacc_ncarray_info *' + formal parameter. + * libgomp_g.h (GOACC_data_start): Add variadic '...' to declaration. + * oacc-int.h (struct goacc_ncarray_dim): New struct declaration. + (struct goacc_ncarray_descr_type): Likewise. + (struct goacc_ncarray): Likewise. + (struct goacc_ncarray_info): Likewise. + (goacc_noncontig_array_create_ptrblock): New function declaration. + * oacc-mem.c (acc_map_data, goacc_enter_datum) + (goacc_enter_data_internal): Adjust. + * oacc-parallel.c (goacc_noncontig_array_count_rows): New function. + (goacc_noncontig_array_compute_sizes): Likewise. + (goacc_noncontig_array_fill_rows_1): Likewise. + (goacc_noncontig_array_fill_rows): Likewise. + (goacc_process_noncontiguous_arrays): Likewise. + (goacc_noncontig_array_create_ptrblock): Likewise. + (GOACC_parallel_keyed): Use goacc_process_noncontiguous_arrays to + handle non-contiguous array descriptors at end of varargs, adjust + to use gomp_map_vars_openacc. + (GOACC_data_start): Likewise. Adjust function type to accept varargs. + * target.c (gomp_map_vars_internal): Add struct goacc_ncarray_info * + nca_info parameter, add handling code for non-contiguous arrays. + (goacc_map_vars): Adjust. + * testsuite/libgomp.oacc-c-c++-common/noncontig_array-1.c: New test. + * testsuite/libgomp.oacc-c-c++-common/noncontig_array-2.c: New test. + * testsuite/libgomp.oacc-c-c++-common/noncontig_array-3.c: New test. + * testsuite/libgomp.oacc-c-c++-common/noncontig_array-4.c: New test. + * testsuite/libgomp.oacc-c-c++-common/noncontig_array-utils.h: Support + header for new tests. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + * testsuite/libgomp.fortran/allocatable-comp-iterators.f90: Add test + for non-const iterator boundaries. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + Sandra Loosemore <[email protected]> + + * testsuite/libgomp.fortran/allocatable-comp-iterators.f90: New. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + Andrew Stubbs <[email protected]> + + * testsuite/libgomp.c-c++-common/mapper-iterators-1.c: New test. + * testsuite/libgomp.c-c++-common/mapper-iterators-2.c: New test. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + Sandra Loosemore <[email protected]> + + * testsuite/libgomp.c-c++-common/target-map-iterators-1c.c: New. + * testsuite/libgomp.c-c++-common/target-map-iterators-1d.c: New. + * testsuite/libgomp.c-c++-common/target-map-iterators-1e.c: New. + * testsuite/libgomp.c-c++-common/target-map-iterators-1f.c: New. + * testsuite/libgomp.c-c++-common/target-map-iterators-4.c: New. + * testsuite/libgomp.c-c++-common/target-map-iterators-5.c: New. + * testsuite/libgomp.c-c++-common/target-update-iterators-4.c: New. + * testsuite/libgomp.fortran/target-map-iterators-1c.f90: New. + * testsuite/libgomp.fortran/target-map-iterators-4.f90: New. + * testsuite/libgomp.fortran/target-map-iterators-5.f90: New. + * testsuite/libgomp.fortran/target-update-iterators-4.f90: New. + +2026-07-09 Thomas Schwinge <[email protected]> + + Backported from master: + 2026-07-02 Thomas Schwinge <[email protected]> + + * config/nvptx/allocator.c [PTX < 4.1]: Fix build. + * config/nvptx/team.c [PTX < 4.1]: Disable the whole + '__nvptx_lowlat_pool' machinery. + +2026-07-09 Thomas Schwinge <[email protected]> + + Backported from master: + 2026-06-30 Thomas Schwinge <[email protected]> + + * config.h.in: Regenerate. + * configure.ac [x$libgomp_cv_have_sync_builtins = xno]: Fix check. + * configure: Regenerate. + * allocator.c (omp_init_allocator, gomp_map_omp_init_allocator) + [!HAVE_SYNC_BUILTINS]: Fix build. + * testsuite/libgomp.c-c++-common/uses_allocators-2.c: Fix for C++ testing. + * testsuite/libgomp.c-c++-common/uses_allocators-9.c: Likewise. + * testsuite/libgomp.fortran/dep-uses-allocators.f90: Remove + obsolete "sorry, unimplemented: [...]" diagnostic check. + * testsuite/libgomp.fortran/uses_allocators-7.f90: XFAIL one + 'scan-tree-dump-times' check. + +2026-07-09 Chung-Lin Tang <[email protected]> + + Backported from master: + 2026-06-30 Chung-Lin Tang <[email protected]> + + * allocator.c (struct omp_allocator_data): Always enable 'memkind' field + for configurations with offloading. Adjust comments assuming + HAVE_SYNC_BUILTINS for all offload host/accelerators. + (gomp_init_allocator_data): New function, created from omp_init_allocator + logic. + (omp_init_allocator): Adjust to use gomp_init_allocator_data. + (gomp_map_omp_init_allocator): New function to call + gomp_init_allocator_data for uses_allocators clauses. + * config/gcn/allocator.c (gcn_memspace_validate): Add comments. + * config/nvptx/allocator.c (nvptx_memspace_alloc): Add PTX >= v4.1 + preprocessor symbol check. + (nvptx_memspace_calloc): Likewise. + (nvptx_memspace_free): Likewise. + (nvptx_memspace_realloc): Likewise. + (nvptx_memspace_validate): Add comments. + * configure.ac: Require offload hosts and accelerator targets to support + __sync_* builtins. + * configure: Regenerate. + * libgomp-plugin.h (GOMP_OFFLOAD_memspace_validate): New declaration. + * libgomp.h (gomp_omp_allocator_data_size): New declaration. + (memspace_validate_func): New plugin hook in struct gomp_device_descr. + (gomp_map_omp_init_allocator): New declaration. + * oacc-host.c (host_dispatch): Init .memspace_validate_func = NULL. + * plugin/plugin-gcn.c (GOMP_OFFLOAD_memspace_validate): New function. + * plugin/plugin-nvptx.c (GOMP_OFFLOAD_memspace_validate): New function. + * target.c (gomp_map_vars_internal): Implement GOMP_MAP_USES_ALLOCATORS + map kind. + (calculate_firstprivate_requirements): Likewise. + (copy_firstprivate_data): Likewise. + (gomp_load_plugin_for_device): Add DLSYM_OPT of memspace_validate_func + hook. + * testsuite/libgomp.c++/uses_allocators-1.C: Moved from + ../gcc/testsuite/g++.dg/gomp/uses_allocators-1.C. + * testsuite/libgomp.c-c++-common/uses_allocators-1.c: Moved from + ../gcc/testsuite/c-c++-common/gomp/uses_allocators-1.c. + * testsuite/libgomp.c-c++-common/uses_allocators-2.c: Moved from + ../gcc/testsuite/c-c++-common/gomp/uses_allocators-2.c. + * testsuite/libgomp.c-c++-common/uses_allocators-4.c: Moved from + ../gcc/testsuite/c-c++-common/gomp/uses_allocators-4.c. + * testsuite/libgomp.c-c++-common/uses_allocators-7.c: Moved from + ../gcc/testsuite/c-c++-common/gomp/uses_allocators-7.c. + * testsuite/libgomp.c-c++-common/uses_allocators-8.c: Moved from + ../gcc/testsuite/c-c++-common/gomp/uses_allocators-8.c. + * testsuite/libgomp.c-c++-common/uses_allocators-3.c: New test. + * testsuite/libgomp.c-c++-common/uses_allocators-5.c: New test. + * testsuite/libgomp.c-c++-common/uses_allocators-6.c: New test. + * testsuite/libgomp.c-c++-common/uses_allocators-9.c: New test. + * testsuite/libgomp.fortran/uses_allocators-1.f90: New test. + * testsuite/libgomp.fortran/uses_allocators-2.f90: + Rename from uses_allocators_1.f90. + * testsuite/libgomp.fortran/uses_allocators-3.f90: + Rename from uses_allocators_2.f90. + * testsuite/libgomp.fortran/uses_allocators-4.f90: New test. + * testsuite/libgomp.fortran/uses_allocators-5.f90: New test. + * testsuite/libgomp.fortran/uses_allocators-6.f90: New test. + * testsuite/libgomp.fortran/uses_allocators-7.f90: Adjust test. + * testsuite/libgomp.fortran/uses_allocators-8.f90: New test. + * testsuite/libgomp.fortran/uses_allocators_1.f90: + Renamed to uses_allocators-2.f90 and deleted. + * testsuite/libgomp.fortran/uses_allocators_2.f90: + Renamed to uses_allocators-3.f90 and deleted. + * testsuite/libgomp.c++/c++.exp (check_effective_target_c): Add. + (check_effective_target_c++): Add. + * testsuite/libgomp.c/c.exp (check_effective_target_c): Add. + (check_effective_target_c++): Add. + +2026-07-09 Thomas Schwinge <[email protected]> + + Backported from master: + 2026-06-30 Thomas Schwinge <[email protected]> + + PR libgomp/125877 + * config/linux/numa.c (gomp_get_numa_distance): Gracefully handle + failure to open Linux sysfs file for NUMA node. + +2026-07-09 Thomas Schwinge <[email protected]> + + Backported from master: + 2026-06-30 Thomas Schwinge <[email protected]> + + PR libgomp/125877 + * plugin/plugin-nvptx.c (nvptx_open_device): Initialize 'numa_node'. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-25 Paul-Antoine Arras <[email protected]> + + * libgomp.texi (Implementing MASKED and MASTER construct): Fix + @end smallexample. + (Implementing FOR construct): Likewise. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-25 Paul-Antoine Arras <[email protected]> + + * libgomp.texi (Implementing MASKED and MASTER construct): Update + pseudocode; describe GOMP_has_masked_thread_num. + (Implementing ATOMIC construct): Fix stale function names; note + exclusivity to explicit atomic constructs. + (Implementing BARRIER construct): Document GOMP_barrier_ext and + GOMP_barrier_cancel_ext; describe the kind parameter. + (Implementing REDUCTION clause): Document GOMP_reduction_start and + GOMP_reduction_end. + (Implementing FOR construct): Document GOMP_loop_static_worksharing + and GOMP_distribute_static_worksharing. + +2026-07-09 Thomas Schwinge <[email protected]> + + Backported from master: + 2026-06-25 Thomas Schwinge <[email protected]> + + * libgomp_g.h (GOMP_reduction_start, GOMP_reduction_end): Sort + correctly. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-24 Paul-Antoine Arras <[email protected]> + + * atomic.c (GOMP_reduction_start): New function. + (GOMP_reduction_end): New function. + * libgomp.map (GOMP_6.0.2): Export GOMP_reduction_start and + GOMP_reduction_end. + * libgomp_g.h (GOMP_reduction_start): New declaration. + (GOMP_reduction_end): New declaration. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-24 Paul-Antoine Arras <[email protected]> + + * barrier.c (GOMP_barrier_ext): New function. + (GOMP_barrier_cancel_ext): Likewise. + * libgomp_g.h (GOMP_barrier_ext): Declare. + (GOMP_barrier_cancel_ext): Likewise. + * libgomp.map (GOMP_6.0.2): Add GOMP_barrier_ext and + GOMP_barrier_cancel_ext. + * testsuite/libgomp.c/barrier-1.c: Update GOMP_barrier_ext calls to pass + GOMP_BARRIER_EXPLICIT. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-24 Paul-Antoine Arras <[email protected]> + + * config/gcn/teams.c (GOMP_distribute_static_worksharing): New + function. + * config/nvptx/teams.c (GOMP_distribute_static_worksharing): Likewise. + * libgomp.map (GOMP_6.0.2): Export GOMP_loop_static_worksharing and + GOMP_distribute_static_worksharing. + * libgomp_g.h (GOMP_loop_static_worksharing): New declaration. + (GOMP_distribute_static_worksharing): Likewise. + * parallel.c (GOMP_loop_static_worksharing): New function. + * teams.c (GOMP_distribute_static_worksharing): Likewise. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-06-24 Paul-Antoine Arras <[email protected]> + + * libgomp.map (GOMP_6.0.2): New symbol version. Export + GOMP_has_masked_thread_num. + * libgomp_g.h (GOMP_has_masked_thread_num): New declaration. + * parallel.c (GOMP_has_masked_thread_num): New function. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-06-24 Tobias Burnus <[email protected]> + + PR libgomp/125940 + * Makefile.am (libgomp_la_SOURCES): Add numa.c. + * Makefile.in: Regenerate. + * affinity.c (gomp_get_current_numa_node, + gomp_get_numa_distance): Move to ... + * numa.c: ... this new file. + * config/linux/affinity.c (gomp_get_current_numa_node, + gomp_get_numa_distance): Move to ... + * config/linux/numa.c: ... this new file. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-06-24 Tobias Burnus <[email protected]> + + PR libgomp/125951 + * target.c (omp_get_device_distances): Handle omp_default_device + in the fallback code. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-06-09 Tobias Burnus <[email protected]> + + * libgomp.texi (GCN): Mention ROCR_VISIBLE_DEVICES. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-06-22 Tobias Burnus <[email protected]> + + * config/gcn/teams.c (omp_get_num_teams_dim, + omp_get_team_num_dim): New functions. + * config/nvptx/teams.c (omp_get_num_teams_dim, + omp_get_team_num_dim): Likewise. + * fortran.c (omp_get_supported_active_team_dims_, + omp_get_supported_active_league_dims_): Likewise. + * icv.c (omp_get_thread_limit_dim): Likewise. + * libgomp-plugin.h (GOMP_OFFLOAD_get_numa_node): Remove spurious + const of 'const int' function return type. + (GOMP_OFFLOAD_supported_teams_dim, + GOMP_OFFLOAD_supported_threads_dim): Declare. + * libgomp.h (struct gomp_device_descr): Add supported_teams_dim_func + and supported_threads_dim_func members. + * libgomp.map (OMP_6.1): Add new OpenMP routines. + * libgomp.texi (Multidimensional Support Routines): Add new section. + (omp_get_device_distances): Fix chapter of spec reference. + * omp.h.in (omp_get_num_threads_dim, omp_get_thread_num_dim, + omp_get_thread_limit_dim, omp_get_supported_active_team_dims, + omp_get_supported_active_league_dims, omp_get_supported_teams_dim, + omp_get_supported_threads_dim, omp_get_num_teams_dim, + omp_get_team_num_dim, omp_get_device_distances): Declare. + * omp_lib.f90.in: Likewise. + * omp_lib.h.in: Likewise. + * parallel.c (omp_get_num_threads_dim, + omp_get_thread_num_dim): New functions. + * plugin/plugin-gcn.c (limit_worker_threads): Add comment. + (GOMP_OFFLOAD_supported_teams_dim, + GOMP_OFFLOAD_supported_threads_dim): New functions. + * plugin/plugin-nvptx.c (GOMP_OFFLOAD_supported_teams_dim, + GOMP_OFFLOAD_supported_threads_dim): New functions. + (nvptx_adjust_launch_bounds): Add comment. + * target.c (omp_get_supported_active_team_dims, + omp_get_supported_active_league_dims, + omp_get_supported_teams_dim, + omp_get_supported_threads_dim): New functions. + (gomp_load_plugin_for_device): dlsym added functions. + * teams.c (omp_get_num_teams_dim, + omp_get_team_num_dim): New functions. + * testsuite/libgomp.c/multi-dim-routines.c: New test. + * testsuite/libgomp.fortran/multi-dim-routines-2.F90: New test. + * testsuite/libgomp.fortran/multi-dim-routines.F90: New test. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-06-19 Tobias Burnus <[email protected]> + + PR libgomp/125877 + * affinity.c (gomp_get_current_numa_node, + gomp_get_numa_distance): New functions. + * config/linux/affinity.c (gomp_get_current_numa_node, + gomp_get_numa_distance): Likewise. + * libgomp-plugin.h (GOMP_OFFLOAD_get_numa_node): Declare. + * libgomp.h (gomp_get_current_numa_node, + gomp_get_numa_distance): Declare. + (struct gomp_device_descr): Add get_numa_node_func. + * libgomp.map (OMP_6.1): Add. + * libgomp.texi (omp_get_device_distances): Add routine. + * omp.h.in (omp_get_device_distances): Declare. + * omp_lib.f90.in (omp_get_device_distances): Add interface. + * omp_lib.h.in (omp_get_device_distances): Likewise. + * plugin/cuda-lib.def (cuDeviceGetPCIBusId): Add. + * plugin/plugin-gcn.c (struct agent_info): Add numa_node. + (GOMP_OFFLOAD_get_numa_node): New. + * plugin/plugin-nvptx.c (struct ptx_device): Add numa_node. + (GOMP_OFFLOAD_get_numa_node): New. + * target.c (omp_get_device_distances): New function. + (gomp_load_plugin_for_device): Load get_numa_node symbol. + * testsuite/libgomp.c/omp-get-device-distances.c: New test. + * testsuite/libgomp.fortran/omp-get-device-distances.f90: New test. + +2026-07-09 Thomas Schwinge <[email protected]> + + Backported from master: + 2026-06-18 Thomas Schwinge <[email protected]> + + * config/accel/target-indirect.h (GOMP_INDIRECT_ADDR_MAP) + (GOMP_INDIRECT_ADDR_HMAP): Prototype. + * config/gcn/team.c: Adjust. + * config/nvptx/team.c: Likewise. + +2026-07-09 Thomas Schwinge <[email protected]> + + Backported from master: + 2026-06-18 Thomas Schwinge <[email protected]> + + * config/accel/target-indirect.h: New. + * config/accel/target-indirect.c: Adjust. + * config/gcn/team.c: Likewise. + * config/nvptx/team.c: Likewise. + +2026-07-09 Thomas Schwinge <[email protected]> + + Backported from master: + 2026-06-18 Thomas Schwinge <[email protected]> + + * target-indirect.c: '#include "libgomp.h"'. + +2026-07-09 Thomas Schwinge <[email protected]> + + Backported from master: + 2026-06-18 Thomas Schwinge <[email protected]> + + * libgomp_g.h (GOMP_target_map_indirect_ptr): Sort correctly. + +2026-07-09 Thomas Schwinge <[email protected]> + + Backported from master: + 2026-06-18 Thomas Schwinge <[email protected]> + + * libgomp_g.h (GOMP_atomic_start, GOMP_atomic_end): Sort correctly. + +2026-07-09 Thomas Schwinge <[email protected]> + + Backported from master: + 2026-06-18 Thomas Schwinge <[email protected]> + + * oacc-init.c (acc_init, acc_shutdown, acc_get_num_devices) + (acc_set_device_type, acc_get_device_type, acc_get_device_num) + (acc_set_device_num, acc_get_property, acc_get_property_string) + (acc_on_device): Drop 'ialias'es. + +2026-07-09 Thomas Schwinge <[email protected]> + + Backported from master: + 2026-06-18 Thomas Schwinge <[email protected]> + + * config/nvptx/oacc-parallel.c: Move... + * config/accel/oacc-parallel.c: ... here. + +2026-07-09 Thomas Schwinge <[email protected]> + + Backported from master: + 2026-06-12 Thomas Schwinge <[email protected]> + + * config/linux/allocator.c: De-duplicate '#define _GNU_SOURCE'. + +2026-07-09 Thomas Schwinge <[email protected]> + + Backported from master: + 2026-06-12 Thomas Schwinge <[email protected]> + + * plugin/plugin-gcn.c: '#define _GNU_SOURCE'. + * plugin/Makefrag.am (libgomp_plugin_gcn_la_CPPFLAGS): Don't add + '-D_GNU_SOURCE'. + * Makefile.in: Regenerate. + +2026-07-09 Thomas Schwinge <[email protected]> + + Backported from master: + 2026-06-12 Thomas Schwinge <[email protected]> + + PR target/101484 + * configure.tgt [GCN] (XCFLAGS): Don't add '-Wno-error=array-bounds'. + +2026-07-09 Chung-Lin Tang <[email protected]> + + Backported from master: + 2026-06-10 Chung-Lin Tang <[email protected]> + + PR fortran/122910 + * testsuite/libgomp.fortran/pr122910.f90: New test. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + Backported from master: + 2026-06-07 Kwok Cheung Yeung <[email protected]> + Andrew Stubbs <[email protected]> + Sandra Loosemore <[email protected]> + + * testsuite/libgomp.fortran/target-update-iterators-1.f90: New. + * testsuite/libgomp.fortran/target-update-iterators-2.f90: New. + * testsuite/libgomp.fortran/target-update-iterators-3.f90: New. + +2026-07-09 Kwok Cheung Yeung <[email protected]> + + Backported from master: + 2026-06-07 Kwok Cheung Yeung <[email protected]> + Andrew Stubbs <[email protected]> + Sandra Loosemore <[email protected]> + + * target.c (kind_to_name): Handle GOMP_MAP_STRUCT and + GOMP_MAP_STRUCT_UNORD. + (gomp_add_map): New. + (gomp_merge_iterator_maps): Expand fields of a struct mapping + breadth-first. + * testsuite/libgomp.fortran/target-map-iterators-1.f90: New. + * testsuite/libgomp.fortran/target-map-iterators-2.f90: New. + * testsuite/libgomp.fortran/target-map-iterators-3.f90: New. + +2026-07-09 Rainer Orth <[email protected]> + + Backported from master: + 2026-06-02 Rainer Orth <[email protected]> + + * oacc-parallel.c (GOACC_parallel_keyed): Use gomp_alloca instead + of alloca. + * target.c (GOMP_target): Likewise. + (GOMP_target_ext): Likewise. + +2026-07-09 Arsen Arsenović <[email protected]> + + Backported from master: + 2026-06-01 Arsen Arsenović <[email protected]> + + * oacc-mem.c (goacc_enter_datum): Assert that tgt_offset of the + newly-mapped variable is zero. + +2026-07-09 Arsen Arsenović <[email protected]> + + Backported from master: + 2026-06-01 Arsen Arsenović <[email protected]> + + * plugin/plugin-gcn.c (struct kernel_dispatch): Store + hsa_signal_t, rather than a uint64_t, so that we don't rely on + knowledge of the contents of hsa_signal_t. + (create_kernel_dispatch): Rename... + (prepare_kernel_dispatch): ... to this, as it no longer creates + a kernel dispatch. The allocation that would've created it is + hoisted... + (run_kernel): ... here, as an automatic variable. Move logic + that copies the fields of kernel_dispatch... + (populate_packet_from_dispatch): ... into this standalone + function, to make it clearer. + (release_kernel_dispatch): Rename.... + (cleanup_kernel_dispatch): ... to this, don't free 'shadow'. + +2026-07-09 Arsen Arsenović <[email protected]> + + Backported from master: + 2026-06-01 Arsen Arsenović <[email protected]> + + * libgomp-plugin.h (GOMP_OFFLOAD_run, GOMP_OFFLOAD_exec) + (GOMP_OFFLOAD_async_run, GOMP_OFFLOAD_openacc_async_exec): Pass + session in place of target variable table and devices. + (struct gomp_offload_session): New. + (GOMP_OFFLOAD_session_size): New + (GOMP_OFFLOAD_check_session_struct): New. + (GOMP_OFFLOAD_session_boilerplate): New. + (GOMP_OFFLOAD_session_start): New. + (GOMP_OFFLOAD_session_allocate_target_var_table): New. + (GOMP_OFFLOAD_session_set_target_var_table): New. + * libgomp.h (struct gomp_target_task): Add offload_session + field. + (struct gomp_device_descr): Add offload session management + functions. + (gomp_offload_session_new): New. + (goacc_map_vars): Add SESSION to signature + * oacc-host.c (struct gomp_offload_session): Define, for host + offload fallback case. + (host_session_size): New. Implements GOMP_OFFLOAD_session_size. + (host_session_start): New. Implements + GOMP_OFFLOAD_session_start. + (host_session_set_target_var_table): New. Implements + GOMP_OFFLOAD_session_set_target_var_table. + (host_run): Adjust to match GOMP_OFFLOAD_run. + (host_openacc_exec): Adjust to match GOMP_OFFLOAD_openacc_exec. + (host_openacc_async_exec): Adjust to match + GOMP_OFFLOAD_openacc_async_exec. + * oacc-mem.c (acc_map_data): Adjust call to goacc_map_vars. + (goacc_enter_datum): Ditto. + (goacc_enter_data_internal): Ditto. + * oacc-parallel.c (GOACC_parallel_keyed): Allocate and pass + offload session. + (GOACC_data_start): Adjust call to goacc_map_vars. + * plugin/plugin-gcn.c (struct kernel_dispatch): Remove + kernarg_cache_node. + (struct kernargs): Add a flexible array member for the target + variable table. + (struct kernel_launch): Store an offload session rather than + target var. table pointer. + (print_kernel_dispatch): Receive kernargs as parameter. + (struct gomp_offload_session): Define. + (init_session): New. + (GOMP_OFFLOAD_session_start): Implement, using init_session. + (release_session): New. + (alloc_kernargs_on_agent): Rename to... + (allocate_session_kernargs): ... this, store result in + passed-in SESSION, and allocate extra room for target variable + table (rounding it up to nearest multiple of 64 pointers). + (GOMP_OFFLOAD_session_allocate_target_var_table): Implement + using the previous function. + (GOMP_OFFLOAD_session_set_target_var_table): Ditto. + (create_kernel_dispatch): Remove kernarg allocation, instead + receiving it as an argument. + (release_kernel_dispatch): Receive kernargs as an argument, + don't release them. + (run_kernel): Adjust to use sessions. + (destroy_module): Ditto. + (GOMP_OFFLOAD_load_image): Ditto. + (execute_queue_entry): Adjust to match changed struct + kernel_launch. + (queue_push_launch): Ditto. + (gcn_exec): Receive and pass along session. + (GOMP_OFFLOAD_run): Ditto. + (GOMP_OFFLOAD_async_run): Ditto. + (GOMP_OFFLOAD_openacc_exec): Ditto. + (GOMP_OFFLOAD_openacc_async_exec): Ditto. + * plugin/plugin-nvptx.c (struct gomp_offload_session): Define. + (GOMP_OFFLOAD_session_start): Implement. + (GOMP_OFFLOAD_session_set_target_var_table): Implement. + (GOMP_OFFLOAD_openacc_exec): Adjust to receive session. + (GOMP_OFFLOAD_openacc_async_exec): Ditto. + (GOMP_OFFLOAD_run): Ditto. + * target.c (gomp_get_tvt_size): Extract helper from... + (gomp_map_vars_internal): ... here. Receive SESSION, iff doing + target offload. Use a target variable table on the host + allocated by GOMP_OFFLOAD_session_allocate_target_var_table if + possible, or call GOMP_OFFLOAD_session_set_target_var_table with + an allocated device pointer otherwise. + (gomp_map_vars): Update to pass along session. + (goacc_map_vars): Ditto. + (GOMP_target): Allocate and pass along session. + (GOMP_target_ext): Ditto. + (gomp_target_data_fallback): Adjust call to gomp_map_vars. + (GOMP_target_data): Ditto. + (GOMP_target_data_ext): Ditto. + (GOMP_target_enter_exit_data): Ditto. + (gomp_target_task_fn): Start and pass along session, the storage + for which is allocated by gomp_create_target_task. + (DLSYM2): Rename from DLSYM, adding a new parameter for the + variable to populate, akin to DLSYM_OPT. + (DLSYM): Delegate to DLSYM2. + (gomp_load_plugin_for_device): Populate session-related fields. + * task.c (gomp_create_target_task): Allocate enough storage for + an offload session. + * testsuite/libgomp.c-c++-common/gcn-kernel-launch-no-tvt-alloc.c: New test. + * testsuite/libgomp.c-c++-common/gcn-kernel-launch-tvt-alloc.c: New test. + +2026-07-09 Arsen Arsenović <[email protected]> + + Backported from master: + 2026-06-01 Arsen Arsenović <[email protected]> + + * libgomp.h (struct gomp_thread_start_data): New struct. Holds + thread-independent parameters needed to initialize current + thread. + (struct gomp_team): On GCN, add thr_start_data field, that holds + a gomp_thread_start_data to be used in each thread. + (struct gomp_thread): Add start_data field, that points to + thread initialization parameters. + * config/gcn/team.c (gomp_team_start): Move thread + initialization steps into ... + (gomp_prep_our_thread): this new function, such that it reads + from a gomp_thread_start_data object. + (gomp_thread_start): Call the above to initialize our thread. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-05-29 Tobias Burnus <[email protected]> + + PR c/122892 + * allocator.c (_Static_assert): Add asserts for the values of + GOMP_OMP_PREDEF_ALLOC_CGROUP and GOMP_OMP_PREDEF_ALLOC_PTEAM. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-05-27 Tobias Burnus <[email protected]> + + * libgomp.texi (Foreign-runtime support for AMD GPUs, + Foreign-runtime support for Nvdia GPUs): Fix vendor + value to match compiler not GPU vendor. + * plugin/plugin-gcn.c (GOMP_OFFLOAD_get_interop_int, + GOMP_OFFLOAD_get_interop_str): Return 5/"gnu" as ipr_vendor. + * plugin/plugin-nvptx.c (GOMP_OFFLOAD_get_interop_int, + GOMP_OFFLOAD_get_interop_str): Likewise. + * testsuite/libgomp.c/append-args-fr.h: Updated expected + value. + * testsuite/libgomp.c/interop-cuda-full.c: Likewise. + * testsuite/libgomp.c/interop-fr-1.c: Likewise. + * testsuite/libgomp.c/interop-hip.h: Likewise. + * testsuite/libgomp.fortran/interop-hip.h: Likewise. + +2026-07-09 Paul-Antoine Arras <[email protected]> + + Backported from master: + 2026-05-19 Paul-Antoine Arras <[email protected]> + Chung-Lin Tang <[email protected]> + Sandra Loosemore <[email protected]> + + * testsuite/libgomp.c++/target-map-multi-1.C: New test. + * testsuite/libgomp.c-c++-common/target-map-iterators-6.c: New test. + * testsuite/libgomp.c-c++-common/target-map-multi-1.c: New test. + * testsuite/libgomp.c-c++-common/target-map-multi-2.c: New test. + * testsuite/libgomp.c-c++-common/target-map-multi-3.c: New test. + * testsuite/libgomp.c-c++-common/target-map-multi-4.c: New test. + * testsuite/libgomp.fortran/target-map-multi-1.f90: New test. + * testsuite/libgomp.fortran/target-map-multi-2.f90: New test. + * testsuite/libgomp.fortran/target-map-multi-3.f90: New test. + * testsuite/libgomp.fortran/target-map-multi-4.f90: New test. + * testsuite/libgomp.fortran/target-map-multi-5.f90: New test. + +2026-07-09 H.J. Lu <[email protected]> + + Backported from master: + 2026-05-13 H.J. Lu <[email protected]> + + * libgomp.texi: the Add missing closing brace. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-05-13 Tobias Burnus <[email protected]> + + * env.c (omp_control_tool): Stub implementation for omp_control_tool. + * fortran.c (omp_control_tool_, omp_control_tool_8_): Add. + * libgomp.map (OMP_6.0): Add for omp_control_tool*. + * libgomp.texi (Tool Control Routine): Add for omp_control_tool. + (OpenMP 6.0): Mark omp_pause_stop_tool as implemented. + * omp.h.in (omp_pause_resource_t): Add omp_pause_stop_tool. + (omp_control_tool_result_t): Add. + (omp_control_tool_t): Add. + * omp_lib.f90.in (omp_lib_kinds): Add omp_pause_stop_tool and + omp_control_tool/omp_control_tool_result parameters. + (omp_lib): Add omp_control_tool interface. + * omp_lib.h.in: Add omp_pause_stop_tool and + omp_control_tool/omp_control_tool_result parameters; add + omp_control_tool interface. + * testsuite/libgomp.c/omp-control-tools-1.c: New test. + * testsuite/libgomp.fortran/omp-control-tools-1.f: New test. + * testsuite/libgomp.fortran/omp-control-tools-1.f90: New test. + +2026-07-09 Tobias Burnus <[email protected]> + + Backported from master: + 2026-04-28 Tobias Burnus <[email protected]> + + * testsuite/libgomp.fortran/map-subarray-6.f90: Fix, extend, and + robustify. \ No newline at end of file