GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc

Fixes ICE in D compiler due to forward reference of nested struct.

Avoids an internal compiler error in the D compiler when a forward reference changes the type mode of an enclosing struct.

Fixes an internal compiler error in the D compiler that occurred when a forward reference to a nested struct changed the type mode of its enclosing struct. The fix involves setting TREE_ADDRESSABLE early and moving mode setting and propagation to finish_aggregate_mode and finish_aggregate_type, respectively.

In Details

The ICE in convert_move arises from a forward reference of a nested struct altering the TYPE_MODE of its enclosing struct. The fix sets TREE_ADDRESSABLE early and defers mode setting to finish_aggregate_mode and finish_aggregate_type in types.cc.

For Context

This commit addresses a bug in the GCC compiler's D language front-end. Specifically, it fixes an internal compiler error (ICE) that could occur when dealing with nested structures and forward references. Forward references happen when a type is used before it has been fully defined. The fix ensures proper handling of type information in these cases, preventing the compiler from crashing.

Filed Under: dcompilerbugfix