GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
modula2

Fix ICE for Modula-2 aggregate records with array fields

Compiles Modula-2 code with aggregate records containing array fields, resolving an ICE.

A compiler internal error (ICE) occurred when compiling Modula-2 code that used aggregate records with array fields. This patch adds a check for a null symbol type during type building, preventing the error. The compiler now correctly handles these structures and generates an error message if a type name is missing.

In Details

The M2Quads.mod module's BuildConstructor function previously mishandled NulSym types when constructing aggregate types with array fields. This commit adds a check for NulSym in PCSymBuild.mod's WalkConvert, preventing the ICE and ensuring proper error reporting for missing type names.

For Context
ICE
Internal Compiler Error. A severe error that occurs within the compiler itself, typically indicating a bug in the compiler's logic.
aggregate record
In Modula-2, a record type that groups together variables of potentially different types under a single name.
NulSym
A symbol type representing an unknown or null symbol within the Modula-2 compiler's internal representation.
Filed Under: modula2compiler bug