diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9405df9945e0..296b55ab684f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2016-09-27 David Edelsohn + + Backport from mainline + 2016-09-27 David Edelsohn + + * config/rs6000/rs6000.c (rs6000_output_symbol): Don't modify + VAR_DECL string. + 2016-09-27 Richard Biener PR tree-optimization/77478 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 8900b4ce20d0..88f4e6c27d7c 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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))