summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.misc-tests/acker1.c
blob: 9e77e42bedd9a959e12f3b8b672cb909f0f774f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
int acker(int, int);

void main()
{
    acker(3,6);
    /* */
    exit(0);
    /* */
}

int
acker(int x,int y)
{
    if (x==0)
	return(y+1);
    else if (y==0)
	return(acker(x-1,1));
    else
	return(acker(x-1, acker(x, y-1)));
}