This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/30636] New: incorrect array bounds warning on multi-dimensional arrays
- From: "bje at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jan 2007 03:59:34 -0000
- Subject: [Bug c/30636] New: incorrect array bounds warning on multi-dimensional arrays
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
It seems that the code is unaware that emergency_buffer is a multidimensional
array and so prohibits arithmetic like base+sizeof (emergency_buffer) as
exceeding the array bounds.
Dirk wrote in private mail:
"This seems to be caused by pass 028t.ccp1 because during vrp1 the code looks
like:
<L0>:;
if (ptr_3 < &emergency_buffer[0][2048]) goto <L1>; else goto <L2>;
which is what it is warning about."
--
Summary: incorrect array bounds warning on multi-dimensional
arrays
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bje at gcc dot gnu dot org
GCC host triplet: powerpc-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30636