https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59478
--- Comment #4 from Oleg Endo <olegendo at gcc dot gnu.org> --- Just checked on GCC 9 ... The case int float_as_int (float val) { char valbytes[sizeof (float)]; for (int i = 0; i < sizeof (float); ++i) valbytes[i] = ((char*)&val)[i]; int result; for (int i = 0; i < sizeof (float); ++i) ((char*)&result)[i] = valbytes[i]; return result; } still doesn't work. No idea why it doesn't go the same path as the __builtin_memcpy. Those cases work fine. Please leave open.