https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121942
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Use either -fno-strict-alaising, an union to copy from double to int64_t or memcpy to do the copying. Or for c++20 use std::bit_cast. The code you have is undefined due to aliasing violations. You are accessing a double via an int64_t without using one of the above methods.