]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
a68: new test algol68/execute/manorboy.a68
authorJose E. Marchesi <jose.marchesi@oracle.com>
Fri, 12 Dec 2025 01:55:48 +0000 (02:55 +0100)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Fri, 12 Dec 2025 02:49:53 +0000 (03:49 +0100)
This commit adds Knuth's famous man-or-boy test to the Algol 68
testsuite.

gcc/testsuite/ChangeLog

* algol68/execute/manorboy.a68: New file.

gcc/testsuite/algol68/execute/manorboy.a68 [new file with mode: 0644]

diff --git a/gcc/testsuite/algol68/execute/manorboy.a68 b/gcc/testsuite/algol68/execute/manorboy.a68
new file mode 100644 (file)
index 0000000..e48df5b
--- /dev/null
@@ -0,0 +1,7 @@
+begin proc a = (int in_k, proc int x1, x2, x3, x4, x5) int:
+         (int k := in_k;
+          proc b = int: a (k -:= 1, b, x1, x2, x3, x4);
+          (k <= 0 | x4 + x5 | b));
+
+      assert (a (10, int:1, int:-1, int:-1, int:1, int:0) = -67)
+end