Debian Codegraph @

gcc/testsuite/gfortran.dg/common_14.f90

raw
1 ! { dg-do compile }
2 ! { dg-options "-Wno-align-commons" }
3 !
4 ! PR fortran/45044
5 !
6 ! Named common blocks need to be all of the same size
7 ! check that the compiler warns for those.
8
9 module m
10 common /xx/ a
11 end module m
12
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
18
19
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
24
25 call two()
26 end