backport: rs6000.c (rs6000_output_symbol): Don't modify VAR_DECL string.

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
This commit is contained in:
David Edelsohn 2016-09-27 14:30:46 +00:00 committed by David Edelsohn
parent 4cbf07a7c6
commit 1dee0646ff
2 changed files with 12 additions and 1 deletions

View 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> 2016-09-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/77478 PR tree-optimization/77478

View File

@ -26231,7 +26231,10 @@ rs6000_output_symbol_ref (FILE *file, rtx x)
(TREE_CODE (decl) == FUNCTION_DECL (TREE_CODE (decl) == FUNCTION_DECL
? "[DS]" : "[UA]"), ? "[DS]" : "[UA]"),
NULL); 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)) if (VTABLE_NAME_P (name))