OSDN Git Service

Add NIOS2 support. Code from SourceyG++.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / pr24117.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3
4 typedef struct  {
5   int x;
6   int z;
7 } Foo_t;
8
9 char *xm;
10 void bar(void);
11
12 void foo(void)
13 {
14   Foo_t x;
15   x.x = 1;
16   x.z = 2;
17   xm = (char *)&x;
18   bar();
19   /* We can't propagate x.z past bar, so this link_error should still be there.  */
20   if (x.z != 2)
21     link_error ();
22 }
23 /* { dg-final { scan-tree-dump-times "link_error" 1 "optimized"} } */
24 /* { dg-final { cleanup-tree-dump "optimized" } } */