view gcc/testsuite/gfortran.dg/dependency_2.f90 @ 131:84e7813d76e9

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

! { dg-do run }
! Tests the fix for PR20938 in which dependencies between equivalenced 
! arrays were not detected.
! 
real, dimension (3) :: a = (/1., 2., 3./), b, c
equivalence (a(2), b), (a(1), c)
b = a;
if (any(b .ne. (/1., 2., 3./))) STOP 1
b = c
if (any(b .ne. (/1., 1., 2./))) STOP 2
end