https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64755
--- Comment #5 from Alejandro Rivero Pérez ---
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64755
Richard Biener changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64755
--- Comment #3 from mednafen at gmail dot com ---
It looks like your code violates strict aliasing rules. Does the code in
question work as you intend it to if you compile with -fno-strict-aliasing ?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64755
mednafen at gmail dot com changed:
What|Removed |Added
CC||mednafen at gmail dot com
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64755
--- Comment #1 from Jonathan Wakely ---
Comment on attachment 34556
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34556
They are 3 files bug.cpp (contain the code to compile), bug.O1 and bug.O2
(contain the assembly code generated by g++)