Landing: 579349b0f126

Project / Subsystem

gcc / gcc

Date

2026-08-20

Author

Roger Sayle

Commit

579349b0f12681ffcbfd14eafe6efdc8da67a1f2

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc
patch_id
—
commit_hash
579349b0f12681ffcbfd14eafe6efdc8da67a1f2
source_type
github
headline
Fix ICE optimizing 0.0 - x with -ffinite-math-only
tldr
Corrects an integer compiler error (ICE) when optimizing floating-point expressions involving negative zero under the -ffinite-math-only flag.
author
Roger Sayle
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • floating-point
  • • compiler-bug
discussion_id_link
—
bugzilla_pr
—
date
2026-08-20T00:00:00.000Z

An Integer Compiler Error (ICE) occurring when optimizing expressions like (T)0.0 - x with the -ffinite-math-only flag has been resolved. The issue stemmed from an incorrect assumption about how GCC handles negative zero in floating-point constants. A new predicate, real_negzerop, has been introduced to robustly identify negative zero across various constant types (real, vector, complex) and prevent the ICE.