PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / common_14.f90
blob911d695e15bca156b43482e0e76a0c7a69b73d3f
1 ! { dg-do compile }
2 ! { dg-options "-Wno-align-commons" }
4 ! PR fortran/45044
6 ! Named common blocks need to be all of the same size
7 ! check that the compiler warns for those.
9 module m
10 common /xx/ a
11 end module m
13 subroutine two()
14 integer :: a, b, c
15 real(8) :: y
16 common /xx/ a, b, c, y ! { dg-warning "Named COMMON block 'xx' at \\(1\\) shall be of the same size as elsewhere \\(24 vs 4 bytes" }
17 end
20 subroutine one()
21 integer :: a, b
22 common /xx/ a, b ! { dg-warning "Named COMMON block 'xx' at \\(1\\) shall be of the same size as elsewhere \\(8 vs 24 bytes" }
23 end
25 call two()
26 end