https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119120
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Zoltan Vajda from comment #0) > This is not an academic problem. The implementation of operator /= of > std::complex has this behavior until GCC 8.5 (inclusive). The std::complex's operator /= issue was solved with r9-4332-ge987fb1ebecc74 . Specifically with this part: template<class _Tp> - complex& + _GLIBCXX20_CONSTEXPR complex& operator/=(const complex<_Tp>& __z) { - _ComplexT __t; - __real__ __t = __z.real(); - __imag__ __t = __z.imag(); + const _ComplexT __t = __z.__rep(); _M_value /= __t; return *this; }