Landing: 3754582630fa
Project / Subsystem
gcc / range-op-float
Date
2026-07-30
Author
Jakub Jelinek
Commit
3754582630fa1eeff44a39f656ba0c7db6e58d0d
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- range-op-float
- patch_id
- —
- commit_hash
- 3754582630fa1eeff44a39f656ba0c7db6e58d0d
- source_type
- github
- headline
- range-op-float: Fix inf handling in float to float cast.
- tldr
- Correctly handles infinity in reverse narrowing float-to-float casts, fixing miscompilations.
- author
- Jakub Jelinek
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • float
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-30T00:00:00.000Z
This change corrects how GCC handles infinity in reverse narrowing floating-point to floating-point casts. Previously, specific infinity range representations like [-inf, -inf] were not widened correctly, leading to miscompilations for certain conversions (e.g., double to float). The fix ensures these ranges are handled more precisely, especially when dealing with the limits of representable numbers.