aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/20021023-1.c
blob: 855b2cc1ed074f1d15694826f218e4eebb5ed914 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* This testcase ICEd on x86-64 because LABEL_REF + small const was not
   considered as local_symbolic_operand.  */
/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -fpic" } */

typedef __builtin_va_list va_list;

static unsigned int
foo (void *a, float b, const char *c, va_list d, void *e)
{
  return -1;
}

unsigned int
bar (void *a, float b, const char *c, ...)
{
  va_list args;
  unsigned int d;

  __builtin_va_start (args, c);
  d = foo (a, b, c, args, a);
  __builtin_va_end (args);
  return d;
}