summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c/pr24455.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp/testsuite/libgomp.c/pr24455.c')
-rw-r--r--libgomp/testsuite/libgomp.c/pr24455.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c/pr24455.c b/libgomp/testsuite/libgomp.c/pr24455.c
new file mode 100644
index 000000000..8af449e7b
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/pr24455.c
@@ -0,0 +1,23 @@
+/* { dg-do run } */
+/* { dg-additional-sources pr24455-1.c } */
+/* { dg-require-effective-target tls_runtime } */
+
+extern void abort (void);
+
+extern int i;
+#pragma omp threadprivate(i)
+
+int main()
+{
+ i = 0;
+
+#pragma omp parallel default(none) num_threads(10)
+ {
+ i++;
+#pragma omp barrier
+ if (i != 1)
+ abort ();
+ }
+
+ return 0;
+}