------- Comment #2 from vincent dot riviere at freesbee dot fr 2008-02-03 22:57 ------- This problem seems to happen on targets where ASM_WEAKEN_LABEL() is defined, but MAKE_DECL_ONE_ONLY() is not defined. In that case, the `virtual thunk to C::~C()' symbol is defined using .globl instead of using .weak (like it was in 4.1.2).
I made some investigation. The problem may be related to these source files: gcc/cp/methods.c in function use_thunk() if (DECL_ONE_ONLY (function)) make_decl_one_only (thunk_fndecl); This code was different in 4.1.2 gcc/varasm.c in function make_decl_one_only() if (SUPPORTS_ONE_ONLY) { #ifdef MAKE_DECL_ONE_ONLY MAKE_DECL_ONE_ONLY (decl); #endif DECL_ONE_ONLY (decl) = 1; } When MAKE_DECL_ONE_ONLY is not defined, SUPPORTS_ONE_ONLY is set to 0. So DECL_ONE_ONLY (decl) = 1 is never called. Thus if the destructor is flagged DECL_ONE_ONLY, the virtual thunk is not flagged DECL_ONE_ONLY as it should, then it is defined with .globl instead of .weak -- vincent dot riviere at freesbee dot fr changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |4.2.3 Known to work| |4.1.2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35067