The patch will be committed to google/main to fix a problem in LIPO model that leads to 'reference to discarded comdat section' ld warning. The problem is caused by inconsistent comdat groups between primary and aux modules because thunks were skipped in aux module.
2011-06-14 David Li <davi...@google.com> * cp/semantics.c (emit_associated_thunks): Do not omit thunk emission for aux modules. Index: cp/semantics.c =================================================================== --- cp/semantics.c (revision 174851) +++ cp/semantics.c (working copy) @@ -3415,8 +3415,7 @@ emit_associated_thunks (tree fn) enabling you to output all the thunks with the function itself. */ if (DECL_VIRTUAL_P (fn) /* Do not emit thunks for extern template instantiations. */ - && ! DECL_REALLY_EXTERN (fn) - && ! cgraph_is_auxiliary (fn)) + && ! DECL_REALLY_EXTERN (fn)) { tree thunk; -- This patch is available for review at http://codereview.appspot.com/4616041