summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-10 15:22:50 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-10 15:22:50 +0000
commit9f49e155a2e12eb757591d304a04c7569cc6684e (patch)
treef4a082ece9e1b03e1028c0b236c631ddb2287f34 /gcc/testsuite/gcc.dg/gomp
parenta814d304342605e462a3fc46eac93808a8ef2db1 (diff)
downloadgcc-9f49e155a2e12eb757591d304a04c7569cc6684e.tar.gz
PR middle-end/36790
* omp-low.c (lower_omp_2): If task_shared_vars, test all DECL_P uids in the bitmap, not just VAR_DECL uids. * gcc.dg/gomp/pr36790.c: New test. * g++.dg/gomp/pr36790.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137695 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/gomp')
-rw-r--r--gcc/testsuite/gcc.dg/gomp/pr36790.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gomp/pr36790.c b/gcc/testsuite/gcc.dg/gomp/pr36790.c
new file mode 100644
index 00000000000..b3379f1564a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/pr36790.c
@@ -0,0 +1,23 @@
+/* PR middle-end/36790 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+void
+foo (char b)
+{
+}
+
+void
+bar (char b)
+{
+ foo (b);
+ #pragma omp task default (shared)
+ b = 0;
+}
+
+int
+main ()
+{
+ bar (0);
+ return 0;
+}