Landing: ea962c82c1d8

Project / Subsystem

gcc / gcc

Date

2026-06-08

Author

Jakub Jelinek

Commit

ea962c82c1d886aea6ccee81c4ba3a4a3fb7ed85

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc
patch_id
commit_hash
ea962c82c1d886aea6ccee81c4ba3a4a3fb7ed85
source_type
github
headline
C: Fix up ICE with __builtin_{bswap,bitreverse}g
tldr
GCC no longer crashes when processing `__builtin_bswapg` and `__builtin_bitreverseg` with non-folded arguments.
author
Jakub Jelinek
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • c
  • bugfix
  • builtins
discussion_id_link
bugzilla_pr
date
2026-06-08T00:00:00.000Z

This commit resolves an Internal Compiler Error (ICE) that occurred in GCC when processing __builtin_bswapg and __builtin_bitreverseg builtins with arguments that hadn’t been fully folded. Previously, the compiler would crash because it expected a folded argument before calling fold_build_builtin_bswapg_bitreverseg. The fix now ensures that c_fully_fold is called on the argument before the builtin construction, preventing the ICE and improving compiler stability for C code using these operations.