Landing: 5ad62c2ea006
Project / Subsystem
gcc / gcc/ipa
Date
2026-08-25
Author
Eric Botcazou
Commit
5ad62c2ea00682b904349314bcdc05b9b6e7052a
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc/ipa
- patch_id
- —
- commit_hash
- 5ad62c2ea00682b904349314bcdc05b9b6e7052a
- source_type
- github
- headline
- Fix optimization of up-level reference to array with negative low bound
- tldr
- Corrects optimization pass to properly handle array references with negative lower bounds.
- author
- Eric Botcazou
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • ipa
- • array
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-25T00:00:00.000Z
An optimization pass (DSE) was incorrectly deleting stores to up-level array references that had negative lower bounds. This happened because IPA modref analysis inaccurately flagged these stores as dead. The issue stemmed from get_ref_base_and_extent incorrectly shrinking the maximum size of such arrays, causing the loss of elements. This fix ensures that array references with negative low bounds are handled correctly, preventing incorrect dead store elimination.