aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.fortran/threadprivate1.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.fortran/threadprivate1.f90')
-rw-r--r--gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.fortran/threadprivate1.f9019
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.fortran/threadprivate1.f90 b/gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.fortran/threadprivate1.f90
new file mode 100644
index 000000000..99a201855
--- /dev/null
+++ b/gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.fortran/threadprivate1.f90
@@ -0,0 +1,19 @@
+! { dg-do run }
+! { dg-require-effective-target tls_runtime }
+
+module threadprivate1
+ double precision :: d
+!$omp threadprivate (d)
+end module threadprivate1
+
+!$ use omp_lib
+ use threadprivate1
+ logical :: l
+ l = .false.
+!$omp parallel num_threads (4) reduction (.or.:l)
+ d = omp_get_thread_num () + 6.5
+!$omp barrier
+ if (d .ne. omp_get_thread_num () + 6.5) l = .true.
+!$omp end parallel
+ if (l) call abort ()
+end