diff options
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index c621305..07ea2a7 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -2245,16 +2245,17 @@ gimplify_arg (tree *arg_p, gimple_seq *pre_p, location_t call_location) return gimplify_expr (arg_p, pre_p, NULL, test, fb); } -/* Don't fold inside offloading regions: it can break code by adding decl - references that weren't in the source. We'll do it during omplower pass - instead. */ +/* Don't fold inside offloading or taskreg regions: it can break code by + adding decl references that weren't in the source. We'll do it during + omplower pass instead. */ static bool maybe_fold_stmt (gimple_stmt_iterator *gsi) { struct gimplify_omp_ctx *ctx; for (ctx = gimplify_omp_ctxp; ctx; ctx = ctx->outer_context) - if (ctx->region_type == ORT_TARGET) + if (ctx->region_type == ORT_TARGET + || (ctx->region_type & (ORT_PARALLEL | ORT_TASK)) != 0) return false; return fold_stmt (gsi); } |