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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
The issue is

std::pow<double> (__x=..., __y=@0x7fffffffdcb8: 0.5)
    at /home/space/rguenther/install/gcc-9.0/include/c++/9.0.1/complex:1027
(gdb) l
1022        {
1023    #if ! _GLIBCXX_USE_C99_COMPLEX
1024          if (__x == _Tp())
1025            return _Tp();
1026    #endif
1027          if (__x.imag() == _Tp() && __x.real() > _Tp())
1028            return pow(__x.real(), __y);

where __x.imag () == _Tp() says true for -0.0 == 0.0.  This means
std::pow will return the same values for r + -0.0i and r + 0.0i,
not sure if that is allowed by the C++ standard.

Reply via email to