[Bug tree-optimization/54937] New: Invalid loop bound estimate
hubicka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Oct 15 23:42:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54937
Bug #: 54937
Summary: Invalid loop bound estimate
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hubicka@gcc.gnu.org
The following loop gets predicted incorrectly to have 0 iterations while, it
iterates once.
void exit (int);
void abort (void);
int a[1];
void (*terminate_me)(int);
__attribute__((noinline,noclone))
t(int c)
{ int i;
for (i=0;i<c;i++)
{
if (i)
terminate_me(0);
a[i]=0;
}
}
main()
{
terminate_me = exit;
t(100);
abort();
}
More information about the Gcc-bugs
mailing list