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/44061] New: [4.5/4.6 Regression] Warns about out-of-bounds array access inside __builtin_constant_p guarded section


int a[2];
int foo (int q)
{
  if (__builtin_constant_p (q))
    {
      if (q == 4)
        return a[4];
      else
        return a[0];
    }
  else
    return a[q];
}


-- 
           Summary: [4.5/4.6 Regression] Warns about out-of-bounds array
                    access inside __builtin_constant_p guarded section
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


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


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