summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/20000822-1.c
blob: f4a084b33edf467b0ee3d482f9700f8f9e78c886 (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
25
26
27
28
#ifndef NO_TRAMPOLINES
int f0(int (*fn)(int *), int *p)
{
  return (*fn) (p);
}

int f1(void)
{
  int i = 0;

  int f2(int *p)
  {
    i = 1;
    return *p + 1;
  }

  return f0(f2, &i);
}
#endif

int main()
{
#ifndef NO_TRAMPOLINES
  if (f1() != 2)
    abort ();
#endif
  return 0;
}