diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/common_2.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/common_2.f90 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/common_2.f90 b/gcc/testsuite/gfortran.dg/common_2.f90 new file mode 100644 index 000000000..661e58205 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/common_2.f90 @@ -0,0 +1,15 @@ +! { dg-do run } +! The equivalence was causing us to miss out c when laying out the common +! block. +program common_2 + common /block/ a, b, c, d + integer a, b, c, d, n + dimension n(4) + equivalence (a, n(1)) + equivalence (c, n(3)) + a = 1 + b = 2 + c = 3 + d = 4 + if (any (n .ne. (/1, 2, 3, 4/))) call abort +end program |