This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/44061] New: [4.5/4.6 Regression] Warns about out-of-bounds array access inside __builtin_constant_p guarded section
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 May 2010 14:37:31 -0000
- Subject: [Bug tree-optimization/44061] New: [4.5/4.6 Regression] Warns about out-of-bounds array access inside __builtin_constant_p guarded section
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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