public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/45044]  New: Different named COMMON block size: No warning
@ 2010-07-23 14:39 burnus at gcc dot gnu dot org
  0 siblings, 0 replies; only message in thread
From: burnus at gcc dot gnu dot org @ 2010-07-23 14:39 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-07-23 14:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-23 14:39 [Bug fortran/45044] New: Different named COMMON block size: No warning burnus at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).