summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.3.c')
-rw-r--r--gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.3.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.3.c b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.3.c
new file mode 100644
index 00000000000..f99e09b36c5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.3.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+
+void work (int, int);
+
+void
+wrong3 (int n)
+{
+#pragma omp parallel default(shared)
+ {
+ int i;
+#pragma omp for
+ for (i = 0; i < n; i++)
+ {
+/* incorrect nesting of regions */
+#pragma omp single
+ work (i, 0);
+ }
+ }
+}