8sa1-gcc/gcc/testsuite/gcc.c-torture/execute/20000822-1.c

25 lines
225 B
C
Raw Normal View History

2000-08-22 04:41:02 -04:00
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);
}
int main()
{
if (f1() != 2)
abort ();
return 0;
}