summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/pr42234.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/gomp/pr42234.C')
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr42234.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/gomp/pr42234.C b/gcc/testsuite/g++.dg/gomp/pr42234.C
new file mode 100644
index 000000000..9245b6c68
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr42234.C
@@ -0,0 +1,19 @@
+// PR c++/42234
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+extern int foo (void);
+
+void
+bar (int x)
+{
+ #pragma omp critical
+ {
+ int j;
+ for (j = 0; j < foo (); j++)
+ ;
+ if (0)
+ if (x >= 4)
+ ;
+ }
+}