gcc/testsuite/gfortran.dg/equiv_9.f90
raw| 1 | ! { dg-do run } |
| 2 | ! PR fortran/66377 |
| 3 | ! |
| 4 | module constant |
| 5 | integer x1, x2, x3 |
| 6 | integer x(3) |
| 7 | equivalence (x(1),x1), (x2,x(2)), (x3,x(3)) |
| 8 | end module |
| 9 | |
| 10 | program test |
| 11 | use constant |
| 12 | implicit none |
| 13 | x = (/1, 2, 3/) |
| 14 | call another() |
| 15 | end program |
| 16 | |
| 17 | subroutine another() |
| 18 | use constant, only : x2 |
| 19 | implicit none |
| 20 | if (x2 /= 2) STOP 1 |
| 21 | end subroutine |