Landing: d28460bfcff8
Project / Subsystem
gcc / gcc
Date
2026-05-08
Author
Roger Sayle
Commit
d28460bfcff89064d1a991f4532337b997d7e102
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc
- patch_id
- —
- commit_hash
- d28460bfcff89064d1a991f4532337b997d7e102
- source_type
- github
- headline
- Fixed passing padded constant structs in registers on big-endian targets.
- tldr
- Corrects how GCC places padding bytes within constant structs passed in registers on big-endian architectures, resolving a code generation bug.
- author
- Roger Sayle
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • code generation
- • big-endian
- • structs
- • bugfix
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-08T00:00:00.000Z
This commit fixes a code generation bug affecting big-endian targets when passing constant structs in registers. The compiler was incorrectly placing padding within structs narrower than a word size, leading to incorrect data alignment. The fix uses a right shift to correctly align the structure and padding. A new test case validates the fix on PowerPC.