struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20000519-1.c
blob581c8c959743c18531f0c4bf0c5ae12b2d5525b1
1 /*
2 20000519-1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 #include <stdarg.h>
13 int
14 bar (int a, va_list ap)
16 int b;
19 b = va_arg (ap, int);
20 while (b > 10);
22 return a + b;
25 int
26 foo (int a, ...)
28 va_list ap;
30 va_start (ap, a);
31 return bar (a, ap);
34 void
35 testTortureExecute (void)
37 if (foo (1, 2, 3) != 3)
38 ASSERT (0);
39 return;