mangle.c (mangle_decl): Don't generate mangling aliases for maybe-in-charge [cd]tors.
authorJason Merrill <jason@redhat.com>
Fri, 6 Jan 2012 21:39:27 +0000 (16:39 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 6 Jan 2012 21:39:27 +0000 (16:39 -0500)
* mangle.c (mangle_decl): Don't generate mangling aliases
for maybe-in-charge [cd]tors.

From-SVN: r182968

gcc/cp/ChangeLog
gcc/cp/mangle.c

index 3f77f1b15c86d93178496d9814d89c43ab74e2fc..01480e3f9f20f38b5a71c87d34dfcfab6afc95a2 100644 (file)
@@ -1,5 +1,8 @@
 2012-01-06  Jason Merrill  <jason@redhat.com>
 
+       * mangle.c (mangle_decl): Don't generate mangling aliases
+       for maybe-in-charge [cd]tors.
+
        * error.c (dump_expr): Print type of CONSTRUCTOR.
 
 2012-01-05  Dodji Seketeli  <dodji@redhat.com>
index 548998a086f988af0834806deb9413153a66ef37..e5c28952df6cbbf0f49f2a945a465364ea9771eb 100644 (file)
@@ -3194,7 +3194,10 @@ mangle_decl (const tree decl)
   tree id = get_mangled_id (decl);
   SET_DECL_ASSEMBLER_NAME (decl, id);
 
-  if (G.need_abi_warning)
+  if (G.need_abi_warning
+      /* Don't do this for a fake symbol we aren't going to emit anyway.  */
+      && !DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (decl)
+      && !DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (decl))
     {
 #ifdef ASM_OUTPUT_DEF
       /* If the mangling will change in the future, emit an alias with the