OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20020418-1.c] - Diff between revs 297 and 338

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);
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.