mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-01 22:05:08 +00:00
f118640d86
lines, since the WORTHLESS, BROKEN new version of patch ignores them.
38 lines
1.4 KiB
Plaintext
38 lines
1.4 KiB
Plaintext
Bug fix from SRC:
|
|
bug assigning arrays
|
|
|
|
This patch applies to all platforms.
|
|
|
|
The Modula-3 language definition says that it is possible to assign
|
|
one array to another if they have the same shape. There is a bug
|
|
in the compiler front-end that causes the compiler to report that
|
|
two array types are not assignable if they have different base
|
|
indices, even if they have the same size.
|
|
|
|
--- m3/m3front/src/types/ArrayType.m3.orig Tue May 23 15:24:27 1995
|
|
+++ m3/m3front/src/types/ArrayType.m3 Mon Sep 30 11:12:31 1996
|
|
@@ -286,7 +286,9 @@
|
|
a := Reduce (ta); b := Reduce (tb);
|
|
IF (a = NIL) OR (b = NIL) THEN EXIT END;
|
|
IF (a.index # b.index) THEN
|
|
- IF Type.Number (a.index) # Type.Number (b.index) THEN RETURN FALSE END;
|
|
+ IF NOT TInt.EQ (Type.Number (a.index), Type.Number (b.index)) THEN
|
|
+ RETURN FALSE
|
|
+ END;
|
|
END;
|
|
ta := a.element;
|
|
tb := b.element;
|
|
--- m3/m3front/src/types/OpenArrayType.m3.orig Tue May 23 15:24:22 1995
|
|
+++ m3/m3front/src/types/OpenArrayType.m3 Mon Sep 30 11:13:12 1996
|
|
@@ -188,7 +188,9 @@
|
|
|
|
(* peel off the fixed dimensions as long as the sizes are equal *)
|
|
WHILE ArrayType.Split (ta, ia, ea) AND ArrayType.Split (tb, ib, eb) DO
|
|
- IF Type.Number (ia) # Type.Number (ib) THEN RETURN FALSE END;
|
|
+ IF NOT TInt.EQ (Type.Number (ia), Type.Number (ib)) THEN
|
|
+ RETURN FALSE
|
|
+ END;
|
|
ta := ea;
|
|
tb := eb;
|
|
END;
|