Landing: 255207b2ce61

Project / Subsystem

gcc / gcc/range-op-float

Date

2026-08-07

Author

Jakub Jelinek

Commit

255207b2ce6168cd9620980d448dc23e2488de7f

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc/range-op-float
patch_id
—
commit_hash
255207b2ce6168cd9620980d448dc23e2488de7f
source_type
github
headline
Fix float_widen_lhs_range for float range operations
tldr
Corrected float range widening to prevent overflows and ensure valid range calculations in floating-point operations.
author
Jakub Jelinek
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • floating-point
  • • compiler
discussion_id_link
—
bugzilla_pr
—
date
2026-08-07T00:00:00.000Z

The float_widen_lhs_range function in GCC’s floating-point range analysis has been fixed to prevent potential overflows when extending ranges. The function now correctly handles cases where it’s called with significand bits, ensuring that the widened range remains valid. This change rectifies issues in optimizations like PR109008 and improves the robustness of floating-point range operations, especially when interacting with frange_nextafter.