2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
[official-gcc.git] / libgomp / testsuite / libgomp.fortran / associate1.f90
blobe40995515d8e0c19ffea7bcaab5351dcc9d252c4
1 ! { dg-do run }
3 program associate1
4 integer :: v, i, j
5 real :: a(3, 3)
6 v = 15
7 a = 4.5
8 a(2,1) = 3.5
9 i = 2
10 j = 1
11 associate(u => v, b => a(i, j))
12 !$omp parallel private(v, a) default(none)
13 v = -1
14 a = 2.5
15 if (v /= -1 .or. u /= 15) call abort
16 if (a(2,1) /= 2.5 .or. b /= 3.5) call abort
17 associate(u => v, b => a(2, 1))
18 if (u /= -1 .or. b /= 2.5) call abort
19 end associate
20 if (u /= 15 .or. b /= 3.5) call abort
21 !$omp end parallel
22 end associate
23 end program