Handle non-contiguous target update in gimplify_scan_omp_clauses

OG14 fixup for mainline commit 144c531fe2
"OpenMP/OpenACC: Reorganise OMP map clause handling in gimplify.cc"
This commit is contained in:
Paul-Antoine Arras 2024-05-27 15:53:22 +02:00
parent 2f920adb53
commit 11263c048d
1 changed files with 10 additions and 1 deletions

View File

@ -12828,6 +12828,7 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
|| code == OMP_TARGET_DATA || code == OMP_TARGET_DATA
|| code == OMP_TARGET_ENTER_DATA || code == OMP_TARGET_ENTER_DATA
|| code == OMP_TARGET_EXIT_DATA || code == OMP_TARGET_EXIT_DATA
|| code == OMP_TARGET_UPDATE
|| code == OACC_DATA || code == OACC_DATA
|| code == OACC_KERNELS || code == OACC_KERNELS
|| code == OACC_PARALLEL || code == OACC_PARALLEL
@ -15086,7 +15087,15 @@ gimplify_adjust_omp_clauses (gimple_seq *pre_p, gimple_seq body, tree *list_p,
: TYPE_SIZE_UNIT (TREE_TYPE (decl)); : TYPE_SIZE_UNIT (TREE_TYPE (decl));
} }
gimplify_omp_ctxp = ctx->outer_context; gimplify_omp_ctxp = ctx->outer_context;
if (gimplify_expr (&OMP_CLAUSE_SIZE (c), pre_p, NULL, if (GOMP_MAP_NONCONTIG_ARRAY_P (OMP_CLAUSE_MAP_KIND (c)))
{
gcc_assert (OMP_CLAUSE_SIZE (c)
&& TREE_CODE (OMP_CLAUSE_SIZE (c)) == TREE_LIST);
/* For non-contiguous array maps, OMP_CLAUSE_SIZE is a TREE_LIST
of the individual array dimensions, which gimplify_expr doesn't
handle, so skip the call to gimplify_expr here. */
}
else if (gimplify_expr (&OMP_CLAUSE_SIZE (c), pre_p, NULL,
is_gimple_val, fb_rvalue) == GS_ERROR) is_gimple_val, fb_rvalue) == GS_ERROR)
{ {
gimplify_omp_ctxp = ctx; gimplify_omp_ctxp = ctx;