1! PR fortran/81841
2! { dg-do run }
3
4block data
5  integer :: a
6  real :: b(2)
7  common /c/ a, b
8  !$omp threadprivate (/c/)
9  data a / 32 /
10  data b /2*1./
11end
12
13program pr81841
14  use omp_lib
15  integer :: e
16  real :: f(2)
17  common /c/ e, f
18  !$omp threadprivate (/c/)
19  !$omp parallel num_threads(8)
20  if ((e /= 32) .or. any(f /= 1.)) STOP 1
21  e = omp_get_thread_num ()
22  f = e + 19.
23  !$omp barrier
24  if ((e /= omp_get_thread_num ()) .or. any(f /= e + 19.)) STOP 2
25  !$omp end parallel
26end
27