This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32315] New: DATA with implied-do: Bounds checks missing
- 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 2007 06:25:39 -0000
- Subject: [Bug fortran/32315] New: DATA with implied-do: Bounds checks missing
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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