Landing: 2fb55e1d061a
Project / Subsystem
gcc / gcc
Date
2026-08-09
Author
Roger Sayle
Commit
2fb55e1d061ab091beafa04b2050c88f8d8d64bf
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc
- patch_id
- —
- commit_hash
- 2fb55e1d061ab091beafa04b2050c88f8d8d64bf
- source_type
- github
- headline
- Fix signed zero issue in 0.0-x transformation.
- tldr
- Corrects a signed zero handling bug in the 0.0-x to -x transformation, ensuring IEEE compliance.
- author
- Roger Sayle
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • bugfix
- • floating-point
- • ieee-754
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-09T00:00:00.000Z
This commit corrects an issue in match.pd where the transformation of 0.0 - x to -x incorrectly handled signed zeros, violating IEEE 754 standards. The fix ensures that when signed zeros are honored, +0.0 - +0.0 correctly results in +0.0, and it also addresses cases where x is NaN. New test cases are added to verify the correct behavior.