--- Comment #3 from pinskia at gcc dot gnu dot org 2006-02-09 01:02 ---
You are violating aliasing rules which is why this does not work at -O3.
Either access the variable ptr as a "struct blah *" or use
-fno-strict-aliasing.
*** This bug has been marked as a duplicate of 21920 ***
--- Comment #2 from devin at freeshell dot org 2006-02-07 17:07 ---
I could reproduce it with that dated build. And it isn't just debian but also
the buildroot gcc. Here is the assembly produced from -O3. Following that is
the assembly from -O2. What seems to happen is that with -O3
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-02-07 00:53 ---
I cannot reproduce this at all with 4.0.3 20051105.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26144