OSDN Git Service

Add NIOS2 support. Code from SourceyG++.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / torture / pr36373-7.c
1 /* { dg-do run } */
2
3 extern void abort (void);
4 struct Foo {
5     int *p;
6 } x;
7 struct Foo __attribute__((noinline))
8 bar(int *p)
9 {
10   struct Foo f;
11   f.p = p;
12   return f;
13 }
14 void __attribute__((noinline))
15 foo()
16 {
17   *x.p = 0;
18 }
19 int main()
20 {
21   int b;
22   b = 1;
23   struct Foo g = bar (&b);
24   x = g;
25   foo();
26   if (b != 0)
27     abort ();
28   return 0;
29 }