2018-03-25 Thomas Koenig <tkoenig@gcc.gnu.org>
[official-gcc.git] / libgomp / testsuite / libgomp.fortran / associate3.f90
blobda788a467ea9737336d056d52e1c0546e030e75c
1 ! PR fortran/71717
2 ! { dg-do run }
4 type t
5 real, allocatable :: f(:)
6 end type
7 type (t) :: v
8 integer :: i, j
9 allocate (v%f(4))
10 v%f = 19.
11 i = 5
12 associate (u => v, k => i)
13 !$omp parallel do
14 do j = 1, 4
15 u%f(j) = 21.
16 if (j.eq.1) k = 7
17 end do
18 end associate
19 if (any (v%f(:).ne.21.) .or. i.ne.7) STOP 1
20 end