https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64755
--- Comment #5 from Alejandro Rivero Pérez <nubcrack at yahoo dot es> --- Yes, my bad, with no-strict-aliasing the code compiles OK and generate the desire output. After read more info about strict-aliasing that definitely is the problem, thanks for the help, sorry for the trouble.