URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 384 |
/* { dg-do run } */
|
/* { dg-do run } */
|
/* { dg-options "-O1" } */
|
/* { dg-options "-O1" } */
|
|
|
/* This failed because if conversion didn't handle insv patterns properly. */
|
/* This failed because if conversion didn't handle insv patterns properly. */
|
|
|
void abort (void);
|
void abort (void);
|
|
|
union y
|
union y
|
{
|
{
|
int a;
|
int a;
|
unsigned short b;
|
unsigned short b;
|
};
|
};
|
|
|
void __attribute__ ((noinline))
|
void __attribute__ ((noinline))
|
bar (unsigned short u, union y v)
|
bar (unsigned short u, union y v)
|
{
|
{
|
if (u != 1)
|
if (u != 1)
|
abort ();
|
abort ();
|
}
|
}
|
|
|
void __attribute__ ((noinline))
|
void __attribute__ ((noinline))
|
foo (int check)
|
foo (int check)
|
{
|
{
|
union y x;
|
union y x;
|
|
|
if (check != 0)
|
if (check != 0)
|
x.b = 1;
|
x.b = 1;
|
else
|
else
|
x.b = 2;
|
x.b = 2;
|
bar (x.b, x);
|
bar (x.b, x);
|
}
|
}
|
|
|
int
|
int
|
main ()
|
main ()
|
{
|
{
|
foo (1);
|
foo (1);
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.