* config/rs6000/rs6000.c (rs6000_output_symbol): Don't modify VAR_DECL string.
authorDavid Edelsohn <dje.gcc@gmail.com>
Tue, 27 Sep 2016 14:01:41 +0000 (14:01 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Tue, 27 Sep 2016 14:01:41 +0000 (10:01 -0400)
From-SVN: r240540

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index ff35a57..895cec5 100644 (file)
@@ -1,3 +1,8 @@
+2016-09-27  David Edelsohn  <dje.gcc@gmail.com>
+
+       * config/rs6000/rs6000.c (rs6000_output_symbol): Don't modify
+       VAR_DECL string.
+
 2016-09-27  Marek Polacek  <polacek@redhat.com>
 
        * config/ia64/ia64.c (ia64_print_operand): Adjust fall through
index 6897b5c..4d3706c 100644 (file)
@@ -30309,7 +30309,10 @@ rs6000_output_symbol_ref (FILE *file, rtx x)
                     (TREE_CODE (decl) == FUNCTION_DECL
                      ? "[DS]" : "[UA]"),
                     NULL);
-      XSTR (x, 0) = name;
+
+      /* Don't modify name in extern VAR_DECL to include mapping class.  */
+      if (TREE_CODE (decl) == FUNCTION_DECL)
+       XSTR (x, 0) = name;
     }
 
   if (VTABLE_NAME_P (name))