This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/50254] gcc-4.5 -fstrict-aliasing -fschedule-insns optimization produces wrong code
- From: "vzapolskiy at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 01 Sep 2011 09:37:00 +0000
- Subject: [Bug c/50254] gcc-4.5 -fstrict-aliasing -fschedule-insns optimization produces wrong code
- Auto-submitted: auto-generated
- References: <bug-50254-4@http.gcc.gnu.org/bugzilla/>
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.