Landing: 73680e030d24

Project / Subsystem

gcc / ipa

Date

2026-09-02

Author

Richard Biener

Commit

73680e030d24d966121f608d7611848d75ae8045

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
ipa
patch_id
—
commit_hash
73680e030d24d966121f608d7611848d75ae8045
source_type
github
headline
IPA: Require matching precision for VIEW_CONVERT_EXPR with known values
tldr
IPA: Fixes incorrect bitfield interpretation on big-endian targets by ensuring type precision matches for VIEW_CONVERT_EXPR.
author
Richard Biener
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • ipa
  • • endianness
discussion_id_link
—
bugzilla_pr
—
date
2026-09-02T00:00:00.000Z

This commit addresses an issue in the IPA pass where VIEW_CONVERT_EXPR was folding aggregate constants with differing type precisions. When a bit-field and its containing byte had the same TYPE_SIZE but different TYPE_PRECISION, the conversion could lead to incorrect values, especially on big-endian systems. The change requires matching precision between the aggregate constant and the condition’s type, preventing misinterpretation and ensuring correct predicate evaluation.