[Bug fortran/45044] New: Different named COMMON block size: No warning
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Jul 23 14:39:00 GMT 2010
The following program is invalid Fortran as the common block size is different.
(This is only allowed for blank commons.) However, no diagnostics is printed.
If one reverses the order of TWO and ONE, a warning is printed. Actually, I
like the warning of g95, which prints the size.
NAG:
Error: Inconsistent definitions of COMMON block COM in program-units TWO and
ONE
g95:
Warning (121): COMMON block 'com' is 8 bytes at (1) and 12 bytes at (2)
gfortran with ONE and TWO swapped:
Warning: Named COMMON block 'com' at (1) shall be of the same size
subroutine two()
integer :: a, b, c
common /com/ a, b, c
end
subroutine one()
integer :: a, b
common /com/ a, b
end
--
Summary: Different named COMMON block size: No warning
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: accepts-invalid, diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45044
More information about the Gcc-bugs
mailing list