See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109519. It's miscompiled in some cases as a result of aliasing violations.
There's no patch sent upstream yet although there's one in the GCC bug.