[Bug fortran/32986] New: Improve diagnostic message for COMMON with automatic object

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Aug 4 13:08:00 GMT 2007


The following is invalid, but the error message does not help much:

function a(n)
  real :: x(n)
  common /c/ x
end function

Error: Variable 'n' at (1) in this context must be constant

Sunf95:
  real :: x(n)
          ^
ERROR: "X" is a common-block-object, therefore it must not be declared as an
explicit-shape array with nonconstant bounds.

ifort:
fortcom: Error: aff.f90, line 2: A COMMON block data object must not be an
automatic object.   [X]


-- 
           Summary: Improve diagnostic message for COMMON with automatic
                    object
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: enhancement
          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=32986



More information about the Gcc-bugs mailing list