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. -- Summary: [4.3, 4.4, 4.5] regression member variable of a C++ class is read to a register for future use before it is written Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jack2 at cantab dot net GCC build triplet: x86_64-pc-linux-gnu GCC host triplet: x86_64-pc-linux-gnu GCC target triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40051