public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/32928]  New: DATA statement with array element as initializer is rejected
@ 2007-07-28 13:20 burnus at gcc dot gnu dot org
  2007-07-28 13:30 ` [Bug fortran/32928] " burnus at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-07-28 13:20 UTC (permalink / raw)
  To: gcc-bugs

Found while debugging PR32315.

program chkdata
    character(len=1), parameter,dimension(4) :: string = 'A'
    character :: a
    data a /string(4)/
end program chkdata

Is rejected:
    data a /string(4)/
                 1
Error: Syntax error in DATA statement at (1)

However, g95, NAG f95, ifort, openf95 accept it.

Note that
   data a /string(5)/
should be rejected:
   First subscript (5) is greater than upper bound (4) for array STRING


-- 
           Summary: DATA statement with array element as initializer is
                    rejected
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: rejects-valid, accepts-invalid
          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=32928


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

end of thread, other threads:[~2007-11-28  1:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-28 13:20 [Bug fortran/32928] New: DATA statement with array element as initializer is rejected burnus at gcc dot gnu dot org
2007-07-28 13:30 ` [Bug fortran/32928] " burnus at gcc dot gnu dot org
2007-07-28 14:01 ` burnus at gcc dot gnu dot org
2007-08-15 11:52 ` fxcoudert at gcc dot gnu dot org
2007-08-26  1:55 ` jvdelisle at gcc dot gnu dot org
2007-08-29 19:20 ` pault at gcc dot gnu dot org
2007-10-03  4:51 ` jvdelisle at gcc dot gnu dot org
2007-10-04 23:27 ` jvdelisle at gcc dot gnu dot org
2007-10-04 23:32 ` jvdelisle at gcc dot gnu dot org
2007-11-28  1:02 ` jvdelisle at gcc dot gnu dot org
2007-11-28  1:12 ` jvdelisle at gcc dot gnu dot org
2007-11-28  1:15 ` jvdelisle 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).