This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30655] New: Undue out-of-bounds warning
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Jan 2007 14:17:57 -0000
- Subject: [Bug fortran/30655] New: Undue out-of-bounds warning
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gfortran should not report an out-of-bounds access on the following code:
$ cat a.f90
integer i(12), j
j = -1
i(0:j) = 42
end
$ gfortran a.f90
a.f90:3.4:
i(0:j) = 42
1
Warning: Array reference at (1) is out of bounds
Compiling with -fbounds-check and running it doesn't error, which means the
-fbounds-check code is generated fine. But, somewhere, the front-end is
over-zealous (it doesn't know about stride). I thought I had that fixed at some
point...
--
Summary: Undue out-of-bounds warning
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fxcoudert at gcc dot gnu dot org
OtherBugsDependingO 27766
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30655