[RFC 6/7 V2] a68: testsuite: tests for fixed sized modes

Jose E. Marchesi jemarch@gnu.org
Mon Sep 21 10:26:30 GMT 2026


Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
---
 .../algol68/compile/error-word-bits-1.a68     |  4 ++
 .../algol68/compile/error-word-bits-2.a68     |  4 ++
 .../algol68/compile/error-word-bits-3.a68     |  4 ++
 .../algol68/compile/error-word-bits-4.a68     |  3 ++
 .../algol68/compile/error-word-bits-5.a68     |  3 ++
 .../algol68/compile/error-word-bits-6.a68     |  3 ++
 gcc/testsuite/algol68/execute/abs-int-1.a68   |  4 +-
 gcc/testsuite/algol68/execute/abs-real-1.a68  |  3 ++
 gcc/testsuite/algol68/execute/acos-1.a68      |  4 +-
 .../algol68/execute/affirm-int-1.a68          |  4 +-
 .../algol68/execute/affirm-real-1.a68         |  3 ++
 .../algol68/execute/and-word-bits-1.a68       |  4 ++
 gcc/testsuite/algol68/execute/asin-1.a68      |  4 +-
 gcc/testsuite/algol68/execute/atan-1.a68      |  4 +-
 gcc/testsuite/algol68/execute/bin-word-1.a68  |  2 +
 .../algol68/execute/bits-clear-1.a68          |  9 ++++-
 .../execute/bits-environment-enquiries-1.a68  |  7 ++++
 gcc/testsuite/algol68/execute/bits-set-1.a68  |  9 ++++-
 gcc/testsuite/algol68/execute/bits-test-1.a68 |  1 +
 gcc/testsuite/algol68/execute/conj-1.a68      |  2 +
 gcc/testsuite/algol68/execute/cos-1.a68       |  4 +-
 gcc/testsuite/algol68/execute/div-int-1.a68   |  4 +-
 .../algol68/execute/divab-real-1.a68          |  5 ++-
 .../algol68/execute/elem-word-bits-1.a68      |  4 ++
 gcc/testsuite/algol68/execute/entier-1.a68    |  4 +-
 gcc/testsuite/algol68/execute/eq-int-1.a68    |  5 ++-
 .../algol68/execute/eq-word-bits-1.a68        |  5 +++
 gcc/testsuite/algol68/execute/ge-int-1.a68    |  5 ++-
 .../algol68/execute/ge-word-bits-1.a68        |  5 +++
 gcc/testsuite/algol68/execute/gt-int-1.a68    |  5 ++-
 gcc/testsuite/algol68/execute/i-1.a68         |  3 +-
 gcc/testsuite/algol68/execute/i-2.a68         |  1 +
 gcc/testsuite/algol68/execute/le-int-1.a68    |  5 ++-
 .../algol68/execute/le-word-bits-1.a68        |  5 +++
 gcc/testsuite/algol68/execute/ln-1.a68        |  4 +-
 gcc/testsuite/algol68/execute/log-1.a68       |  4 +-
 gcc/testsuite/algol68/execute/lt-int-1.a68    |  5 ++-
 gcc/testsuite/algol68/execute/minus-int-1.a68 |  4 +-
 gcc/testsuite/algol68/execute/minusab-1.a68   |  8 +++-
 gcc/testsuite/algol68/execute/minusab-2.a68   |  6 +++
 gcc/testsuite/algol68/execute/mod-int-1.a68   |  5 ++-
 gcc/testsuite/algol68/execute/modab-1.a68     |  3 +-
 .../algol68/execute/modules/module27.a68      |  9 +++++
 .../algol68/execute/modules/program-27.a68    |  9 +++++
 gcc/testsuite/algol68/execute/mult-int-1.a68  |  4 +-
 gcc/testsuite/algol68/execute/ne-int-1.a68    |  5 ++-
 .../algol68/execute/ne-word-bits-1.a68        |  5 +++
 gcc/testsuite/algol68/execute/neg-int-1.a68   |  4 +-
 gcc/testsuite/algol68/execute/neg-real-1.a68  |  3 ++
 .../algol68/execute/not-word-bits-1.a68       |  5 +++
 gcc/testsuite/algol68/execute/odd-1.a68       |  4 +-
 .../algol68/execute/or-word-bits-1.a68        |  4 ++
 gcc/testsuite/algol68/execute/over-int-1.a68  |  4 +-
 gcc/testsuite/algol68/execute/overab-1.a68    |  3 +-
 gcc/testsuite/algol68/execute/plus-int-1.a68  |  4 +-
 gcc/testsuite/algol68/execute/plusab-1.a68    | 10 ++++-
 gcc/testsuite/algol68/execute/plusab-2.a68    |  6 +++
 gcc/testsuite/algol68/execute/pow-int-1.a68   |  5 ++-
 gcc/testsuite/algol68/execute/pow-real-1.a68  |  2 +
 gcc/testsuite/algol68/execute/re-im-1.a68     |  4 +-
 gcc/testsuite/algol68/execute/round-1.a68     |  4 +-
 gcc/testsuite/algol68/execute/sign-int-1.a68  |  5 ++-
 gcc/testsuite/algol68/execute/sign-real-1.a68 |  5 ++-
 gcc/testsuite/algol68/execute/sin-1.a68       |  4 +-
 gcc/testsuite/algol68/execute/sqrt-1.a68      |  4 +-
 gcc/testsuite/algol68/execute/tan-1.a68       |  4 +-
 gcc/testsuite/algol68/execute/timesab-1.a68   | 37 +++++++++++++++++++
 .../algol68/execute/widening-compl-1.a68      |  4 ++
 gcc/testsuite/algol68/execute/word-bits-1.a68 |  4 ++
 .../algol68/execute/word-bits-shift-1.a68     |  7 ++++
 gcc/testsuite/algol68/execute/xor-bits-1.a68  |  6 +--
 71 files changed, 312 insertions(+), 42 deletions(-)
 create mode 100644 gcc/testsuite/algol68/compile/error-word-bits-1.a68
 create mode 100644 gcc/testsuite/algol68/compile/error-word-bits-2.a68
 create mode 100644 gcc/testsuite/algol68/compile/error-word-bits-3.a68
 create mode 100644 gcc/testsuite/algol68/compile/error-word-bits-4.a68
 create mode 100644 gcc/testsuite/algol68/compile/error-word-bits-5.a68
 create mode 100644 gcc/testsuite/algol68/compile/error-word-bits-6.a68
 create mode 100644 gcc/testsuite/algol68/execute/abs-real-1.a68
 create mode 100644 gcc/testsuite/algol68/execute/affirm-real-1.a68
 create mode 100644 gcc/testsuite/algol68/execute/and-word-bits-1.a68
 create mode 100644 gcc/testsuite/algol68/execute/bin-word-1.a68
 create mode 100644 gcc/testsuite/algol68/execute/bits-environment-enquiries-1.a68
 create mode 100644 gcc/testsuite/algol68/execute/elem-word-bits-1.a68
 create mode 100644 gcc/testsuite/algol68/execute/eq-word-bits-1.a68
 create mode 100644 gcc/testsuite/algol68/execute/ge-word-bits-1.a68
 create mode 100644 gcc/testsuite/algol68/execute/le-word-bits-1.a68
 create mode 100644 gcc/testsuite/algol68/execute/modules/module27.a68
 create mode 100644 gcc/testsuite/algol68/execute/modules/program-27.a68
 create mode 100644 gcc/testsuite/algol68/execute/ne-word-bits-1.a68
 create mode 100644 gcc/testsuite/algol68/execute/neg-real-1.a68
 create mode 100644 gcc/testsuite/algol68/execute/not-word-bits-1.a68
 create mode 100644 gcc/testsuite/algol68/execute/or-word-bits-1.a68
 create mode 100644 gcc/testsuite/algol68/execute/timesab-1.a68
 create mode 100644 gcc/testsuite/algol68/execute/widening-compl-1.a68
 create mode 100644 gcc/testsuite/algol68/execute/word-bits-1.a68
 create mode 100644 gcc/testsuite/algol68/execute/word-bits-shift-1.a68

diff --git a/gcc/testsuite/algol68/compile/error-word-bits-1.a68 b/gcc/testsuite/algol68/compile/error-word-bits-1.a68
new file mode 100644
index 00000000000..a0ff06d1403
--- /dev/null
+++ b/gcc/testsuite/algol68/compile/error-word-bits-1.a68
@@ -0,0 +1,4 @@
+begin
+      word bits address = word word 16rffffff3c; { dg-error "" }
+      skip
+end
diff --git a/gcc/testsuite/algol68/compile/error-word-bits-2.a68 b/gcc/testsuite/algol68/compile/error-word-bits-2.a68
new file mode 100644
index 00000000000..fe1f93cf5ba
--- /dev/null
+++ b/gcc/testsuite/algol68/compile/error-word-bits-2.a68
@@ -0,0 +1,4 @@
+begin
+      word bits address = long 16rffffff3c; { dg-error "word bits" }
+      skip
+end
diff --git a/gcc/testsuite/algol68/compile/error-word-bits-3.a68 b/gcc/testsuite/algol68/compile/error-word-bits-3.a68
new file mode 100644
index 00000000000..35848579fed
--- /dev/null
+++ b/gcc/testsuite/algol68/compile/error-word-bits-3.a68
@@ -0,0 +1,4 @@
+begin word bits address = word 16rffffffff;
+      assert (address = short 16rffffffff); { dg-error "word bits" }
+      skip
+end
diff --git a/gcc/testsuite/algol68/compile/error-word-bits-4.a68 b/gcc/testsuite/algol68/compile/error-word-bits-4.a68
new file mode 100644
index 00000000000..29dc36132b3
--- /dev/null
+++ b/gcc/testsuite/algol68/compile/error-word-bits-4.a68
@@ -0,0 +1,3 @@
+begin bits foo = word 16r0; { dg-error "" }
+      skip
+end
diff --git a/gcc/testsuite/algol68/compile/error-word-bits-5.a68 b/gcc/testsuite/algol68/compile/error-word-bits-5.a68
new file mode 100644
index 00000000000..c2fb19b2899
--- /dev/null
+++ b/gcc/testsuite/algol68/compile/error-word-bits-5.a68
@@ -0,0 +1,3 @@
+begin word bits foo = 16r0; { dg-error "coerced" }
+      skip
+end
diff --git a/gcc/testsuite/algol68/compile/error-word-bits-6.a68 b/gcc/testsuite/algol68/compile/error-word-bits-6.a68
new file mode 100644
index 00000000000..a20e9d721b4
--- /dev/null
+++ b/gcc/testsuite/algol68/compile/error-word-bits-6.a68
@@ -0,0 +1,3 @@
+begin word bits foo = long 16r0; { dg-error "coerced" }
+      skip
+end
diff --git a/gcc/testsuite/algol68/execute/abs-int-1.a68 b/gcc/testsuite/algol68/execute/abs-int-1.a68
index fa8125a1587..ea2461b84f2 100644
--- a/gcc/testsuite/algol68/execute/abs-int-1.a68
+++ b/gcc/testsuite/algol68/execute/abs-int-1.a68
@@ -6,5 +6,7 @@ BEGIN ASSERT (ABS 10 = 10);
       ASSERT (ABS - SHORT SHORT 10 = SHORT SHORT 10);
       ASSERT (ABS LONG 10 = LONG 10);
       ASSERT (ABS - LONG 10 = LONG 10);
-      ASSERT (ABS - LONG LONG 10 = LONG LONG 10)
+      ASSERT (ABS - LONG LONG 10 = LONG LONG 10);
+      ASSERT (ABS WORD 10 = WORD 10);
+      ASSERT (ABS - WORD 10 = WORD 10)
 END
diff --git a/gcc/testsuite/algol68/execute/abs-real-1.a68 b/gcc/testsuite/algol68/execute/abs-real-1.a68
new file mode 100644
index 00000000000..2c1a305570a
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/abs-real-1.a68
@@ -0,0 +1,3 @@
+begin word real w = - word 10;
+      assert (ABS w = word 10.0)
+end
diff --git a/gcc/testsuite/algol68/execute/acos-1.a68 b/gcc/testsuite/algol68/execute/acos-1.a68
index 6a985cc8a23..accacc71e31 100644
--- a/gcc/testsuite/algol68/execute/acos-1.a68
+++ b/gcc/testsuite/algol68/execute/acos-1.a68
@@ -2,7 +2,9 @@
 BEGIN REAL r = 1.0;
       LONG REAL rr = LONG 45.0;
       LONG LONG REAL rrr = LONG LONG 60.0;
+      WORD REAL w = WORD 1.0;
       ASSERT (arccos (r) = 0.0);
       long arccos (rr);
-      long long arccos (rrr)
+      long long arccos (rrr);
+      ASSERT (word arccos (w) = WORD 0.0)
 END
diff --git a/gcc/testsuite/algol68/execute/affirm-int-1.a68 b/gcc/testsuite/algol68/execute/affirm-int-1.a68
index 4cd065fa235..7eee2ef3af4 100644
--- a/gcc/testsuite/algol68/execute/affirm-int-1.a68
+++ b/gcc/testsuite/algol68/execute/affirm-int-1.a68
@@ -2,9 +2,11 @@
 BEGIN INT i = 10;
       LONG INT ii = LONG 10, LONG LONG INT iii = LONG LONG 10;
       SHORT INT ss = SHORT 10, SHORT SHORT INT sss = SHORT SHORT 10;
+      WORD INT w = WORD 10;
       ASSERT (+i = 10);
       ASSERT (+ii  = LONG 10);
       ASSERT (+iii = LONG LONG 10);
       ASSERT (+ss  = SHORT 10);
-      ASSERT (+sss = SHORT SHORT 10)
+      ASSERT (+sss = SHORT SHORT 10);
+      ASSERT (+w = WORD 10)
 END
diff --git a/gcc/testsuite/algol68/execute/affirm-real-1.a68 b/gcc/testsuite/algol68/execute/affirm-real-1.a68
new file mode 100644
index 00000000000..bead4bc0e7d
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/affirm-real-1.a68
@@ -0,0 +1,3 @@
+begin word real w = word 1.0;
+      assert (+w = word 1.0)
+end
diff --git a/gcc/testsuite/algol68/execute/and-word-bits-1.a68 b/gcc/testsuite/algol68/execute/and-word-bits-1.a68
new file mode 100644
index 00000000000..c54e74f374f
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/and-word-bits-1.a68
@@ -0,0 +1,4 @@
+begin word bits address = word 16rfff0ffff;
+      assert ((address AND word 16rff00ffff) = word 16rff00ffff);
+      skip
+end
diff --git a/gcc/testsuite/algol68/execute/asin-1.a68 b/gcc/testsuite/algol68/execute/asin-1.a68
index 114518edfa2..034b1548ece 100644
--- a/gcc/testsuite/algol68/execute/asin-1.a68
+++ b/gcc/testsuite/algol68/execute/asin-1.a68
@@ -2,7 +2,9 @@
 BEGIN REAL r = 0.0;
       LONG REAL rr = LONG 45.0;
       LONG LONG REAL rrr = LONG LONG 60.0;
+      WORD REAL w = WORD 0.0;
       ASSERT (arcsin (r) = 0.0);
       long arcsin (rr);
-      long long arcsin (rrr)
+      long long arcsin (rrr);
+      ASSERT (word arcsin (w) = WORD 0.0)
 END
diff --git a/gcc/testsuite/algol68/execute/atan-1.a68 b/gcc/testsuite/algol68/execute/atan-1.a68
index bc710c5cdfd..760447bbf7f 100644
--- a/gcc/testsuite/algol68/execute/atan-1.a68
+++ b/gcc/testsuite/algol68/execute/atan-1.a68
@@ -2,7 +2,9 @@
 BEGIN REAL r = 0.0;
       LONG REAL rr = LONG 45.0;
       LONG LONG REAL rrr = LONG LONG 60.0;
+      WORD REAL w = WORD 0.0;
       ASSERT (arctan (r) = 0.0);
       long arctan (rr);
-      long long arctan (rrr)
+      long long arctan (rrr);
+      ASSERT (word arctan (w) = WORD 0.0)
 END
diff --git a/gcc/testsuite/algol68/execute/bin-word-1.a68 b/gcc/testsuite/algol68/execute/bin-word-1.a68
new file mode 100644
index 00000000000..dbc710d063a
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/bin-word-1.a68
@@ -0,0 +1,2 @@
+begin assert (BIN word 255 = word 16rff)
+end
diff --git a/gcc/testsuite/algol68/execute/bits-clear-1.a68 b/gcc/testsuite/algol68/execute/bits-clear-1.a68
index 8fad9d38c9f..729b2389dc8 100644
--- a/gcc/testsuite/algol68/execute/bits-clear-1.a68
+++ b/gcc/testsuite/algol68/execute/bits-clear-1.a68
@@ -31,5 +31,12 @@ begin (short short bits a = short short 16rf;
        assert (a CLEAR -1 = a);
        assert (a CLEAR long_long_bits_width = a);
        assert (a CLEAR (long_long_bits_width-1) = long long 16rf);
-       assert (a CLEAR 0 CLEAR 1 = BIN long long 12))
+       assert (a CLEAR 0 CLEAR 1 = BIN long long 12));
+
+      (word bits a = word 16rf;
+       assert (a CLEAR (word_bits_width + 1) = a);
+       assert (a CLEAR -1 = a);
+       assert (a CLEAR word_bits_width = a);
+       assert (a CLEAR (word_bits_width-1) = word 16rf);
+       assert (a CLEAR 0 CLEAR 1 = BIN word 12));
 end
diff --git a/gcc/testsuite/algol68/execute/bits-environment-enquiries-1.a68 b/gcc/testsuite/algol68/execute/bits-environment-enquiries-1.a68
new file mode 100644
index 00000000000..cf322591259
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/bits-environment-enquiries-1.a68
@@ -0,0 +1,7 @@
+begin assert (maxbits >= 16r0);
+      assert (longmaxbits >= long 16r0);
+      assert (longlongmaxbits >= long long 16r0);
+      assert (shortmaxbits >= short 16r0);
+      assert (shortshortmaxbits >= short short 16r0);
+      assert (wordmaxbits >= word 16r0)
+end
diff --git a/gcc/testsuite/algol68/execute/bits-set-1.a68 b/gcc/testsuite/algol68/execute/bits-set-1.a68
index 6a8a8409e30..9d9229d012c 100644
--- a/gcc/testsuite/algol68/execute/bits-set-1.a68
+++ b/gcc/testsuite/algol68/execute/bits-set-1.a68
@@ -31,5 +31,12 @@ begin (short short bits a = short short 16r0;
        assert (a SET -1 = a);
        assert (a SET long_long_bits_width = a);
        assert (a SET (long_long_bits_width-1) = long long 16r1 SHL (long_long_bits_width-1));
-       assert (a SET 0 SET 1 = BIN long long 3))
+       assert (a SET 0 SET 1 = BIN long long 3));
+
+      (word bits a = word 16r0;
+       assert (a SET (word_bits_width + 1) = a);
+       assert (a SET -1 = a);
+       assert (a SET word_bits_width = a);
+       assert (a SET (word_bits_width-1) = word 16r1 SHL (word_bits_width-1));
+       assert (a SET 0 SET 1 = BIN word 3));
 end
diff --git a/gcc/testsuite/algol68/execute/bits-test-1.a68 b/gcc/testsuite/algol68/execute/bits-test-1.a68
index a7e0ba9c6ac..42774639b00 100644
--- a/gcc/testsuite/algol68/execute/bits-test-1.a68
+++ b/gcc/testsuite/algol68/execute/bits-test-1.a68
@@ -1,5 +1,6 @@
 begin assert (NOT (16rff TEST 8));
       assert (NOT (16rff TEST -1));
       assert (NOT (16rff TEST -2));
+      assert (NOT (word 16rff TEST -2));
       assert (2r100 TEST 2)
 end
diff --git a/gcc/testsuite/algol68/execute/conj-1.a68 b/gcc/testsuite/algol68/execute/conj-1.a68
index 1954d38bf1d..5bbb7d4129d 100644
--- a/gcc/testsuite/algol68/execute/conj-1.a68
+++ b/gcc/testsuite/algol68/execute/conj-1.a68
@@ -5,5 +5,7 @@ BEGIN COMPL z = 4.0I5.0;
       CONJ zz;
       LONG LONG COMPL zzz = LONG LONG 4.0 I LONG LONG 7.0;
       CONJ zzz;
+      WORD COMPL w = WORD 4.0 I WORD 7.0;
+      CONJ w;
       SKIP
 END
diff --git a/gcc/testsuite/algol68/execute/cos-1.a68 b/gcc/testsuite/algol68/execute/cos-1.a68
index e6b0f69279a..f2a6b118620 100644
--- a/gcc/testsuite/algol68/execute/cos-1.a68
+++ b/gcc/testsuite/algol68/execute/cos-1.a68
@@ -2,7 +2,9 @@
 BEGIN REAL r = 0.0;
       LONG REAL rr = LONG 45.0;
       LONG LONG REAL rrr = LONG LONG 60.0;
+      WORD REAL w = WORD 0.0;
       ASSERT (cos (r) = 1.0);
       long cos (rr);
-      long long cos (rrr)
+      long long cos (rrr);
+      ASSERT (word cos (w) = WORD 1.0)
 END
diff --git a/gcc/testsuite/algol68/execute/div-int-1.a68 b/gcc/testsuite/algol68/execute/div-int-1.a68
index 6a26a7bef02..5212acfe2ba 100644
--- a/gcc/testsuite/algol68/execute/div-int-1.a68
+++ b/gcc/testsuite/algol68/execute/div-int-1.a68
@@ -1,7 +1,9 @@
 # { dg-options "-fstropping=upper" }  #
 BEGIN INT i = 10;
       LONG INT ii = LONG 10, LONG LONG INT iii = LONG LONG 10;
+      WORD INT w = WORD 10;
       ASSERT (i / 2 = 5.0);
       ASSERT (ii / LONG 2 = LONG 5.0);
-      ASSERT (iii / LONG LONG 2 = LONG LONG 5.0)
+      ASSERT (iii / LONG LONG 2 = LONG LONG 5.0);
+      ASSERT (w / WORD 2 = WORD 5.0)
 END
diff --git a/gcc/testsuite/algol68/execute/divab-real-1.a68 b/gcc/testsuite/algol68/execute/divab-real-1.a68
index 830ae2e5f8d..bc8837765f3 100644
--- a/gcc/testsuite/algol68/execute/divab-real-1.a68
+++ b/gcc/testsuite/algol68/execute/divab-real-1.a68
@@ -7,5 +7,8 @@ BEGIN REAL r := 3.14;
       rr /:= LONG 2.0;
       LONG LONG REAL rrr := LONG LONG 3.14;
       rrr DIVAB LONG LONG 2.0;
-      rrr /:= LONG LONG 2.0
+      rrr /:= LONG LONG 2.0;
+      WORD REAL w := WORD 3.14;
+      w DIVAB WORD 2.0;
+      w  /:= WORD 2.0
 END
diff --git a/gcc/testsuite/algol68/execute/elem-word-bits-1.a68 b/gcc/testsuite/algol68/execute/elem-word-bits-1.a68
new file mode 100644
index 00000000000..56942aefcef
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/elem-word-bits-1.a68
@@ -0,0 +1,4 @@
+begin word bits b = word 2r1010;
+      assert ((word_bits_width - 1) ELEM b);
+      assert (NOT ((word_bits_width - 2) ELEM b))
+end
diff --git a/gcc/testsuite/algol68/execute/entier-1.a68 b/gcc/testsuite/algol68/execute/entier-1.a68
index a7ca3803e5a..d916a6496d1 100644
--- a/gcc/testsuite/algol68/execute/entier-1.a68
+++ b/gcc/testsuite/algol68/execute/entier-1.a68
@@ -2,10 +2,12 @@
 BEGIN REAL x = 3.14, y = 3.80;
       LONG REAL xx = LONG 3.14, yy = LONG 3.80;
       LONG LONG REAL xxx = LONG LONG 3.14, yyy = LONG LONG 3.80;
+      WORD REAL wx = WORD 3.14, wy = WORD 3.80;
       ASSERT (ENTIER x = 3 AND ENTIER y = 3);
       ASSERT (ENTIER xx = LONG 3 AND ENTIER yy = LONG 3);
       ASSERT (ENTIER xxx = LONG LONG 3 AND ENTIER yyy = LONG LONG 3);
       ASSERT (ENTIER x = 3 AND FLOOR y = 3);
       ASSERT (ENTIER xx = LONG 3 AND FLOOR yy = LONG 3);
-      ASSERT (ENTIER xxx = LONG LONG 3 AND FLOOR yyy = LONG LONG 3)
+      ASSERT (ENTIER xxx = LONG LONG 3 AND FLOOR yyy = LONG LONG 3);
+      ASSERT (ENTIER wx = WORD 3 AND FLOOR wy = WORD 3)
 END
diff --git a/gcc/testsuite/algol68/execute/eq-int-1.a68 b/gcc/testsuite/algol68/execute/eq-int-1.a68
index 399b91aeab7..71765fb347f 100644
--- a/gcc/testsuite/algol68/execute/eq-int-1.a68
+++ b/gcc/testsuite/algol68/execute/eq-int-1.a68
@@ -2,9 +2,12 @@
 BEGIN INT i = 12;
       LONG INT ii = LONG 12, LONG LONG INT iii = LONG LONG 12;
       SHORT INT s = SHORT 12, SHORT SHORT INT ss = SHORT SHORT 12;
+      WORD INT w = WORD 12;
       ASSERT (12 = i);
       ASSERT (ii = LONG 12);
       ASSERT (iii = LONG LONG 12);
       ASSERT (s = SHORT 12);
-      ASSERT (ss = SHORT SHORT 12)
+      ASSERT (ss = SHORT SHORT 12);
+      ASSERT (w = WORD 12);
+      ASSERT (w EQ WORD 12)
 END
diff --git a/gcc/testsuite/algol68/execute/eq-word-bits-1.a68 b/gcc/testsuite/algol68/execute/eq-word-bits-1.a68
new file mode 100644
index 00000000000..fb75388f43d
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/eq-word-bits-1.a68
@@ -0,0 +1,5 @@
+begin word bits address = word 16rffffffff;
+      assert (address = word 16rffffffff);
+      assert (address EQ word 16rffffffff);
+      skip
+end
diff --git a/gcc/testsuite/algol68/execute/ge-int-1.a68 b/gcc/testsuite/algol68/execute/ge-int-1.a68
index 9ed95321c09..090239573fc 100644
--- a/gcc/testsuite/algol68/execute/ge-int-1.a68
+++ b/gcc/testsuite/algol68/execute/ge-int-1.a68
@@ -2,9 +2,12 @@
 BEGIN INT i = 12;
       LONG INT ii = LONG 12, LONG LONG INT iii = LONG LONG 12;
       SHORT INT s = SHORT 12, SHORT SHORT INT ss = SHORT SHORT 12;
+      WORD INT w = WORD 12;
       ASSERT (i >= 10);
       ASSERT (ii GE LONG 10);
       ASSERT (iii >= LONG LONG 12);
       ASSERT (s >= SHORT 12);
-      ASSERT (ss >= SHORT SHORT 10)
+      ASSERT (ss >= SHORT SHORT 10);
+      ASSERT (w >= WORD 12);
+      ASSERT (w GE WORD 12)
 END
diff --git a/gcc/testsuite/algol68/execute/ge-word-bits-1.a68 b/gcc/testsuite/algol68/execute/ge-word-bits-1.a68
new file mode 100644
index 00000000000..569b57fc983
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/ge-word-bits-1.a68
@@ -0,0 +1,5 @@
+begin word bits address = word 16rfff0ffff;
+      assert (address >= word 16rab);
+      assert (address GE word 16rfff0ffff);
+      skip
+end
diff --git a/gcc/testsuite/algol68/execute/gt-int-1.a68 b/gcc/testsuite/algol68/execute/gt-int-1.a68
index cd5437b9ff8..e058114c0fc 100644
--- a/gcc/testsuite/algol68/execute/gt-int-1.a68
+++ b/gcc/testsuite/algol68/execute/gt-int-1.a68
@@ -2,9 +2,12 @@
 BEGIN INT i = 12;
       LONG INT ii = LONG 12, LONG LONG INT iii = LONG LONG 12;
       SHORT INT s = SHORT 12, SHORT SHORT INT ss = SHORT SHORT 12;
+      WORD INT w = WORD 12;
       ASSERT (i > 10);
       ASSERT (ii GT LONG 10);
       ASSERT (iii > LONG LONG 10);
       ASSERT (s > SHORT 10);
-      ASSERT (ss > SHORT SHORT 10)
+      ASSERT (ss > SHORT SHORT 10);
+      ASSERT (w > WORD 10);
+      ASSERT (w GT WORD 10)
 END
diff --git a/gcc/testsuite/algol68/execute/i-1.a68 b/gcc/testsuite/algol68/execute/i-1.a68
index 87b6979c600..68d05c41f47 100644
--- a/gcc/testsuite/algol68/execute/i-1.a68
+++ b/gcc/testsuite/algol68/execute/i-1.a68
@@ -1,6 +1,7 @@
 # { dg-options "-fstropping=upper" }  #
 BEGIN COMPL z = 4I5;
       LONG COMPL zz = LONG 4 I LONG 6;
-      LONG LONG COMPL zzz = LONG LONG 4 I LONG LONG7;
+      LONG LONG COMPL zzz = LONG LONG 4 I LONG LONG 7;
+      WORD COMPL w = WORD 4 I WORD 7;
       SKIP
 END
diff --git a/gcc/testsuite/algol68/execute/i-2.a68 b/gcc/testsuite/algol68/execute/i-2.a68
index 455f0096e2e..5c5cd67541d 100644
--- a/gcc/testsuite/algol68/execute/i-2.a68
+++ b/gcc/testsuite/algol68/execute/i-2.a68
@@ -2,5 +2,6 @@
 BEGIN COMPL z = 4.0I5.0;
       LONG COMPL zz = LONG 4.0 I LONG 6.0;
       LONG LONG COMPL zzz = LONG LONG 4.0 I LONG LONG 7.0;
+      WORD COMPL w = WORD 4.0 I WORD 7.0;
       SKIP
 END
diff --git a/gcc/testsuite/algol68/execute/le-int-1.a68 b/gcc/testsuite/algol68/execute/le-int-1.a68
index 7ad17d308a3..ea74d6f3377 100644
--- a/gcc/testsuite/algol68/execute/le-int-1.a68
+++ b/gcc/testsuite/algol68/execute/le-int-1.a68
@@ -2,9 +2,12 @@
 BEGIN INT i = 12;
       LONG INT ii = LONG 12, LONG LONG INT iii = LONG LONG 12;
       SHORT INT s = SHORT 12, SHORT SHORT INT ss = SHORT SHORT 12;
+      WORD INT w = WORD 12;
       ASSERT (i <= 13);
       ASSERT (ii LE LONG 13);
       ASSERT (iii <= LONG LONG 13);
       ASSERT (s <= SHORT 12);
-      ASSERT (ss <= SHORT SHORT 13)
+      ASSERT (ss <= SHORT SHORT 13);
+      ASSERT (w <= WORD 13);
+      ASSERT (w LE WORD 13)
 END
diff --git a/gcc/testsuite/algol68/execute/le-word-bits-1.a68 b/gcc/testsuite/algol68/execute/le-word-bits-1.a68
new file mode 100644
index 00000000000..641042b6d80
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/le-word-bits-1.a68
@@ -0,0 +1,5 @@
+begin word bits address = word 16rfff0ffff;
+      assert (address <= word 16rffffffff);
+      assert (address LE word 16rfff0ffff);
+      skip
+end
diff --git a/gcc/testsuite/algol68/execute/ln-1.a68 b/gcc/testsuite/algol68/execute/ln-1.a68
index 5c569711bb4..c5d98150382 100644
--- a/gcc/testsuite/algol68/execute/ln-1.a68
+++ b/gcc/testsuite/algol68/execute/ln-1.a68
@@ -2,7 +2,9 @@
 BEGIN REAL r = 1.0;
       LONG REAL rr = LONG 2.0;
       LONG LONG REAL rrr = LONG LONG 60.0;
+      WORD REAL w = WORD 1.0;
       ASSERT (ln (r) = 0.0);
       long ln (rr);
-      long long ln (rrr)
+      long long ln (rrr);
+      ASSERT (word ln (w) = WORD 0.0)
 END
diff --git a/gcc/testsuite/algol68/execute/log-1.a68 b/gcc/testsuite/algol68/execute/log-1.a68
index b1a8d8d11ca..efd8762d608 100644
--- a/gcc/testsuite/algol68/execute/log-1.a68
+++ b/gcc/testsuite/algol68/execute/log-1.a68
@@ -2,7 +2,9 @@
 BEGIN REAL r = 1.0;
       LONG REAL rr = LONG 2.0;
       LONG LONG REAL rrr = LONG LONG 60.0;
+      WORD REAL w = WORD 1.0;
       ASSERT (log (r) = 0.0);
       long log (rr);
-      long long log (rrr)
+      long long log (rrr);
+      ASSERT (word log (w) = WORD 0.0)
 END
diff --git a/gcc/testsuite/algol68/execute/lt-int-1.a68 b/gcc/testsuite/algol68/execute/lt-int-1.a68
index c0e93028aa3..bb41ed89f6f 100644
--- a/gcc/testsuite/algol68/execute/lt-int-1.a68
+++ b/gcc/testsuite/algol68/execute/lt-int-1.a68
@@ -2,9 +2,12 @@
 BEGIN INT i = 12;
       LONG INT ii = LONG 12, LONG LONG INT iii = LONG LONG 12;
       SHORT INT s = SHORT 12, SHORT SHORT INT ss = SHORT SHORT 12;
+      WORD INT w = WORD 12;
       ASSERT (i < 13);
       ASSERT (ii LT LONG 13);
       ASSERT (iii < LONG LONG 13);
       ASSERT (s < SHORT 13);
-      ASSERT (ss < SHORT SHORT 13)
+      ASSERT (ss < SHORT SHORT 13);
+      ASSERT (w < WORD 13);
+      ASSERT (w LT WORD 13)
 END
diff --git a/gcc/testsuite/algol68/execute/minus-int-1.a68 b/gcc/testsuite/algol68/execute/minus-int-1.a68
index abaf1229ebe..44a413ff2a9 100644
--- a/gcc/testsuite/algol68/execute/minus-int-1.a68
+++ b/gcc/testsuite/algol68/execute/minus-int-1.a68
@@ -2,9 +2,11 @@
 BEGIN INT i = 10;
       LONG INT ii = LONG 10, LONG LONG INT iii = LONG LONG 10;
       SHORT INT ss = SHORT 10, SHORT SHORT INT sss = SHORT SHORT 10;
+      WORD INT w = WORD 10;
       ASSERT (i - 2 = 8);
       ASSERT (ii - LONG 2 = LONG 8);
       ASSERT (iii - LONG LONG 2 = LONG LONG 8);
       ASSERT (ss - SHORT 2 = SHORT 8);
-      ASSERT (sss - SHORT SHORT 2 = SHORT SHORT 8)
+      ASSERT (sss - SHORT SHORT 2 = SHORT SHORT 8);
+      ASSERT (w - WORD 2 = WORD 8)
 END
diff --git a/gcc/testsuite/algol68/execute/minusab-1.a68 b/gcc/testsuite/algol68/execute/minusab-1.a68
index 0eb1661cb98..56775ecfa36 100644
--- a/gcc/testsuite/algol68/execute/minusab-1.a68
+++ b/gcc/testsuite/algol68/execute/minusab-1.a68
@@ -28,5 +28,11 @@ BEGIN BEGIN INT i := 10;
             ASSERT (i = SHORT SHORT 9);
             i MINUSAB SHORT SHORT 2;
             ASSERT (i = SHORT SHORT 7)
-      END
+      END;
+      BEGIN WORD INT i := WORD 1000;
+            i -:= WORD 100;
+            ASSERT (i = WORD 900);
+            i MINUSAB WORD 100;
+            ASSERT (i = WORD 800)
+      END;
 END
diff --git a/gcc/testsuite/algol68/execute/minusab-2.a68 b/gcc/testsuite/algol68/execute/minusab-2.a68
index 2fee755bf6e..bafaa3e68e0 100644
--- a/gcc/testsuite/algol68/execute/minusab-2.a68
+++ b/gcc/testsuite/algol68/execute/minusab-2.a68
@@ -16,5 +16,11 @@ BEGIN BEGIN REAL i := 10.0;
             ASSERT (i = LONG LONG 9000.0);
             i MINUSAB LONG LONG 1000.0;
             ASSERT (i = LONG LONG 8000.0)
+      END;
+      BEGIN WORD REAL i := WORD 1000.0;
+            i -:= WORD 100.0;
+            ASSERT (i = WORD 900.0);
+            i MINUSAB WORD 100.0;
+            ASSERT (i = WORD 800.0)
       END
 END
diff --git a/gcc/testsuite/algol68/execute/mod-int-1.a68 b/gcc/testsuite/algol68/execute/mod-int-1.a68
index 0d8cfe415e4..629e997a939 100644
--- a/gcc/testsuite/algol68/execute/mod-int-1.a68
+++ b/gcc/testsuite/algol68/execute/mod-int-1.a68
@@ -2,9 +2,12 @@
 BEGIN INT i = 10;
       LONG INT ii = LONG 10, LONG LONG INT iii = LONG LONG 10;
       SHORT INT ss = SHORT 10, SHORT SHORT INT sss = SHORT SHORT 10;
+      WORD INT w = WORD 10;
       ASSERT (i %* 3 = 1);
       ASSERT (ii %* LONG 3 = LONG 1);
       ASSERT (iii %* LONG LONG 3 = LONG LONG 1);
       ASSERT (ss %* SHORT 3 = SHORT 1);
-      ASSERT (sss MOD SHORT SHORT 3 = SHORT SHORT 1)
+      ASSERT (sss MOD SHORT SHORT 3 = SHORT SHORT 1);
+      ASSERT (w %* WORD 3 = WORD 1);
+      ASSERT (w MOD WORD 3 = WORD 1)
 END
diff --git a/gcc/testsuite/algol68/execute/modab-1.a68 b/gcc/testsuite/algol68/execute/modab-1.a68
index 41c49b08992..d2963ecfc58 100644
--- a/gcc/testsuite/algol68/execute/modab-1.a68
+++ b/gcc/testsuite/algol68/execute/modab-1.a68
@@ -6,5 +6,6 @@ BEGIN (SHORT SHORT INT i := SHORT SHORT 11; i MODAB SHORT SHORT 2; ASSERT (i = S
       (LONG INT i := LONG 11; i MODAB LONG 2; ASSERT (i = LONG 1));
       (LONG INT i := LONG 11; i %*:= LONG 2; ASSERT (i = LONG 1));
       (LONG LONG INT i := LONG LONG 11; i MODAB LONG LONG 2; ASSERT (i = LONG LONG 1));
-      (LONG LONG INT i := LONG LONG 11; i %*:= LONG LONG 2; ASSERT (i = LONG LONG 1))
+      (LONG LONG INT i := LONG LONG 11; i %*:= LONG LONG 2; ASSERT (i = LONG LONG 1));
+      (WORD INT i := WORD 11; i MODAB WORD 2; ASSERT (i = WORD 1))
 END
diff --git a/gcc/testsuite/algol68/execute/modules/module27.a68 b/gcc/testsuite/algol68/execute/modules/module27.a68
new file mode 100644
index 00000000000..c82cc8abccb
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/modules/module27.a68
@@ -0,0 +1,9 @@
+module Module27 =
+def
+    pub word bits wb = word 16rabcd;
+    pub word int wi = word 666;
+    pub word real wr = word 3.14;
+    pub word compl wc = word 1.0 I word 2.0;
+    pub word compl wc2 = word 10.0; { widening }
+    skip
+fed
diff --git a/gcc/testsuite/algol68/execute/modules/program-27.a68 b/gcc/testsuite/algol68/execute/modules/program-27.a68
new file mode 100644
index 00000000000..59d0431e6e6
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/modules/program-27.a68
@@ -0,0 +1,9 @@
+{ dg-modules "module27" }
+
+access Module27
+begin assert (wb = word 16rabcd);
+      assert (wi = word 666);
+      assert (IM wc = word 1.0 AND RE wc = word 2.0);
+      assert (IM wc2 = word 10.0 AND RE wc2 = word 0.0);
+      skip
+end
diff --git a/gcc/testsuite/algol68/execute/mult-int-1.a68 b/gcc/testsuite/algol68/execute/mult-int-1.a68
index 2da29883779..7b7e0329a11 100644
--- a/gcc/testsuite/algol68/execute/mult-int-1.a68
+++ b/gcc/testsuite/algol68/execute/mult-int-1.a68
@@ -2,9 +2,11 @@
 BEGIN INT i = 10;
       LONG INT ii = LONG 10, LONG LONG INT iii = LONG LONG 10;
       SHORT INT ss = SHORT 10, SHORT SHORT INT sss = SHORT SHORT 10;
+      WORD INT w = WORD 10;
       ASSERT (i * 2 = 20);
       ASSERT (ii * LONG 2 = LONG 20);
       ASSERT (iii * LONG LONG 2 = LONG LONG 20);
       ASSERT (ss * SHORT 2 = SHORT 20);
-      ASSERT (sss * SHORT SHORT 2 = SHORT SHORT 20)
+      ASSERT (sss * SHORT SHORT 2 = SHORT SHORT 20);
+      ASSERT (w * WORD 2 = WORD 20)
 END
diff --git a/gcc/testsuite/algol68/execute/ne-int-1.a68 b/gcc/testsuite/algol68/execute/ne-int-1.a68
index 2c26bd563c5..b2f25fe717b 100644
--- a/gcc/testsuite/algol68/execute/ne-int-1.a68
+++ b/gcc/testsuite/algol68/execute/ne-int-1.a68
@@ -2,9 +2,12 @@
 BEGIN INT i = 12;
       LONG INT ii = LONG 12, LONG LONG INT iii = LONG LONG 12;
       SHORT INT s = SHORT 12, SHORT SHORT INT ss = SHORT SHORT 12;
+      WORD INT w = WORD 12;
       ASSERT (13 /= i);
       ASSERT (ii NE LONG 13);
       ASSERT (iii /= LONG LONG 13);
       ASSERT (s /= SHORT 13);
-      ASSERT (ss /= SHORT SHORT 13)
+      ASSERT (ss /= SHORT SHORT 13);
+      ASSERT (w /= WORD 13);
+      ASSERT (w NE WORD 13)
 END
diff --git a/gcc/testsuite/algol68/execute/ne-word-bits-1.a68 b/gcc/testsuite/algol68/execute/ne-word-bits-1.a68
new file mode 100644
index 00000000000..b267a2d12ee
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/ne-word-bits-1.a68
@@ -0,0 +1,5 @@
+begin word bits address = word 16rffffffff;
+      assert (address /= word 16rffff0fff);
+      assert (address NE word 16rffff0fff);
+      skip
+end
diff --git a/gcc/testsuite/algol68/execute/neg-int-1.a68 b/gcc/testsuite/algol68/execute/neg-int-1.a68
index 0e66149ef28..f15bdc6a4d7 100644
--- a/gcc/testsuite/algol68/execute/neg-int-1.a68
+++ b/gcc/testsuite/algol68/execute/neg-int-1.a68
@@ -2,9 +2,11 @@
 BEGIN INT i = 10;
       LONG INT ii = LONG 10, LONG LONG INT iii = LONG LONG 10;
       SHORT INT ss = SHORT 10, SHORT SHORT INT sss = SHORT SHORT 10;
+      WORD INT w = WORD 10;
       ASSERT (-i = -10);
       ASSERT (-ii  = - LONG 10);
       ASSERT (-iii = - LONG LONG 10);
       ASSERT (-ss  = - SHORT 10);
-      ASSERT (-sss = - SHORT SHORT 10)
+      ASSERT (-sss = - SHORT SHORT 10);
+      ASSERT (-w   = - WORD 10)
 END
diff --git a/gcc/testsuite/algol68/execute/neg-real-1.a68 b/gcc/testsuite/algol68/execute/neg-real-1.a68
new file mode 100644
index 00000000000..2776e86e320
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/neg-real-1.a68
@@ -0,0 +1,3 @@
+begin word real w = word 1.0;
+      assert (-w = - word 1.0)
+end
diff --git a/gcc/testsuite/algol68/execute/not-word-bits-1.a68 b/gcc/testsuite/algol68/execute/not-word-bits-1.a68
new file mode 100644
index 00000000000..d17930303ae
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/not-word-bits-1.a68
@@ -0,0 +1,5 @@
+begin word bits address = word 16rfff0ffff;
+      assert (NOT address = word 16rffffffff000f0000);
+      assert (~address = word 16rffffffff000f0000);
+      skip
+end
diff --git a/gcc/testsuite/algol68/execute/odd-1.a68 b/gcc/testsuite/algol68/execute/odd-1.a68
index 893bf0479d0..7c231a86c83 100644
--- a/gcc/testsuite/algol68/execute/odd-1.a68
+++ b/gcc/testsuite/algol68/execute/odd-1.a68
@@ -4,5 +4,7 @@ BEGIN INT a = 1;
       ASSERT (ODD LONG 3);
       ASSERT (NOT ODD LONG LONG 4);
       ASSERT (ODD SHORT 3);
-      ASSERT (NOT ODD SHORT SHORT 4)
+      ASSERT (NOT ODD SHORT SHORT 4);
+      ASSERT (ODD WORD 3);
+      ASSERT (NOT ODD WORD 4)
 END
diff --git a/gcc/testsuite/algol68/execute/or-word-bits-1.a68 b/gcc/testsuite/algol68/execute/or-word-bits-1.a68
new file mode 100644
index 00000000000..a8a7f372f18
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/or-word-bits-1.a68
@@ -0,0 +1,4 @@
+begin word bits address = word 16rfff0ffff;
+      assert ((address OR word 16rff00ffff) = word 16rfff0ffff);
+      skip
+end
diff --git a/gcc/testsuite/algol68/execute/over-int-1.a68 b/gcc/testsuite/algol68/execute/over-int-1.a68
index 871effb61a0..732e5166b3b 100644
--- a/gcc/testsuite/algol68/execute/over-int-1.a68
+++ b/gcc/testsuite/algol68/execute/over-int-1.a68
@@ -2,9 +2,11 @@
 BEGIN INT i = 10;
       LONG INT ii = LONG 10, LONG LONG INT iii = LONG LONG 10;
       SHORT INT ss = SHORT 10, SHORT SHORT INT sss = SHORT SHORT 10;
+      WORD INT w = WORD 10;
       ASSERT (i % 2 = 5);
       ASSERT (ii % LONG 2 = LONG 5);
       ASSERT (iii % LONG LONG 2 = LONG LONG 5);
       ASSERT (ss % SHORT 2 = SHORT 5);
-      ASSERT (sss % SHORT SHORT 2 = SHORT SHORT 5)
+      ASSERT (sss % SHORT SHORT 2 = SHORT SHORT 5);
+      ASSERT (w % WORD 2 = WORD 5)
 END
diff --git a/gcc/testsuite/algol68/execute/overab-1.a68 b/gcc/testsuite/algol68/execute/overab-1.a68
index 8edfa1e5fab..e1eeea691c8 100644
--- a/gcc/testsuite/algol68/execute/overab-1.a68
+++ b/gcc/testsuite/algol68/execute/overab-1.a68
@@ -8,5 +8,6 @@ BEGIN (INT i := 11; i OVERAB 2; ASSERT (i = 5));
       (LONG INT i := LONG 11; i OVERAB LONG 2; ASSERT (i = LONG 5));
       (LONG INT i := LONG 11; i %:= LONG 2; ASSERT (i = LONG 5));
       (LONG LONG INT i := LONG LONG 11; i OVERAB LONG LONG 2; ASSERT (i = LONG LONG 5));
-      (LONG LONG INT i := LONG LONG 11; i %:= LONG LONG 2; ASSERT (i = LONG LONG 5))
+      (LONG LONG INT i := LONG LONG 11; i %:= LONG LONG 2; ASSERT (i = LONG LONG 5));
+      (WORD INT i := WORD 11; i %:= WORD 2; ASSERT (i = WORD 5))
 END
diff --git a/gcc/testsuite/algol68/execute/plus-int-1.a68 b/gcc/testsuite/algol68/execute/plus-int-1.a68
index 93ea00445dd..c14fb390489 100644
--- a/gcc/testsuite/algol68/execute/plus-int-1.a68
+++ b/gcc/testsuite/algol68/execute/plus-int-1.a68
@@ -2,9 +2,11 @@
 BEGIN INT i = 10;
       LONG INT ii = LONG 10, LONG LONG INT iii = LONG LONG 10;
       SHORT INT ss = SHORT 10, SHORT SHORT INT sss = SHORT SHORT 10;
+      WORD INT w = WORD 10;
       ASSERT (i + 2 = 12);
       ASSERT (ii + LONG 2 = LONG 12);
       ASSERT (iii + LONG LONG 2 = LONG LONG 12);
       ASSERT (ss + SHORT 2 = SHORT 12);
-      ASSERT (sss + SHORT SHORT 2 = SHORT SHORT 12)
+      ASSERT (sss + SHORT SHORT 2 = SHORT SHORT 12);
+      ASSERT (w + WORD 2 = WORD 12)
 END
diff --git a/gcc/testsuite/algol68/execute/plusab-1.a68 b/gcc/testsuite/algol68/execute/plusab-1.a68
index 48865f8a1fe..d1535f6bd76 100644
--- a/gcc/testsuite/algol68/execute/plusab-1.a68
+++ b/gcc/testsuite/algol68/execute/plusab-1.a68
@@ -25,10 +25,18 @@ BEGIN BEGIN INT i := 10;
             i PLUSAB LONG 100;
             ASSERT (i = LONG 1200)
       END;
+            
       BEGIN LONG LONG INT i := LONG LONG 10000;
             i +:= LONG LONG 1000;
             ASSERT (i = LONG LONG 11000);
             i PLUSAB LONG LONG 1000;
             ASSERT (i = LONG LONG 12000)
-      END
+      END;
+
+      BEGIN WORD INT i := WORD 1000;
+            i +:= WORD 100;
+            ASSERT (i = WORD 1100);
+            i PLUSAB WORD 100;
+            ASSERT (i = WORD 1200)
+      END;
 END
diff --git a/gcc/testsuite/algol68/execute/plusab-2.a68 b/gcc/testsuite/algol68/execute/plusab-2.a68
index 6db46864d8a..4522cb6acc2 100644
--- a/gcc/testsuite/algol68/execute/plusab-2.a68
+++ b/gcc/testsuite/algol68/execute/plusab-2.a68
@@ -16,5 +16,11 @@ BEGIN BEGIN REAL i := 10.0;
             ASSERT (i > LONG LONG 10999.9);
             i PLUSAB LONG LONG 1000.0;
             ASSERT (i > LONG LONG 11999.9)
+      END;
+            BEGIN WORD REAL i := WORD 1000.0;
+            i +:= WORD 100.0;
+            ASSERT (i > WORD 1099.9);
+            i PLUSAB WORD 100.0;
+            ASSERT (i > WORD 1199.9)
       END
 END
diff --git a/gcc/testsuite/algol68/execute/pow-int-1.a68 b/gcc/testsuite/algol68/execute/pow-int-1.a68
index 7d929d714ff..92e90189f01 100644
--- a/gcc/testsuite/algol68/execute/pow-int-1.a68
+++ b/gcc/testsuite/algol68/execute/pow-int-1.a68
@@ -2,9 +2,12 @@
 BEGIN INT i = 2;
       LONG INT ii = LONG 2, LONG LONG INT iii = LONG LONG 2;
       SHORT INT ss = SHORT 2, SHORT SHORT INT sss = SHORT SHORT 2;
+      WORD INT w = WORD 2;
       ASSERT (i ** 2 = 4);
       ASSERT (ii ** 2 = LONG 4);
       ASSERT (iii ** 2 = LONG LONG 4);
       ASSERT (ss ** 2 = SHORT 4);
-      ASSERT (sss ** 2 = SHORT SHORT 4)
+      ASSERT (sss ** 2 = SHORT SHORT 4);
+      ASSERT (w ** 2 = WORD 4);
+      ASSERT (w ^ 2 = WORD 4)
 END
diff --git a/gcc/testsuite/algol68/execute/pow-real-1.a68 b/gcc/testsuite/algol68/execute/pow-real-1.a68
index 81028706485..de8de77093f 100644
--- a/gcc/testsuite/algol68/execute/pow-real-1.a68
+++ b/gcc/testsuite/algol68/execute/pow-real-1.a68
@@ -1,6 +1,8 @@
 # { dg-options "-fstropping=upper" }  #
 BEGIN REAL r0 = 2.0; LONG REAL rr0 = LONG 2.0; LONG LONG REAL rrr0 = LONG LONG 2.0;
       REAL r1 = r0 ^ 2; REAL r2 = r0 ^ 3.0;
+      WORD REAL w0 = WORD 2.0;
+      WORD REAL w1 = w0 ^ 2; WORD REAL w2 = w0 ^ WORD 3.0;
       LONG REAL rr1 = rr0 ^ LONG 2; LONG REAL rr2 = rr0 ^ LONG 3.0;
       LONG LONG REAL rrr1 = rrr0 ^ LONG LONG 2; LONG LONG REAL rrr2 = rrr0 ^ LONG LONG 3.0;
       SKIP
diff --git a/gcc/testsuite/algol68/execute/re-im-1.a68 b/gcc/testsuite/algol68/execute/re-im-1.a68
index 7801b769057..c3425a79019 100644
--- a/gcc/testsuite/algol68/execute/re-im-1.a68
+++ b/gcc/testsuite/algol68/execute/re-im-1.a68
@@ -4,5 +4,7 @@ BEGIN COMPL z = 4.0I5.0;
       LONG COMPL zz = LONG 4.0 I LONG 6.0;
       ASSERT (RE zz = LONG 4.0 AND IM zz = LONG 6.0);
       LONG LONG COMPL zzz = LONG LONG 4.0 I LONG LONG 7.0;
-      ASSERT (RE zzz = LONG LONG 4.0 AND IM zzz = LONG LONG 7.0)
+      ASSERT (RE zzz = LONG LONG 4.0 AND IM zzz = LONG LONG 7.0);
+      WORD COMPL w = WORD 4.0 I WORD 7.0;
+      ASSERT (RE w = WORD 4.0 AND IM w = WORD 7.0)
 END
diff --git a/gcc/testsuite/algol68/execute/round-1.a68 b/gcc/testsuite/algol68/execute/round-1.a68
index 632e3822332..01dfe5c2665 100644
--- a/gcc/testsuite/algol68/execute/round-1.a68
+++ b/gcc/testsuite/algol68/execute/round-1.a68
@@ -2,7 +2,9 @@
 BEGIN REAL x = 3.14, y = 3.80;
       LONG REAL xx = LONG 3.14, yy = LONG 3.80;
       LONG LONG REAL xxx = LONG LONG 3.14, yyy = LONG LONG 3.80;
+      WORD REAL wx = WORD 3.14, wy = WORD 3.80;
       ASSERT (ROUND x = 3 AND ROUND y = 4);
       ASSERT (ROUND xx = LONG 3 AND ROUND yy = LONG 4);
-      ASSERT (ROUND xxx = LONG LONG 3 AND ROUND yyy = LONG LONG 4)
+      ASSERT (ROUND xxx = LONG LONG 3 AND ROUND yyy = LONG LONG 4);
+      ASSERT (ROUND wx = WORD 3 AND ROUND wy = WORD 4)
 END
diff --git a/gcc/testsuite/algol68/execute/sign-int-1.a68 b/gcc/testsuite/algol68/execute/sign-int-1.a68
index 3c6d317e063..0d226ccb7fd 100644
--- a/gcc/testsuite/algol68/execute/sign-int-1.a68
+++ b/gcc/testsuite/algol68/execute/sign-int-1.a68
@@ -9,6 +9,7 @@ BEGIN INT zero = 0;
       SHORT SHORT INT short short ten = SHORT SHORT 10;
       LONG INT long ten = LONG 10;
       LONG LONG INT long long ten = LONG LONG 10;
+      WORD INT word ten = WORD 10;
       ASSERT (SIGN zero = 0);
       ASSERT (SIGN short zero = 0);
       ASSERT (SIGN short short zero = 0);
@@ -23,6 +24,8 @@ BEGIN INT zero = 0;
       ASSERT (SIGN -short ten = -1);
       ASSERT (SIGN -short short ten = -1);
       ASSERT (SIGN -long ten = -1);
-      ASSERT (SIGN -long long ten = -1)
+      ASSERT (SIGN -long long ten = -1);
+      ASSERT (SIGN word ten = 1);
+      ASSERT (SIGN -word ten = -1)
 END
 
diff --git a/gcc/testsuite/algol68/execute/sign-real-1.a68 b/gcc/testsuite/algol68/execute/sign-real-1.a68
index f15fe963c23..bf150136490 100644
--- a/gcc/testsuite/algol68/execute/sign-real-1.a68
+++ b/gcc/testsuite/algol68/execute/sign-real-1.a68
@@ -5,6 +5,7 @@ BEGIN REAL zero = 0.0;
       REAL ten = 10.0;
       LONG REAL long ten = LONG 10.0;
       LONG LONG REAL long long ten = LONG LONG 10.0;
+      WORD REAL word ten = WORD 10.0;
       ASSERT (SIGN zero = 0);
       ASSERT (SIGN long zero = 0);
       ASSERT (SIGN long long zero = 0);
@@ -13,5 +14,7 @@ BEGIN REAL zero = 0.0;
       ASSERT (SIGN long long ten = 1);
       ASSERT (SIGN -ten = -1);
       ASSERT (SIGN -long ten = -1);
-      ASSERT (SIGN -long long ten = -1)
+      ASSERT (SIGN -long long ten = -1);
+      ASSERT (SIGN word ten = 1);
+      ASSERT (SIGN -word ten = -1)
 END
diff --git a/gcc/testsuite/algol68/execute/sin-1.a68 b/gcc/testsuite/algol68/execute/sin-1.a68
index aac74f98b02..4df4732fc1b 100644
--- a/gcc/testsuite/algol68/execute/sin-1.a68
+++ b/gcc/testsuite/algol68/execute/sin-1.a68
@@ -2,7 +2,9 @@
 BEGIN REAL r = 0.0;
       LONG REAL rr = LONG 45.0;
       LONG LONG REAL rrr = LONG LONG 60.0;
+      WORD REAL w = WORD 0.0;
       ASSERT (sin (r) = 0.0);
       long sin (rr);
-      long long sin (rrr)
+      long long sin (rrr);
+      ASSERT (word sin (w) = WORD 0.0)
 END
diff --git a/gcc/testsuite/algol68/execute/sqrt-1.a68 b/gcc/testsuite/algol68/execute/sqrt-1.a68
index 725a7727112..2284c975df1 100644
--- a/gcc/testsuite/algol68/execute/sqrt-1.a68
+++ b/gcc/testsuite/algol68/execute/sqrt-1.a68
@@ -2,7 +2,9 @@
 BEGIN REAL r = 100.0;
       LONG REAL rr = LONG 25.0;
       LONG LONG REAL rrr = LONG LONG 25.0;
+      WORD REAL w = WORD 25.0;
       ASSERT (sqrt (r) = 10.0);
       ASSERT (long sqrt (rr) = LONG 5.0);
-      ASSERT (long long sqrt (rrr) = LONG LONG 5.0)
+      ASSERT (long long sqrt (rrr) = LONG LONG 5.0);
+      ASSERT (word sqrt (w) = WORD 5.0)
 END
diff --git a/gcc/testsuite/algol68/execute/tan-1.a68 b/gcc/testsuite/algol68/execute/tan-1.a68
index a7aede69749..5abc7021659 100644
--- a/gcc/testsuite/algol68/execute/tan-1.a68
+++ b/gcc/testsuite/algol68/execute/tan-1.a68
@@ -2,7 +2,9 @@
 BEGIN REAL r = 0.0;
       LONG REAL rr = LONG 50.0;
       LONG LONG REAL rrr = LONG LONG 50.0;
+      WORD REAL w = WORD 0.0;
       ASSERT (tan (r) = 0.0);
       long tan (rr);
-      long long tan (rrr)
+      long long tan (rrr);
+      ASSERT (word tan (w) = WORD 0.0)
 END
diff --git a/gcc/testsuite/algol68/execute/timesab-1.a68 b/gcc/testsuite/algol68/execute/timesab-1.a68
new file mode 100644
index 00000000000..eea30bd0fff
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/timesab-1.a68
@@ -0,0 +1,37 @@
+begin begin int i := 10;
+            i *:= 3;
+            assert (i = 30);
+            i TIMESAB 2;
+            assert (i = 60)
+      end;
+      begin short short int i := short short 10;
+            i *:= short short 3;
+            assert (i = short short 30);
+            i TIMESAB short short 2;
+            assert (i = short short 60)
+      end;
+      begin short int i := short 10;
+            i *:= short 3;
+            assert (i = short 30);
+            i TIMESAB short 2;
+            assert (i = short 60)
+      end;
+      begin long int i := long 10;
+            i *:= long 3;
+            assert (i = long 30);
+            i TIMESAB long 2;
+            assert (i = long 60)
+      end;
+      begin long long int i := long long 10;
+            i *:= long long 3;
+            assert (i = long long 30);
+            i TIMESAB long long 2;
+            assert (i = long long 60)
+      end;
+      begin word int i := word 10;
+            i *:= word 3;
+            assert (i = word 30);
+            i TIMESAB word 2;
+            assert (i = word 60)
+      end
+end
diff --git a/gcc/testsuite/algol68/execute/widening-compl-1.a68 b/gcc/testsuite/algol68/execute/widening-compl-1.a68
new file mode 100644
index 00000000000..330a022f5dc
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/widening-compl-1.a68
@@ -0,0 +1,4 @@
+begin word compl wc2 = word 10.0; { widening }
+      assert (IM wc2 = word 0.0 AND RE wc2 = word 10.0);
+      skip
+end
diff --git a/gcc/testsuite/algol68/execute/word-bits-1.a68 b/gcc/testsuite/algol68/execute/word-bits-1.a68
new file mode 100644
index 00000000000..90939c52a0b
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/word-bits-1.a68
@@ -0,0 +1,4 @@
+begin word bits address = word 16rffffffff;
+      assert (address = word 16rffffffff);
+      skip
+end
diff --git a/gcc/testsuite/algol68/execute/word-bits-shift-1.a68 b/gcc/testsuite/algol68/execute/word-bits-shift-1.a68
new file mode 100644
index 00000000000..91b543f3481
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/word-bits-shift-1.a68
@@ -0,0 +1,7 @@
+begin word bits address = word 16rfff0ffff;
+      assert (address SHL 4 = word 16rfff0ffff0);
+      assert (address UP 4 = word 16rfff0ffff0);
+      assert (address SHR 4 = word 16rfff0fff);
+      assert (address DOWN 4 = word 16rfff0fff);
+      skip
+end
diff --git a/gcc/testsuite/algol68/execute/xor-bits-1.a68 b/gcc/testsuite/algol68/execute/xor-bits-1.a68
index f651abae9b3..050fe5c47f5 100644
--- a/gcc/testsuite/algol68/execute/xor-bits-1.a68
+++ b/gcc/testsuite/algol68/execute/xor-bits-1.a68
@@ -15,7 +15,7 @@ BEGIN BITS b = 16rf0f0;
       SHORT SHORT BITS sss = SHORT SHORT 16rf0;
       ASSERT ((sss XOR SHORT SHORT 16r0f) = SHORT SHORT 16rff);
       ASSERT ((sss XOR SHORT SHORT 16rff) = SHORT SHORT 16r0f);
-      WORD BITS bb = WORD 16rf0f0;
-      ASSERT ((bb XOR WORD 16r0f0f) = WORD 16rffff);
-      ASSERT ((bb XOR WORD 16r00ff) = WORD 16rf00f);
+      WORD BITS ww = WORD 16rf0f0;
+      ASSERT ((ww XOR WORD 16r0f0f) = WORD 16rffff);
+      ASSERT ((ww XOR WORD 16r00ff) = WORD 16rf00f);
 END
-- 
2.39.5



More information about the Algol68 mailing list