diff options
Diffstat (limited to 'libgomp/testsuite/libgomp.c++/pr24455.C')
-rw-r--r-- | libgomp/testsuite/libgomp.c++/pr24455.C | 23 |
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 0000000..ad43b47b --- /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 "C" void abort (void); + +extern int i; +#pragma omp threadprivate(i) + +int main() +{ + i = 0; + +#pragma omp parallel default(none) num_threads(10) copyin(i) + { + i++; +#pragma omp barrier + if (i != 1) + abort (); + } + + return 0; +} |