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 compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-O2 -fdump-tree-esra-details" } */
|
/* { dg-options "-O2 -fdump-tree-esra-details" } */
|
|
|
struct blah
|
struct blah
|
{
|
{
|
char a[4];
|
char a[4];
|
};
|
};
|
|
|
struct str
|
struct str
|
{
|
{
|
struct blah b1;
|
struct blah b1;
|
char x;
|
char x;
|
};
|
};
|
|
|
struct val
|
struct val
|
{
|
{
|
char y;
|
char y;
|
struct blah b2;
|
struct blah b2;
|
};
|
};
|
|
|
union U
|
union U
|
{
|
{
|
struct str str;
|
struct str str;
|
struct val val;
|
struct val val;
|
};
|
};
|
|
|
|
|
extern struct blah e_b1, e_b2;
|
extern struct blah e_b1, e_b2;
|
extern union U *e_u;
|
extern union U *e_u;
|
|
|
int foo (int b)
|
int foo (int b)
|
{
|
{
|
union U u;
|
union U u;
|
|
|
u.str.b1 = e_b1;
|
u.str.b1 = e_b1;
|
u.val.b2 = e_b2;
|
u.val.b2 = e_b2;
|
u.str.b1.a[3] = 0;
|
u.str.b1.a[3] = 0;
|
|
|
*e_u = u;
|
*e_u = u;
|
}
|
}
|
|
|
/* { dg-final { scan-tree-dump-times "Created a replacement" 0 "esra"} } */
|
/* { dg-final { scan-tree-dump-times "Created a replacement" 0 "esra"} } */
|
/* { dg-final { cleanup-tree-dump "esra" } } */
|
/* { dg-final { cleanup-tree-dump "esra" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.