Type spec support for constructors was implemented in PR27997, however, it is
not honored for the -std=f* checking for PARAMETERs.

The following program works with default options, however, using -std=f2003 one
gets the follow error message:

Error: The CHARACTER elements of the array constructor at (1) must have the
same length (1/3)

(To compile the first two lines, the patch of PR36476 is needed.)

CHARACTER (len=*) MY_STRING(1:3)
PARAMETER ( MY_STRING = (/CHARACTER (len=3) :: "AC" , "B", "C" /) )
character(len=*), parameter :: str(2) = [character(len=3):: 'A','cc']
end


-- 
           Summary: Type-spec in array constructor ignored for PARAMETER
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: 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=36517

Reply via email to