This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/46443] -O2 flag generates incorrect code
- From: "muller at vki dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 12 Nov 2010 00:09:30 +0000
- Subject: [Bug c/46443] -O2 flag generates incorrect code
- Auto-submitted: auto-generated
- References: <bug-46443-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46443
--- Comment #2 from Arthur Muller <muller at vki dot com> 2010-11-12 00:09:27 UTC ---
(In reply to comment #1)
> You are violating C/C++ aliasing rules; You are accessing a double as a long
> which causes undefined behavior. memcpy does not cause this violation since it
> is defined to use the character type to do the copy.
>
> *** This bug has been marked as a duplicate of bug 21920 ***
Thanks for the clarification!
-Arthur