--- Comment #1 from mattias dot ellert at tsl dot uu dot se 2007-10-01
08:41 ---
Created an attachment (id=14277)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14277&action=view)
The test case...
This is the test case used above.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?i
--- Comment #2 from tromey at gcc dot gnu dot org 2007-10-01 18:32 ---
The SWIG code violates strict aliasing rules.
Try adding -Wstrict-aliasing and you will see what I mean.
If I add -fno-strict-aliasing to the -O2 case, it works.
--
tromey at gcc dot gnu dot org changed:
--- Comment #3 from mattias dot ellert at tsl dot uu dot se 2007-10-02
07:52 ---
(In reply to comment #2)
Thanks for taking your time to reply. Using -fno-strict-aliasing works for me
too.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33607