https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90757
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- myScalarToCooked is of course similar broken. The following works fine for me: #include <iostream> /** Inefficient convenience function for converting a single value to cooked */ double myScalarToCooked(int32_t raw) { float cooked; for (auto it = &raw; it != (&raw) + 1; ++it) { float genericRepresentation; __builtin_memcpy (&genericRepresentation, it, 4); *(&cooked) = genericRepresentation; } return cooked; } int main() { float testValue = 3.25; int32_t rawValue; __builtin_memcpy (&rawValue, &testValue, 4); std::cout << myScalarToCooked(rawValue) << std::endl; return 0; }