diff options
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 93a2121..5d43f76 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -7798,7 +7798,13 @@ omp_check_private (struct gimplify_omp_ctx *ctx, tree decl, bool copyprivate) if ((ctx->region_type & (ORT_TARGET | ORT_TARGET_DATA)) != 0 && (n == NULL || (n->value & GOVD_DATA_SHARE_CLASS) == 0)) - continue; + { + if ((ctx->region_type & ORT_TARGET_DATA) != 0 + || n == NULL + || (n->value & GOVD_MAP) == 0) + continue; + return false; + } if (n != NULL) { @@ -7807,11 +7813,16 @@ omp_check_private (struct gimplify_omp_ctx *ctx, tree decl, bool copyprivate) return false; return (n->value & GOVD_SHARED) == 0; } + + if (ctx->region_type == ORT_WORKSHARE + || ctx->region_type == ORT_TASKGROUP + || ctx->region_type == ORT_SIMD + || ctx->region_type == ORT_ACC) + continue; + + break; } - while (ctx->region_type == ORT_WORKSHARE - || ctx->region_type == ORT_TASKGROUP - || ctx->region_type == ORT_SIMD - || ctx->region_type == ORT_ACC); + while (1); return false; } |