This patch corrects an error message relating to a variable of
a SET type. The bugfix is not to skip over set types (in
GetLowestType).
gcc/m2/ChangeLog:
PR modula2/114380
* gm2-compiler/SymbolTable.mod (GetLowestType): Do not
skip over a set type, but return sym.
gcc/testsuite/ChangeLog:
PR modula2/114380
* gm2/pim/fail/badset7.mod: New test.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
SubrangeSym : type := Subrange.Type |
ArraySym : type := Array.Type |
SubscriptSym : type := Subscript.Type |
- SetSym : type := Set.Type |
+ SetSym : type := Sym | (* Stop at the set type. *)
UnboundedSym : type := Unbounded.Type |
UndefinedSym : type := NulSym |
DummySym : type := NulSym
--- /dev/null
+MODULE badset7 ;
+
+FROM SYSTEM IMPORT WORD ;
+
+PROCEDURE func () : WORD ;
+BEGIN
+ RETURN WORD (0)
+END func ;
+
+VAR
+ b: BITSET ;
+BEGIN
+ b := func () - {6..31}
+END badset7.