SVN commit 138953 introduced a bug where code compiled at -O2 and above reads a value into a register before it is written in a function called by the optimized code. This is demonstrated in the code for the Enigmail plugin to Mozilla Thunderbird as discussed at https://bugs.gentoo.org/show_bug.cgi?id=246421 I haven't been able to produce a more minimal test case - it seems to need a significant portion of the surrounding infrastructure to trigger this. I've reversed commit 138953 on a recent trunk snapshot and it fixes this bug but I don't know if this introduces a regression on other bugs.
Created attachment 17814 [details] *.i file with which the bug is demonstrated
>SVN commit 138953 introduced a bug where code compiled at -O2 and above reads a value into a register before it is written in a function called by the optimized code. No, from the sound of it there is an alias violation in the code.
Created attachment 17815 [details] Patch against trunk 147188 to revert commit 138953
Revision 138953: http://gcc.gnu.org/ml/gcc-cvs/2008-08/msg00512.html http://gcc.gnu.org/ml/gcc-patches/2008-08/msg00524.html fixed a real bug.
> No, from the sound of it there is an alias violation in the code. You're right, I had thought of that but had read that Mozilla code was compiled with -fno-strict-aliasing because of this. Looking more closely the code in this extension isn't and so fails. Now that I've added -fno-strict-aliasing it works. Sorry for the noise.