Created attachment 22571 [details] testcase for this bug. There is a strange error when there is a weak_ref. g++ -O1 -o aliased_undef_sym.o -c -Wall -fgnu-tm aliased_undef_sym.cpp aliased_undef_sym.cpp:13:1: error: ‘<built-in>’ aliased to undefined symbol ‘_ZGTtN8BuildingD2Ev’
Fixed and pending approval: http://gcc.gnu.org/ml/gcc-patches/2010-12/msg01087.html