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

cfgrtl: Fix bootstrap issue in RTL checking

Corrects a bug in control flow graph RTL checking that caused bootstrap failures on x86_64 and i686 platforms.

A recent change in control flow graph (CFG) representation was found to break the build bootstrap process for x86_64-linux and i686-linux targets. This commit reverts that problematic change by correctly handling LABEL_NUSES decrements and increments when redirecting control flow edges. The fix ensures that the RTL checking mechanism functions as expected during compilation.

In Details

The force_nonfallthru_and_redirect function in cfgrtl.cc was modified to use label_ref_label() when accessing ASM_OPERANDS_LABEL before updating the destination basic block. This change, intended to fix an issue with note being used uninitialized, inadvertently caused LABEL_NUSES counts to be updated incorrectly, breaking the RTL checking bootstrap on some targets. The fix re-applies the correct LABEL_NUSES logic.

For Context
RTL
Register Transfer Language, an intermediate representation used by GCC to represent code before it is optimized and translated into machine code.
CFG
Control Flow Graph, a representation of all execution paths through a program or subroutine. It is used by compilers to analyze and optimize code.
Bootstrap
The process of compiling a compiler using an earlier version of itself. This is a crucial step in ensuring the integrity and correctness of the compiler toolchain.
LABEL_NUSES
A macro or field in GCC's RTL structure that tracks the number of references or uses of a label.
Filed Under: buildx86rtlcompiler bug