https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128089

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|RESOLVED                    |NEW
         Resolution|INVALID                     |---
   Last reconfirmed|                            |2026-10-23
                 CC|                            |linkw at gcc dot gnu.org

--- Comment #2 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> -fno-reciprocal-math is not the correct flag to disable, instead
> -fno-associative-math is.  -freciprocal-math is about turning a / x into a *
> (1./x) (or reverse).

Hi Richard, IMHO this is a bug as reassoc does the wrong transformation:
  (a / 3) / (a / 6)
-> 
  ((a / 3) / 6) / a

// not (a / 3) * 6 / a

-fno-reciprocal-math here is just to avoid that the pattern gets optimized
early in other way then the latent bug isn't exposed, it wasn't intended to
disable some association.

Reply via email to