gcc/testsuite/gfortran.dg/common_2.f90
raw| 1 | ! { dg-do run } |
| 2 | ! The equivalence was causing us to miss out c when laying out the common |
| 3 | ! block. |
| 4 | program common_2 |
| 5 | common /block/ a, b, c, d |
| 6 | integer a, b, c, d, n |
| 7 | dimension n(4) |
| 8 | equivalence (a, n(1)) |
| 9 | equivalence (c, n(3)) |
| 10 | a = 1 |
| 11 | b = 2 |
| 12 | c = 3 |
| 13 | d = 4 |
| 14 | if (any (n .ne. (/1, 2, 3, 4/))) STOP 1 |
| 15 | end program |