public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/autopar_devel] Fix wrong asm name output
@ 2020-08-06 15:50 Giuliano Belinassi
0 siblings, 0 replies; only message in thread
From: Giuliano Belinassi @ 2020-08-06 15:50 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:c3b38f65b51d043133e6e69a8ae3ae24534bcdfe
commit c3b38f65b51d043133e6e69a8ae3ae24534bcdfe
Author: Giuliano Belinassi <giuliano.belinassi@usp.br>
Date: Thu Aug 6 12:44:03 2020 -0300
Fix wrong asm name output
When compiling in parallel, static variables may have its name changed
to avoid clashes with other symbols, however, a bug prevented that some
symbols got renamed in this process. This commit fix this.
Authored-by: Richard Biener <rguenther@suse.de>
gcc/ChangeLog
2020-08-06 Giuliano Belinasssi <giuliano.belinassi@usp.br>
* symtab.c (change_decl_assembler_name): Remove RTL output if
assember name is changed afterward.
Diff:
---
gcc/ChangeLog | 5 +++++
gcc/symtab.c | 10 +++++++---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2d32f7f6b6b..2887adcb709 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2020-08-06 Giuliano Belinasssi <giuliano.belinassi@usp.br>
+
+ * symtab.c (change_decl_assembler_name): Remove RTL output if
+ assember name is changed afterward.
+
2020-07-31 Giuliano Belinassi <giuliano.belinassi@usp.br>
* Makefile.in: Use `+' on rule calling GCC
diff --git a/gcc/symtab.c b/gcc/symtab.c
index f56dd69dacf..e1556fba7a7 100644
--- a/gcc/symtab.c
+++ b/gcc/symtab.c
@@ -297,9 +297,13 @@ symbol_table::change_decl_assembler_name (tree decl, tree name)
unlink_from_assembler_name_hash (node, true);
const char *old_name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
- if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))
- && DECL_RTL_SET_P (decl))
- warning (0, "%qD renamed after being referenced in assembly", decl);
+ if (DECL_RTL_SET_P (decl))
+ {
+ if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))
+ && DECL_RTL_SET_P (decl))
+ warning (0, "%qD renamed after being referenced in assembly", decl);
+ SET_DECL_RTL (decl, NULL);
+ }
SET_DECL_ASSEMBLER_NAME (decl, name);
if (alias)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-06 15:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-06 15:50 [gcc/devel/autopar_devel] Fix wrong asm name output Giuliano Belinassi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).