summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/dependency_2.f90
blob: 1cbdec795e1f919f5ea8bd45ed84b506d39896be (plain)
1
2
3
4
5
6
7
8
9
10
11
! { 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./))) call abort ()
b = c
if (any(b .ne. (/1., 1., 2./))) call abort ()
end