summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/sections-4.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/gomp/sections-4.c')
-rw-r--r--gcc/testsuite/gcc.dg/gomp/sections-4.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gomp/sections-4.c b/gcc/testsuite/gcc.dg/gomp/sections-4.c
new file mode 100644
index 00000000000..44e7de98c20
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/sections-4.c
@@ -0,0 +1,13 @@
+/* PR c++/24613 */
+/* { dg-compile } */
+
+#pragma omp section /* { dg-error "may only be used in" } */
+
+int i;
+
+void
+foo (void)
+{
+ #pragma omp section /* { dg-error "may only be used in" } */
+ i++;
+}