SATURDAY, SEPTEMBER 5, 2026
gccrs
gccrs: Remove unnecessary `rust_unreachable` from `grs_langhook_pushdecl`
gccrs removes `rust_unreachable` to fix an ICE on aarch64 builds.
An unreachable macro call in grs_langhook_pushdecl caused an internal compiler error (ICE) on aarch64 targets after a change to initialize target machine builtins. This commit removes the rust_unreachable call, resolving the ICE and allowing builds to complete successfully.
In Details
The grs_langhook_pushdecl function in gccrs was found to trigger an ICE on aarch64 targets due to an interaction with targetm.init_builtins(). The rust_unreachable() macro, intended to signal impossible code paths, was being invoked incorrectly. This change removes the macro call, resolving the spurious ICE.
For Context
- gccrs
- The GCC frontend for the Rust programming language. It translates Rust code into GCC's internal representation (GIMPLE) for optimization and code generation.
- ICE
- Internal Compiler Error. A condition where the compiler encounters an unrecoverable error during its own processing, usually indicating a bug in the compiler itself.
- aarch64
- The 64-bit ARM architecture. Compilers often need target-specific code to handle differences between architectures.
- Builtins
- Built-in functions provided by a compiler that often map to specific machine instructions or perform highly optimized operations.
targetm.init_builtins()likely initializes these for a given target architecture.