2008-01-25 Douglas Gregor <doug.gregor@gmail.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / union-2.c
blobedc8a7abf114b98668ba41a98cb1dd5f1f7e90ea
1 /* This used to segfault on SPARC 64-bit at runtime because
2 the stack pointer was clobbered by the function call. */
4 /* { dg-do run } */
6 #include <stdarg.h>
8 union U
10 long l1[2];
13 union U u;
15 void foo (int z, ...)
17 int i;
18 va_list ap;
19 va_start(ap,z);
20 i = va_arg(ap, int);
21 va_end(ap);
24 int main(void)
26 foo (1, 1, 1, 1, 1, u);
27 return 0;