This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49657] New: array subscript warnings when building gcc with -O2
- From: "dirtyepic at gentoo dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 6 Jul 2011 04:53:54 +0000
- Subject: [Bug tree-optimization/49657] New: array subscript warnings when building gcc with -O2
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49657
Summary: array subscript warnings when building gcc with -O2
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dirtyepic@gentoo.org
Building gcc-4.6.1 with BOOT_CFLAGS="-O2" causes a couple -Warray-bounds
warnings to be output. I know there are several PRs open for bogus "above
array bounds" warnings but since these are triggered building GCC itself I
thought I'd report them. There is also a "below array bounds" warning.
The warnings also appear in 4.6.0 but not 4.5.* IIRC.
~/gcc/gcc-4.6.1 $ ./configure --enable-languages=c
~/gcc/gcc-4.6.1 $ make BOOT_CFLAGS="-O2" bootstrap-lean
../../.././libgcc/../gcc/crtstuff.c: In function âframe_dummyâ:
../../.././libgcc/../gcc/crtstuff.c:381:19: warning: array subscript is above
array bounds [-Warray-bounds]
../../.././libgcc/../gcc/crtstuff.c: In function â__do_global_ctors_auxâ:
../../.././libgcc/../gcc/crtstuff.c:575:25: warning: array subscript is below
array bounds [-Warray-bounds]
../.././gcc/expmed.c: In function âinit_expmedâ:
../.././gcc/expmed.c:134:3: warning: array subscript is above array bounds
[-Warray-bounds]
../.././gcc/expmed.c:141:3: warning: array subscript is above array bounds
[-Warray-bounds]
../.././gcc/expmed.c:145:3: warning: array subscript is above array bounds
[-Warray-bounds]
../.././gcc/expmed.c:149:3: warning: array subscript is above array bounds
[-Warray-bounds]
../.././gcc/expmed.c:153:3: warning: array subscript is above array bounds
[-Warray-bounds]
../.././gcc/expmed.c:157:3: warning: array subscript is above array bounds
[-Warray-bounds]
../.././gcc/expmed.c:164:3: warning: array subscript is above array bounds
[-Warray-bounds]
../.././gcc/expmed.c:180:3: warning: array subscript is above array bounds
[-Warray-bounds]
../.././gcc/expmed.c:184:3: warning: array subscript is above array bounds
[-Warray-bounds]
../.././gcc/expmed.c:188:3: warning: array subscript is above array bounds
[-Warray-bounds]
../.././gcc/expmed.c:231:8: warning: array subscript is above array bounds
[-Warray-bounds]
../.././gcc/expmed.c:246:8: warning: array subscript is above array bounds
[-Warray-bounds]
../.././gcc/expmed.c:247:8: warning: array subscript is above array bounds
[-Warray-bounds]