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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I get the same result for all of -O0/-O1/-O2, all 3 functions raise both
exceptions and that is correct, glibc has removed the inline versions some time
ago:
https://sourceware.org/pipermail/libc-alpha/2020-March/111753.html

The bug was on the glibc side:
both the
      /* One example of an invalid operation is 0.0 / 0.0.  */
      float __f = 0.0;

# ifdef __SSE_MATH__
      __asm__ __volatile__ ("divss %0, %0 " : : "x" (__f));
and
      float __f = 1.0;
      float __g = 0.0;

# ifdef __SSE_MATH__
      __asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g));
part, because glibc didn't tell the compiler the inline assembly actually
modifies the register.
So, the first one was supposed to be
      __asm__ __volatile__ ("divss %0, %0 " : "+x" (__f));
and the second
      __asm__ __volatile__ ("divss %1, %0" : "+x" (__f) : "x" (__g));
Not a bug on the GCC side and on glibc side it has been fixed by the removal of
the inline version.

Reply via email to