summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/nest-stdar-1.c
blob: 492670b5a1e729c5a2d32f98049ff6708120fc2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdarg.h>

main ()
{
  double f (int x, ...)
    {
      va_list args;
      double a;

      va_start (args, x);
      a = va_arg (args, double);
      va_end (args);
      return a;
    }

  if (f (1, (double)1) != 1.0)
    abort ();
  exit (0);
}