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

cfgexpand: Check partition MEM_EXPRs once the RTL of parameters is final

Moved an internal check in cfgexpand to prevent an ICE during parameter RTL restoration.

An internal verification check, verify_partition_mem_exprs, within the cfgexpand pass has been rescheduled to run only after the RTL for parameter and result default definitions is finalized. This adjustment prevents a false positive ICE that occurred due to temporary mismatches in MEM_EXPR assignments between parameter/result declarations and temporary variables during the out-of-SSA restoration process.

In Details

The verify_partition_mem_exprs checker in cfgexpand.cc was being invoked prematurely, before the RTL of PARM_DECL and RESULT_DECL default definitions was fully restored by adjust_one_expanded_partition_var. This temporary state, where a partition might hold a MEM_EXPR from a temporary variable rather than the parameter/result, caused the checker to abort with an ICE. The fix delays this check until after the restoration loop completes.

For Context
cfgexpand
A GCC compiler pass responsible for expanding the Control Flow Graph (CFG) and resolving various intermediate representations, including memory expressions.
MEM_EXPR
A GCC intermediate representation that denotes a memory reference, typically comprising a base address and an offset.
RTL
Register Transfer Language. GCC's internal representation of code, used after the initial parsing and optimization stages, before final machine code generation.
PARM_DECL
A declaration representing a function parameter in GCC's internal data structures.
RESULT_DECL
A declaration representing the return value of a function in GCC's internal data structures.
Filed Under: cfgexpandICEbugfixgcc