URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 384 |
/* { dg-do link } */
|
/* { dg-do link } */
|
/* { dg-options "-O2" } */
|
/* { dg-options "-O2" } */
|
|
|
struct A0 { int x; };
|
struct A0 { int x; };
|
struct A1 { int x; int y[1]; };
|
struct A1 { int x; int y[1]; };
|
struct A2 { int x; int y[2]; };
|
struct A2 { int x; int y[2]; };
|
struct A3 { int x; int y[3]; };
|
struct A3 { int x; int y[3]; };
|
struct A4 { int x; int y[4]; };
|
struct A4 { int x; int y[4]; };
|
|
|
void *s;
|
void *s;
|
int u;
|
int u;
|
|
|
int
|
int
|
main (void)
|
main (void)
|
{
|
{
|
int x;
|
int x;
|
void *t = s;
|
void *t = s;
|
|
|
switch (u)
|
switch (u)
|
{
|
{
|
case 0:
|
case 0:
|
x = ((struct A0 *) t)->x;
|
x = ((struct A0 *) t)->x;
|
break;
|
break;
|
case 1:
|
case 1:
|
x = ((struct A1 *) t)->x;
|
x = ((struct A1 *) t)->x;
|
break;
|
break;
|
case 2:
|
case 2:
|
x = ((struct A2 *) t)->x;
|
x = ((struct A2 *) t)->x;
|
break;
|
break;
|
case 3:
|
case 3:
|
x = ((struct A3 *) t)->x;
|
x = ((struct A3 *) t)->x;
|
break;
|
break;
|
case 4:
|
case 4:
|
x = ((struct A4 *) t)->x;
|
x = ((struct A4 *) t)->x;
|
break;
|
break;
|
default:
|
default:
|
x = 0;
|
x = 0;
|
break;
|
break;
|
}
|
}
|
|
|
return x;
|
return x;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.