Landing: bfedd20faaab

Project / Subsystem

gcc / gcc

Date

2026-09-10

Author

Josef Melcr

Commit

bfedd20faaab8ee827db47c1b2e3f879fd8ba808

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc
patch_id
—
commit_hash
bfedd20faaab8ee827db47c1b2e3f879fd8ba808
source_type
github
headline
Downgrade [[assume]] intrinsic from const to pure
tldr
Marks the [[assume]] intrinsic as 'pure' instead of 'const' for more accurate analysis.
author
Josef Melcr
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • analysis
discussion_id_link
—
bugzilla_pr
—
date
2026-09-10T00:00:00.000Z

The internal function __builtin_assume (marked with IFN_ASSUME) was incorrectly marked as const, implying it had no side effects and did not read global memory. This commit changes its attribute to pure, which allows reading global memory. This corrects analysis inaccuracies, especially when the assume body references fields of structures, even though the body itself is not executed.