public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/49657] New: array subscript warnings when building gcc with -O2
@ 2011-07-06 4:54 dirtyepic at gentoo dot org
2011-07-06 4:55 ` [Bug tree-optimization/49657] " dirtyepic at gentoo dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: dirtyepic at gentoo dot org @ 2011-07-06 4:54 UTC (permalink / raw)
To: gcc-bugs
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]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/49657] array subscript warnings when building gcc with -O2
2011-07-06 4:54 [Bug tree-optimization/49657] New: array subscript warnings when building gcc with -O2 dirtyepic at gentoo dot org
@ 2011-07-06 4:55 ` dirtyepic at gentoo dot org
2011-07-06 8:06 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dirtyepic at gentoo dot org @ 2011-07-06 4:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49657
--- Comment #1 from Ryan Hill <dirtyepic at gentoo dot org> 2011-07-06 04:54:56 UTC ---
Created attachment 24699
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24699
build log
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/49657] array subscript warnings when building gcc with -O2
2011-07-06 4:54 [Bug tree-optimization/49657] New: array subscript warnings when building gcc with -O2 dirtyepic at gentoo dot org
2011-07-06 4:55 ` [Bug tree-optimization/49657] " dirtyepic at gentoo dot org
@ 2011-07-06 8:06 ` rguenth at gcc dot gnu.org
2013-01-24 13:53 ` mirimiri66 at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-07-06 8:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49657
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-07-06 08:05:26 UTC ---
The expmed.c code is broken, not sure about the crtstuff one.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/49657] array subscript warnings when building gcc with -O2
2011-07-06 4:54 [Bug tree-optimization/49657] New: array subscript warnings when building gcc with -O2 dirtyepic at gentoo dot org
2011-07-06 4:55 ` [Bug tree-optimization/49657] " dirtyepic at gentoo dot org
2011-07-06 8:06 ` rguenth at gcc dot gnu.org
@ 2013-01-24 13:53 ` mirimiri66 at gmail dot com
2013-01-24 13:54 ` mirimiri66 at gmail dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mirimiri66 at gmail dot com @ 2013-01-24 13:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49657
--- Comment #3 from mirimiri66 at gmail dot com 2013-01-24 13:53:18 UTC ---
Created attachment 29265
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29265
gcc-4.6.3 QA Notices
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/49657] array subscript warnings when building gcc with -O2
2011-07-06 4:54 [Bug tree-optimization/49657] New: array subscript warnings when building gcc with -O2 dirtyepic at gentoo dot org
` (2 preceding siblings ...)
2013-01-24 13:53 ` mirimiri66 at gmail dot com
@ 2013-01-24 13:54 ` mirimiri66 at gmail dot com
2013-01-24 13:57 ` mirimiri66 at gmail dot com
2020-05-19 20:49 ` msebor at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: mirimiri66 at gmail dot com @ 2013-01-24 13:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49657
--- Comment #4 from mirimiri66 at gmail dot com 2013-01-24 13:54:20 UTC ---
Created attachment 29266
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29266
gentoo package systeme emerge --info
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/49657] array subscript warnings when building gcc with -O2
2011-07-06 4:54 [Bug tree-optimization/49657] New: array subscript warnings when building gcc with -O2 dirtyepic at gentoo dot org
` (3 preceding siblings ...)
2013-01-24 13:54 ` mirimiri66 at gmail dot com
@ 2013-01-24 13:57 ` mirimiri66 at gmail dot com
2020-05-19 20:49 ` msebor at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: mirimiri66 at gmail dot com @ 2013-01-24 13:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49657
mirimiri66 at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mirimiri66 at gmail dot com
--- Comment #5 from mirimiri66 at gmail dot com 2013-01-24 13:56:54 UTC ---
I get similar QA notices when compiling gcc-4.6.3 in gentoo. Gentoo package
notes instructed to report this here instead of filing a gentoo bug. I've got
these flags set in /etc/make.conf:
CFLAGS="-fomit-frame-pointer -march=native -O2 -pipe"
Is this something I need to address somehow?
Added QA Notices and gentoo package system emerge --info attachments.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/49657] array subscript warnings when building gcc with -O2
2011-07-06 4:54 [Bug tree-optimization/49657] New: array subscript warnings when building gcc with -O2 dirtyepic at gentoo dot org
` (4 preceding siblings ...)
2013-01-24 13:57 ` mirimiri66 at gmail dot com
@ 2020-05-19 20:49 ` msebor at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-05-19 20:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49657
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |msebor at gcc dot gnu.org
Resolution|--- |WORKSFORME
--- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> ---
I suspect this is no longer a problem with current releases. They all build
with -O2 and -Werror.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-05-19 20:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-06 4:54 [Bug tree-optimization/49657] New: array subscript warnings when building gcc with -O2 dirtyepic at gentoo dot org
2011-07-06 4:55 ` [Bug tree-optimization/49657] " dirtyepic at gentoo dot org
2011-07-06 8:06 ` rguenth at gcc dot gnu.org
2013-01-24 13:53 ` mirimiri66 at gmail dot com
2013-01-24 13:54 ` mirimiri66 at gmail dot com
2013-01-24 13:57 ` mirimiri66 at gmail dot com
2020-05-19 20:49 ` msebor at gcc dot gnu.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).