diff options
Diffstat (limited to 'gcc/m2/gm2-compiler/M2Check.mod')
-rw-r--r-- | gcc/m2/gm2-compiler/M2Check.mod | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/gcc/m2/gm2-compiler/M2Check.mod b/gcc/m2/gm2-compiler/M2Check.mod index 528c51d..d86ef8e 100644 --- a/gcc/m2/gm2-compiler/M2Check.mod +++ b/gcc/m2/gm2-compiler/M2Check.mod @@ -803,7 +803,12 @@ BEGIN THEN typeRight := GetDType (right) ; typeLeft := GetDType (left) ; - RETURN doCheckPair (result, tinfo, typeLeft, typeRight) + IF IsZRCType (typeLeft) AND IsUnbounded (typeRight) + THEN + RETURN false + ELSE + RETURN doCheckPair (result, tinfo, typeLeft, typeRight) + END END ; RETURN result END checkConstMeta ; @@ -868,7 +873,19 @@ END checkSubrangeTypeEquivalence ; (* - isZRC - + IsZRCType - return TRUE if type is a ZType, RType or a CType. +*) + +PROCEDURE IsZRCType (type: CARDINAL) : BOOLEAN ; +BEGIN + RETURN (type = CType) OR (type = ZType) OR (type = RType) +END IsZRCType ; + + +(* + isZRC - return TRUE if zrc is a ZType, RType or a CType + and sym is either a complex type when zrc = CType + or is not a composite type when zrc is a RType or ZType. *) PROCEDURE isZRC (zrc, sym: CARDINAL) : BOOLEAN ; |