blob: 911d695e15bca156b43482e0e76a0c7a69b73d3f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
! { dg-do compile }
! { dg-options "-Wno-align-commons" }
!
! PR fortran/45044
!
! Named common blocks need to be all of the same size
! check that the compiler warns for those.
module m
common /xx/ a
end module m
subroutine two()
integer :: a, b, c
real(8) :: y
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" }
end
subroutine one()
integer :: a, b
common /xx/ a, b ! { dg-warning "Named COMMON block 'xx' at \\(1\\) shall be of the same size as elsewhere \\(8 vs 24 bytes" }
end
call two()
end
|