Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / gcc.dg / pr19633-1.c
blobc05e46aef643a40125d9b3eadb49b0478bbebc4e
1 /* { dg-do run } */
2 /* { dg-options "-O2" } */
4 extern void abort (void);
6 struct S
8 int w, x, y, z;
9 };
11 struct T
13 int r;
14 struct S s;
17 struct S bar (struct S x, struct S *y)
19 y->w = 4;
20 return *y;
23 void
24 foo (int a, struct T b)
26 struct S x;
27 struct S *c = &x;
28 if (a)
29 c = &b.s;
30 b.s.w = 3;
31 /* This call should be marked as clobbering 'x' and 'b'. */
32 *c = bar (*c, c);
33 if (b.s.w == 3)
34 abort ();
37 float Y;
39 struct S bar1 (struct S x, struct S y)
41 Y = 4;
42 return x;
45 void
46 foo1 (int a, struct T b)
48 struct S x;
49 struct S *c = &x;
50 float z, *k = &z;
51 if (a)
52 c = &b.s;
53 b.s.w = 3;
54 /* This call should NOT be marked as clobbering 'x' and 'b'. */
55 x = bar1 (*c, *c);
56 if (b.s.w != 3)
57 link_error ();
60 int main ()
62 struct T b;
63 foo (3, b);
64 foo1 (3, b);
65 return 0;