URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 338 |
/* Check that __builtin_unreachable() prevents the 'control reaches
|
/* Check that __builtin_unreachable() prevents the 'control reaches
|
end of non-void function' diagnostic. */
|
end of non-void function' diagnostic. */
|
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-O2 -Wreturn-type" } */
|
/* { dg-options "-O2 -Wreturn-type" } */
|
int
|
int
|
f(int a, int b)
|
f(int a, int b)
|
{
|
{
|
if (a)
|
if (a)
|
{
|
{
|
return b;
|
return b;
|
}
|
}
|
else
|
else
|
{
|
{
|
asm ("bug");
|
asm ("bug");
|
__builtin_unreachable();
|
__builtin_unreachable();
|
}
|
}
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.