GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
modula2

PR modula2/128891: ICE converting REAL32 to REAL64

Fixes compiler crash when converting between Modula-2 real types.

This patch resolves an Internal Compiler Error (ICE) occurring during conversions between Modula-2’s REAL32 and REAL64 types. It introduces a new helper function, IsRealGCC, to correctly identify GCC’s supported real types, differentiating them from strict ISO Modula-2 types. This change ensures accurate type handling during these conversions.

In Details

An ICE was triggered in the Modula-2 front-end when converting between REAL32 and REAL64 due to incorrect type checking. The existing IsRealType function strictly adhered to ISO Modula-2 standards, failing to recognize GCC's extended or sized real types. This commit introduces IsRealGCC to identify all target-supported GCC real types, enabling correct coercion and conversion logic, thus fixing the ICE and related issues in M2Base.mod and other frontend modules.

For Context
ICE
Internal Compiler Error. A crash within the compiler itself, typically due to an unexpected internal state or bug, rather than an issue with the user's code.
REAL32
A floating-point data type representing single-precision real numbers, typically 32 bits.
REAL64
A floating-point data type representing double-precision real numbers, typically 64 bits.
Modula-2
A procedural programming language designed by Niklaus Wirth, emphasizing modularity and strong typing.
Filed Under: modula2compiler-errortype-conversion