1! { dg-do run } 2! { dg-require-effective-target tls_runtime } 3 4module threadprivate1 5 double precision :: d 6!$omp threadprivate (d) 7end module threadprivate1 8 9!$ use omp_lib 10 use threadprivate1 11 logical :: l 12 l = .false. 13!$omp parallel num_threads (4) reduction (.or.:l) 14 d = omp_get_thread_num () + 6.5 15!$omp barrier 16 if (d .ne. omp_get_thread_num () + 6.5) l = .true. 17!$omp end parallel 18 if (l) call abort () 19end 20