Closed Spivoxity closed 5 years ago
The problem lies in bit_item(gcmap.ml), where the compiler tries to reduce an immense range to a bitmap. It's going to fail, but if the array is large enough, just computing the range will lead to a stack overflow.
Workaround -- allocate the array dynamically:
MODULE tExp;
CONST MAXWORD = 500000;
TYPE
Exp = POINTER TO ExpTree;
ExpTree = RECORD value : INTEGER END;
VAR exp: POINTER TO ARRAY OF Exp;
BEGIN
NEW(exp, MAXWORD)
END tExp.
Fixed in 3.0.4
The compiler crashes with a stack overflow when trying to declare a large global array of pointers.