view libgomp/testsuite/libgomp.fortran/associate1.f90 @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
line wrap: on
line source

! { dg-do run }

program associate1
  integer :: v, i, j
  real :: a(3, 3)
  v = 15
  a = 4.5
  a(2,1) = 3.5
  i = 2
  j = 1
  associate(u => v, b => a(i, j))
!$omp parallel private(v, a) default(none)
  v = -1
  a = 2.5
  if (v /= -1 .or. u /= 15) STOP 1
  if (a(2,1) /= 2.5 .or. b /= 3.5) STOP 2
  associate(u => v, b => a(2, 1))
  if (u /= -1 .or. b /= 2.5) STOP 3
  end associate
  if (u /= 15 .or. b /= 3.5) STOP 4
!$omp end parallel
  end associate
end program