[Bug tree-optimization/63747] [5 regression] icf mis-compares switch gimple
joey.ye at arm dot com
gcc-bugzilla@gcc.gnu.org
Thu Nov 6 02:26:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63747
--- Comment #2 from Joey Ye <joey.ye at arm dot com> ---
/* { dg-options "-O2" } */
/* { dg-do run } */
static int __attribute__((noinline))
foo(int i)
{
switch (i)
{
case 0:
case 1:
case 2:
case 3:
return 0;
default:
return 1;
}
}
static int __attribute__((noinline))
bar(int i)
{
switch (i)
{
case 4:
case 5:
case 6:
case 7:
return 0;
default:
return 1;
}
}
int main()
{
return foo(0) + bar(4);
}
More information about the Gcc-bugs
mailing list