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 tree-optimization/55529] New: Bogus array-bounds warning


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

             Bug #: 55529
           Summary: Bogus array-bounds warning
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: markus@trippelsdorf.de


% cat test.i
int *level[1];
int rcu_num_lvls;
void
fn1 ()
{
    int i;
    for (i = 1; i < rcu_num_lvls; i++)
        level[i] = level[i - 1];
}

 % gcc -Wall -O2 -c test.i
test.i: In function âfn1â:
test.i:8:14: warning: array subscript is above array bounds [-Warray-bounds]
         level[i] = level[i - 1];
              ^


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