This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/50254] gcc-4.5 -fstrict-aliasing -fschedule-insns optimization produces wrong code


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]