varasm.c (get_section): Use gcc_assert.
[gcc.git] / gcc / cp / method.c
index f3c86d3178db7901b453b5ebd3e12e4d714a56b2..250c66d08b35a49a47c393beb4b09fe54d6017b2 100644 (file)
@@ -137,8 +137,6 @@ make_thunk (tree function, bool this_adjusting,
   TREE_READONLY (thunk) = TREE_READONLY (function);
   TREE_THIS_VOLATILE (thunk) = TREE_THIS_VOLATILE (function);
   TREE_PUBLIC (thunk) = TREE_PUBLIC (function);
-  if (flag_weak)
-    comdat_linkage (thunk);
   SET_DECL_THUNK_P (thunk, this_adjusting);
   THUNK_TARGET (thunk) = function;
   THUNK_FIXED_OFFSET (thunk) = d;
@@ -381,8 +379,8 @@ use_thunk (tree thunk_fndecl, bool emit_p)
   DECL_VISIBILITY (thunk_fndecl) = DECL_VISIBILITY (function);
   DECL_VISIBILITY_SPECIFIED (thunk_fndecl)
     = DECL_VISIBILITY_SPECIFIED (function);
-  if (flag_weak && TREE_PUBLIC (thunk_fndecl))
-    comdat_linkage (thunk_fndecl);
+  if (DECL_ONE_ONLY (function))
+    make_decl_one_only (thunk_fndecl);
 
   if (flag_syntax_only)
     {