public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/32315]  New: DATA with implied-do: Bounds checks missing
@ 2007-06-13  6:25 burnus at gcc dot gnu dot org
  2007-06-13  6:46 ` [Bug fortran/32315] " burnus at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-06-13  6:25 UTC (permalink / raw)
  To: gcc-bugs

Found at:
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/34f509b6b4241c6d/

program chkdata
    character(len=20), dimension(4) :: string
    data ( string(i) ,i=1,5 ) / &
        'A', 'B', 'C', 'D', 'E' /
    write(*,*) string
end program chkdata

gfortran gives no warning/error whereas NAG f95 rejects it with:
  Error line 5: First subscript (5) is greater than upper bound (4)
  for array STRING
and g95 rejects it with:
  Error: Out of bounds array reference at (1)
and sunf95 with:
  ERROR: The upper bound for dimension 1 of the array STRING is out of range.

(ifort does the same as gfortran: It accepts it.)


-- 
           Summary: DATA with implied-do: Bounds checks missing
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, 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=32315


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

end of thread, other threads:[~2008-02-05 13:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-13  6:25 [Bug fortran/32315] New: DATA with implied-do: Bounds checks missing burnus at gcc dot gnu dot org
2007-06-13  6:46 ` [Bug fortran/32315] " burnus at gcc dot gnu dot org
2007-06-13 20:51 ` fxcoudert at gcc dot gnu dot org
2007-06-14  6:43 ` burnus at gcc dot gnu dot org
2008-01-20 11:56 ` [Bug fortran/32315] DATA with implied-do: Bounds checks missing [regression vs. g77] tkoenig at gcc dot gnu dot org
2008-02-05  9:37 ` pault at gcc dot gnu dot org
2008-02-05 11:18 ` pault at gcc dot gnu dot org
2008-02-05 13:07 ` pault 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).