The following testcase is miscompiled on the 3.4 branch and mainline: ========================================================= extern int printf(const char *restrict, ...) throw (); struct A { A() { printf("Ctor\n"); } ~A() { printf("Dtor\n"); } }; A a; extern A a; int main() { return 0; } ========================================================= The output is: Ctor Dtor Dtor i.e. the destructor of A is run twice. If I exchange line 9 and 10, the bug goes away. Btw, the bug was reported at Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=260747 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=265961 The bug affects gcc 3.4.0 and later. It was introduced somewhere in Mid August 2003. Mark, your patch http://gcc.gnu.org/ml/gcc-cvs/2003-08/msg00621.html might have caused the regression. Could you please have a look?
Mark, I just checked, the regression indeed appears with your patch http://gcc.gnu.org/ml/gcc-cvs/2003-08/msg00621.html
*** This bug has been marked as a duplicate of 17976 ***