summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr38338.c
blob: e8fcc3c45049872d4cd5b445dab82866cae13013 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* PR middle-end/38338 */
/* { dg-options "-O0" } */
/* { dg-options "-O0 -fPIC" { target fpic } } */

typedef void (*fnp) (void);

static char
foo (char x)
{
  return x;
}

static void *
bar (char x)
{
  void *args = __builtin_apply_args ();
  return __builtin_apply ((fnp) foo, args, sizeof (void *));
}