Patchwork [google] Fix a bug leading to inconsistent comdat group in LIPO mode (issue4616041)

mail settings
Submitter Xinliang David Li
Date June 14, 2011, 7:13 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/100288/
State New
Headers show


Xinliang David Li - June 14, 2011, 7:13 a.m.
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  <>

	* cp/semantics.c (emit_associated_thunks):
	Do not omit thunk emission for aux modules.

This patch is available for review at


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;