This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36517] New: Type-spec in array constructor ignored for PARAMETER
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jun 2008 06:12:08 -0000
- Subject: [Bug fortran/36517] New: Type-spec in array constructor ignored for PARAMETER
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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