repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2018-06-05 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.misc-tests
/
acker1.c
blob
aa9d1063ceef22079c24c5fed5d4938a4c147066
1
#include <stdio.h>
2
3
int
acker
(
int
,
int
);
4
5
int
6
main
(
void
)
7
{
8
int
n
=
acker
(
3
,
6
);
9
if
(
n
!=
509
)
10
printf
(
"acker(3,6) = %d != 509
\n
"
,
n
);
11
return
(
0
);
12
}
13
14
int
15
acker
(
int
x
,
int
y
)
16
{
17
if
(
x
==
0
)
18
return
(
y
+
1
);
19
else if
(
y
==
0
)
20
return
(
acker
(
x
-
1
,
1
));
21
else
22
return
(
acker
(
x
-
1
,
acker
(
x
,
y
-
1
)));
23
}