New test.

From-SVN: r35872
This commit is contained in:
Richard Henderson 2000-08-22 01:41:02 -07:00 committed by Richard Henderson
parent 6f322d2778
commit f95b2ff93e
2 changed files with 28 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2000-08-22 Richard Henderson <rth@cygnus.com>
* gcc.c-torture/execute/20000822-1.c: New test.
2000-08-21 Jakub Jelinek <jakub@redhat.com> 2000-08-21 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/execute/20000819-1.x: Remove. * gcc.c-torture/execute/20000819-1.x: Remove.

View File

@ -0,0 +1,24 @@
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;
}