Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.dg / lto / 20090706-1_0.c
blob7877fd350d7da3a222e4406a7de9a82970af0409
1 #include <stdarg.h>
3 extern void abort (void);
5 void foo (int size, ...)
7 struct
9 struct
11 char x[size];
12 } e;
13 unsigned r;
14 } d;
15 va_list ap;
16 char c;
17 int i;
19 va_start (ap, size);
20 d = va_arg (ap, typeof (d));
21 c = d.e.x[3];
22 if (c != '3')
23 abort ();
24 if (d.r != 2602)
25 abort ();
26 va_end (ap);
29 int main (void)
31 int z = 5, i;
32 struct { struct { char a[z]; } y; unsigned r; } x;
34 x.y.a[0] = '0';
35 x.y.a[1] = '1';
36 x.y.a[2] = '2';
37 x.y.a[3] = '3';
38 x.y.a[4] = '4';
39 x.r = 2602;
40 foo (z, x);
41 return 0;