This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/60472] Warning: array subscript is above array bounds when compiling crtstuff.c
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 09 Mar 2014 12:10:30 +0000
- Subject: [Bug middle-end/60472] Warning: array subscript is above array bounds when compiling crtstuff.c
- Auto-submitted: auto-generated
- References: <bug-60472-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60472
--- Comment #1 from UroÅ Bizjak <ubizjak at gmail dot com> ---
Reduced testcase:
--cut here--
static void *__JCR_LIST__[] __attribute__ ((used)) = { };
void frame_dummy (void)
{
if (__JCR_LIST__[0])
asm ("");
}
--cut here--
~/gcc-build/gcc/cc1 -O2 -Wall -quiet t.c
t.c: In function âframe_dummyâ:
t.c:5:19: warning: array subscript is above array bounds [-Warray-bounds]
if (__JCR_LIST__[0])
^