public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/55085] New: [4.8 regression] false positive -Warray-bounds
@ 2012-10-26 15:56 dimhen at gmail dot com
  2012-10-26 15:56 ` [Bug tree-optimization/55085] " dimhen at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: dimhen at gmail dot com @ 2012-10-26 15:56 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55085

             Bug #: 55085
           Summary: [4.8 regression] false positive -Warray-bounds
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dimhen@gmail.com


$ gcc -Werror -Wall -Wextra -O2 -funroll-loops -c 1.c
1.c: In function 'bar':
1.c:12:11: error: array subscript is above array bounds [-Werror=array-bounds]
      if(!a[i])
           ^
void bar(unsigned m)
{
    void *a[3];

    int i;
    for(i=0; i<(int)m; i++)
        a[i]=0; // missing warning ?

    switch(m) {
    case 2:
    for(i=0; i<(int)m; i++)
        if(!a[i])
        return;
    }
}


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-12-09  3:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-26 15:56 [Bug tree-optimization/55085] New: [4.8 regression] false positive -Warray-bounds dimhen at gmail dot com
2012-10-26 15:56 ` [Bug tree-optimization/55085] " dimhen at gmail dot com
2012-10-29 14:34 ` rguenth at gcc dot gnu.org
2012-10-30  9:33 ` rguenth at gcc dot gnu.org
2012-11-02 20:56 ` hubicka at gcc dot gnu.org
2012-11-02 20:57 ` hubicka at gcc dot gnu.org
2012-12-09  3:15 ` pinskia 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).