summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/atomic_messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/OpenMP/atomic_messages.cpp')
-rw-r--r--clang/test/OpenMP/atomic_messages.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/OpenMP/atomic_messages.cpp b/clang/test/OpenMP/atomic_messages.cpp
new file mode 100644
index 00000000000..6eef8f227df
--- /dev/null
+++ b/clang/test/OpenMP/atomic_messages.cpp
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
+
+int foo() {
+ L1:
+ foo();
+ #pragma omp atomic
+ {
+ foo();
+ goto L1; // expected-error {{use of undeclared label 'L1'}}
+ }
+ goto L2; // expected-error {{use of undeclared label 'L2'}}
+ #pragma omp atomic
+ {
+ foo();
+ L2:
+ foo();
+ }
+
+ return 0;
+}
OpenPOWER on IntegriCloud