http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52582
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-13 22:15:58 UTC --- Ah, #define HAVE_AS_GNU_ATTRIBUTE 1 in auto-host.h is essential for this. This is devirt in action, for some reason the devirtualized A::~A () doesn't have DECL_EXTERNAL set (not sure what should set it, the FE, the devirtualizer?) and likely the rs6000 backend just should be more forgiving and if it can't find a cgraph node, IMHO call_ABI_of_interest should just return true as a conservative answer. So, for 4.7.0 IMHO best would be to do: --- gcc/config/rs6000/rs6000.c 2012-03-13 19:58:59.342625117 +0100 +++ gcc/config/rs6000/rs6000.c 2012-03-13 23:14:15.693828006 +0100 @@ -7452,6 +7452,9 @@ call_ABI_of_interest (tree fndecl) /* Interesting functions that we are emitting in this object file. */ c_node = cgraph_get_node (fndecl); c_node = cgraph_function_or_thunk_node (c_node, NULL); + if (c_node == NULL) + return true; + return !cgraph_only_called_directly_p (c_node); } return false; and for 4.7.1/4.8 (while this can perhaps stay) we should find out why DECL_EXTERNAL isn't set.