diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-06-01 16:24:02 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-06-01 16:24:02 +0200 |
commit | ab62397a1b51a925abf062999a96556241dc3478 (patch) | |
tree | 52005cd238123006b231cc7107a8b48143b7cd2f /gcc/gimplify.c | |
parent | b66af6ed30d4bfa930e7afa30d078d7e83af42a0 (diff) | |
download | gcc-ab62397a1b51a925abf062999a96556241dc3478.zip gcc-ab62397a1b51a925abf062999a96556241dc3478.tar.gz gcc-ab62397a1b51a925abf062999a96556241dc3478.tar.bz2 |
re PR middle-end/71371 (ICE with OpenMP taskloop and addressable iterator)
PR middle-end/71371
* gimplify.c (gimplify_omp_for): Temporarily clear gimplify_omp_ctxp
around creation of the temporary.
* c-c++-common/gomp/pr71371.c: New test.
From-SVN: r236994
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 131fa24..f12c6a1 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -9009,7 +9009,12 @@ gimplify_omp_for (tree *expr_p, gimple_seq *pre_p) || (ort == ORT_SIMD && TREE_VEC_LENGTH (OMP_FOR_INIT (for_stmt)) > 1)) { + struct gimplify_omp_ctx *ctx = gimplify_omp_ctxp; + /* Make sure omp_add_variable is not called on it prematurely. + We call it ourselves a few lines later. */ + gimplify_omp_ctxp = NULL; var = create_tmp_var (TREE_TYPE (decl), get_name (decl)); + gimplify_omp_ctxp = ctx; TREE_OPERAND (t, 0) = var; gimplify_seq_add_stmt (&for_body, gimple_build_assign (decl, var)); |