summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr46183.c
blob: 9582c34e08427ec3fe1f6d9b064e40a876a12117 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do compile } */
/* { dg-options "-fno-dse" } */

void bar(void);

void foo (int i, ...)
{
  __builtin_va_list ap;
  __builtin_va_start (ap, i);
  __builtin_va_arg (ap, int);
  while (i) i++;
  __builtin_va_arg (ap, int);
  while (i) i++;
  __builtin_va_arg (ap, int);
  while (i) i++;
  __builtin_va_arg (ap, int);
  if (i)
    bar ();
}