[Bug c/50254] gcc-4.5 -fstrict-aliasing -fschedule-insns optimization produces wrong code
vzapolskiy at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Sep 1 09:37:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50254
Vladimir Zapolskiy <vzapolskiy at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #25154|0 |1
is obsolete| |
--- Comment #2 from Vladimir Zapolskiy <vzapolskiy at gmail dot com> 2011-09-01 09:37:00 UTC ---
Created attachment 25157
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25157
test code
(In reply to comment #1)
> qentry->next = (void *)qhead;
>
> is voiolating strict aliasing rules if you ever end up loading/storing
> qentry->next->{prev,next}.
Thank you very much for the quick response.
I managed to reduce a test case and hopefully understand strict aliasing rules.
More information about the Gcc-bugs
mailing list