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-optimized" } */
|
/* { dg-options "-O2 -fdump-tree-optimized" } */
|
|
|
typedef struct {
|
typedef struct {
|
int x;
|
int x;
|
int z;
|
int z;
|
} Foo_t;
|
} Foo_t;
|
|
|
char *xm;
|
char *xm;
|
void bar(void);
|
void bar(void);
|
|
|
void foo(void)
|
void foo(void)
|
{
|
{
|
Foo_t x;
|
Foo_t x;
|
x.x = 1;
|
x.x = 1;
|
x.z = 2;
|
x.z = 2;
|
xm = (char *)&x;
|
xm = (char *)&x;
|
bar();
|
bar();
|
/* We can't propagate x.z past bar, so this link_error should still be there. */
|
/* We can't propagate x.z past bar, so this link_error should still be there. */
|
if (x.z != 2)
|
if (x.z != 2)
|
link_error ();
|
link_error ();
|
}
|
}
|
/* { dg-final { scan-tree-dump-times "link_error" 1 "optimized"} } */
|
/* { dg-final { scan-tree-dump-times "link_error" 1 "optimized"} } */
|
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.