This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/60472] Warning: array subscript is above array bounds when compiling crtstuff.c


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])
                   ^

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]