--- gcc/cp/pt.c.orig	2012-11-11 09:36:55.000000000 +0900
+++ gcc/cp/pt.c	2012-11-11 09:38:56.000000000 +0900
@@ -4214,14 +4214,14 @@
 	 is set up.  */
       if (TREE_CODE (t) != ENUMERAL_TYPE)
 	DECL_NAME (type_decl) = classtype_mangled_name (t);
-      DECL_ASSEMBLER_NAME (type_decl) = DECL_NAME (type_decl);
+      SET_DECL_ASSEMBLER_NAME (type_decl, DECL_NAME (type_decl));
       if (!is_partial_instantiation)
 	{
 	  if (flag_new_abi)
-	    DECL_ASSEMBLER_NAME (type_decl) = mangle_decl (type_decl);
+	    SET_DECL_ASSEMBLER_NAME (type_decl, mangle_decl (type_decl));
 	  else
-	    DECL_ASSEMBLER_NAME (type_decl)
-	      = get_identifier (build_overload_name (t, 1, 1));
+	    SET_DECL_ASSEMBLER_NAME (type_decl,
+	      get_identifier (build_overload_name (t, 1, 1)));
 
 	  /* For backwards compatibility; code that uses
 	     -fexternal-templates expects looking up a template to
@@ -5858,7 +5858,7 @@
 		if (flag_new_abi)
 		  set_mangled_name_for_decl (r);
 		else
-		  DECL_ASSEMBLER_NAME (r) = build_destructor_name (ctx);
+		  SET_DECL_ASSEMBLER_NAME (r, build_destructor_name (ctx));
 	      }
 	    else 
 	      {
@@ -9752,7 +9752,7 @@
      functions, this is not so.  See tsubst_friend_function for
      details.  */
   DECL_TI_TEMPLATE (new_decl) = DECL_TI_TEMPLATE (decl);
-  DECL_ASSEMBLER_NAME (new_decl) = DECL_ASSEMBLER_NAME (decl);
+  SET_DECL_ASSEMBLER_NAME (new_decl, DECL_ASSEMBLER_NAME (decl));
   DECL_RTL (new_decl) = DECL_RTL (decl);
   DECL_USE_TEMPLATE (new_decl) = DECL_USE_TEMPLATE (decl);
 
@@ -10369,11 +10369,11 @@
 		      0);
 
   /* Actually set the DECL_ASSEMBLER_NAME.  */
-  DECL_ASSEMBLER_NAME (decl)
-    = build_decl_overload_real (decl, parm_types, ret_type,
+  SET_DECL_ASSEMBLER_NAME (decl,
+    build_decl_overload_real (decl, parm_types, ret_type,
 				tparms, targs, 
 				DECL_FUNCTION_MEMBER_P (decl) 
-			        + DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (decl));
+			        + DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (decl)));
 }
 
 /* Return truthvalue if we're processing a template different from
