summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr43799.c
blob: de9022d0cb6b9bdff5167ca0873761ea766e281c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do run } */
/* { dg-options "-O -fschedule-insns" } */

int f4 (int i, ...)
{
  int y = 0;
   __builtin_va_list ap;
   __builtin_va_start(ap, i);
   if (i == 5) y = __builtin_va_arg(ap, double);
   __builtin_va_end(ap);
   return y;
}

int main (void)
{
  if (f4 (5, 7.0) != 7)
    __builtin_abort ();
  return 0;
}