summaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-12-08 11:36:01 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2008-12-08 11:36:01 +0100
commitd9c194cb9ef4c1a9263af6c28267104f4ce3628e (patch)
treeafeb602ff89a718fac03904e6d621cdacaf590a5 /gcc/omp-low.c
parent4e1e3eda6b83b091b227dad1c029d18ab6501f91 (diff)
downloadgcc-d9c194cb9ef4c1a9263af6c28267104f4ce3628e.tar.gz
re PR middle-end/36802 (pop_gimplify_context ICE using openmp task construct)
PR middle-end/36802 * omp-low.c (use_pointer_for_field): Only call maybe_lookup_decl on parallel and task contexts. * testsuite/libgomp.c/pr36802-1.c: New test. * testsuite/libgomp.c/pr36802-2.c: New test. * testsuite/libgomp.c/pr36802-3.c: New test. From-SVN: r142546
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 8781418bd82..b7885e6cf3c 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -760,10 +760,10 @@ use_pointer_for_field (tree decl, omp_context *shared_ctx)
omp_context *up;
for (up = shared_ctx->outer; up; up = up->outer)
- if (maybe_lookup_decl (decl, up))
+ if (is_taskreg_ctx (up) && maybe_lookup_decl (decl, up))
break;
- if (up && is_taskreg_ctx (up))
+ if (up)
{
tree c;