OSDN Git Service

2011-09-26 Janus Weil <janus@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / common_14.f90
1 ! { dg-do compile }
2 !
3 ! PR fortran/45044
4 !
5 ! Named common blocks need to be all of the same size
6 ! check that the compiler warns for those.
7
8 module m
9   common /xx/ a
10 end module m
11
12 subroutine two()
13 integer :: a, b, c
14 real(8) :: y
15 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" }
16 end
17
18
19 subroutine one()
20 integer :: a, b
21 common /xx/ a, b ! { dg-warning "Named COMMON block 'xx' at \\(1\\) shall be of the same size as elsewhere \\(8 vs 24 bytes" }
22 end
23
24 call two()
25 end
26
27 ! { dg-final { cleanup-modules "m" } }