Landing: d7fa48a8500b
Project / Subsystem
gcc / gcc
Date
2026-09-16
Author
Jakub Jelinek
Commit
d7fa48a8500bcfaa1cf4ae3f917c22aa6ec7c75f
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc
- patch_id
- —
- commit_hash
- d7fa48a8500bcfaa1cf4ae3f917c22aa6ec7c75f
- source_type
- github
- headline
- Fix integer promotion of bit-precise bit-fields.
- tldr
- Corrects miscompilation of bit-precise bit-fields cast to compatible types.
- author
- Jakub Jelinek
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • c
- • compiler
- • type system
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-16T00:00:00.000Z
This change fixes a miscompilation issue in the C front-end related to bit-precise bit-fields. When a bit-precise integer bit-field is explicitly cast to a non-cv-qualified bit-precise integer of the same signedness and precision, the compiler was incorrectly applying integer promotions. The fix ensures that such casts are correctly handled by distinguishing them from direct use of the bit-field, preventing erroneous promotions. New test cases are added to verify the fix.