https://gcc.gnu.org/bugzilla/show_bug.cgi?id=74751
xujian <jeanerpp at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #3 from xujian <jeanerpp at gmail dot com> --- (In reply to Jakub Jelinek from comment #2) > This is invalid, violates C aliasing rules. > If you don't want to change your code, you can use -fno-strict-aliasing, > otherwise e.g. replace the bogus ShortCopy with memcpy? Thanks a lot! "-fno-strict-aliasing" can solve our issue. It is so tricky since different version of gcc behaviour differently regarding this issue. We used 3.4.6/4.4.7 before, and did not encouter this.