Landing: 5d00ecd71b59
Project / Subsystem
gcc / gcc/match
Date
2026-09-12
Author
Andrea Pinski
Commit
5d00ecd71b59b6c62748c014c6fa54180602192c
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc/match
- patch_id
- —
- commit_hash
- 5d00ecd71b59b6c62748c014c6fa54180602192c
- source_type
- github
- headline
- Fix two_value boundary condition for unsigned integer overflow.
- tldr
- Correctly handles boundary conditions for unsigned integers in `two_value` to prevent overflow.
- author
- Andrea Pinski
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • integer overflow
- • PR127358
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-12T00:00:00.000Z
A recent change that removed the preference for unsigned types in two_value caused incorrect code generation for boundary conditions involving INT_MAX and INT_MAX+1. This commit reintroduces the preference for unsigned types when precisions match, ensuring that subtractions are performed using unsigned arithmetic and avoiding undefined overflow.