1 // Copyright (C) 1999, 2000 Free Software Foundation, Inc.
2 // Contributed by Nathan Sidwell 4 Oct 1999 <nathan@acm.org>
4 // Make sure we can deal with POD aggregate in va_args
7 extern "C" void abort ();
10 struct Y {int a; int b; int c; int d; int e; int f;};
12 void fn1(va_list args)
14 int i = va_arg (args, int);
15 X x = va_arg (args, X);
16 Y y = va_arg (args, Y);
21 if (y.a != 1 || y.b != 2 || y.c != 3 || y.d != 4 ||
26 void fn2(va_list args)
28 const int &i = va_arg (args, int);
29 const X &x = va_arg (args, X);
30 const Y &y = va_arg (args, Y);
35 if (y.a != 1 || y.b != 2 || y.c != 3 || y.d != 4 ||
57 Y y = {1, 2, 3, 4, 5, 6};
59 dispatch (0, 1, x, y);