2 // Copyright (C) 1999, 2000 Free Software Foundation, Inc.
3 // Contributed by Nathan Sidwell 4 Oct 1999 <nathan@acm.org>
5 // Make sure we can deal with POD aggregate in va_args
8 extern "C" void abort ();
11 struct Y {int a; int b; int c; int d; int e; int f;};
13 void fn1(va_list args)
15 int i = va_arg (args, int);
16 X x = va_arg (args, X);
17 Y y = va_arg (args, Y);
22 if (y.a != 1 || y.b != 2 || y.c != 3 || y.d != 4 ||
27 void fn2(va_list args)
29 const int &i = va_arg (args, int);
30 const X &x = va_arg (args, X);
31 const Y &y = va_arg (args, Y);
36 if (y.a != 1 || y.b != 2 || y.c != 3 || y.d != 4 ||
58 Y y = {1, 2, 3, 4, 5, 6};
60 dispatch (0, 1, x, y);