Landing: a202c707bea3

Project / Subsystem

gcc / sra

Date

2026-05-12

Author

Martin Jambor

Commit

a202c707bea3ff021b44aa00c0570798a30aae31

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
sra
patch_id
commit_hash
a202c707bea3ff021b44aa00c0570798a30aae31
source_type
github
headline
SRA: Fix build_user_friendly_ref_for_offset for bit-fields
tldr
The compiler now correctly handles bit-field propagation with Scalar Replacement of Aggregates (SRA), improving warning accuracy and fixing a verification issu…
author
Martin Jambor
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • optimization
  • sra
  • bit-fields
  • gcc
discussion_id_link
github:gcc-mirror/gcc#117217
bugzilla_pr
date
2026-05-12T00:00:00.000Z

This commit fixes an issue in GCC’s Scalar Replacement of Aggregates (SRA) optimization when propagating bit-field accesses across assignments. The build_user_friendly_ref_for_offset function is updated to accurately represent the expression of new accesses, ensuring that warnings generated are correct. This resolves a discrepancy between the recorded size of the new access and the size reported by get_ref_base_and_extent, fixing a verifier error.