public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/36517]  New: Type-spec in array constructor ignored for PARAMETER
@ 2008-06-13  6:12 burnus at gcc dot gnu dot org
  2008-06-13  9:55 ` [Bug fortran/36517] Type-spec in array constructor: Invalid error for -std=f2003/f2008 burnus at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-06-13  6:12 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-06-18 13:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-13  6:12 [Bug fortran/36517] New: Type-spec in array constructor ignored for PARAMETER burnus at gcc dot gnu dot org
2008-06-13  9:55 ` [Bug fortran/36517] Type-spec in array constructor: Invalid error for -std=f2003/f2008 burnus at gcc dot gnu dot org
2008-06-13 13:30 ` burnus at gcc dot gnu dot org
2008-06-13 17:04 ` d at domob dot eu
2008-06-13 17:54 ` d at domob dot eu
2008-06-18 13:55 ` domob at gcc dot gnu dot org
2008-06-18 13:57 ` domob 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).