]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: rs6000.c (rs6000_output_symbol): Don't modify VAR_DECL string.
authorDavid Edelsohn <dje.gcc@gmail.com>
Tue, 27 Sep 2016 14:30:46 +0000 (14:30 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Tue, 27 Sep 2016 14:30:46 +0000 (10:30 -0400)
        Backport from mainline
        2016-09-27  David Edelsohn  <dje.gcc@gmail.com>

        * config/rs6000/rs6000.c (rs6000_output_symbol): Don't modify
        VAR_DECL string.

From-SVN: r240544

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

index 9405df9945e0f116bc8647a512dbd0324fadac1e..296b55ab684fc3b4537c7f177b932004be08464f 100644 (file)
@@ -1,3 +1,11 @@
+2016-09-27  David Edelsohn  <dje.gcc@gmail.com>
+
+       Backport from mainline
+       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  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/77478
index 8900b4ce20d08c45e541d6e4293f43a26cc77e95..88f4e6c27d7ced33dba2e0cc8b714cc3e0b9d089 100644 (file)
@@ -26231,7 +26231,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))