URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 297 |
Rev 338 |
/* ifcvt accidently deletes a referenced label while generating
|
/* ifcvt accidently deletes a referenced label while generating
|
conditional traps on machines having such patterns */
|
conditional traps on machines having such patterns */
|
|
|
struct foo { int a; };
|
struct foo { int a; };
|
|
|
void gcc_crash(struct foo *p)
|
void gcc_crash(struct foo *p)
|
{
|
{
|
if (__builtin_expect(p->a < 52, 0))
|
if (__builtin_expect(p->a < 52, 0))
|
__builtin_trap();
|
__builtin_trap();
|
top:
|
top:
|
p->a++;
|
p->a++;
|
if (p->a >= 62)
|
if (p->a >= 62)
|
goto top;
|
goto top;
|
}
|
}
|
|
|
int main(void)
|
int main(void)
|
{
|
{
|
struct foo x;
|
struct foo x;
|
|
|
x.a = 53;
|
x.a = 53;
|
gcc_crash(&x);
|
gcc_crash(&x);
|
|
|
exit (0);
|
exit (0);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.