From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21280 invoked by alias); 13 Jun 2008 06:12:53 -0000 Received: (qmail 20681 invoked by uid 48); 13 Jun 2008 06:12:08 -0000 Date: Fri, 13 Jun 2008 06:12:00 -0000 Subject: [Bug fortran/36517] New: Type-spec in array constructor ignored for PARAMETER X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-06/txt/msg00804.txt.bz2 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