aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/func-ptr-1.c
blob: 5d0df69a123a05d86c66a710f45c5d7bb5d39262 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
void abort (void);
void exit (int);

static double f (float a);
static double (*fp) (float a);

int
main (void)
{
  fp = f;
  if (fp ((float) 1) != 1.0)
    abort ();
  exit (0);
}

static double
f (float a)
{
  return a;
}