aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index efd89ce..e16e350 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -2046,6 +2046,18 @@ compare_base_decls (tree base1, tree base2)
if (base1 == base2)
return 1;
+ /* If we have two register decls with register specification we
+ cannot decide unless their assembler name is the same. */
+ if (DECL_REGISTER (base1)
+ && DECL_REGISTER (base2)
+ && DECL_ASSEMBLER_NAME_SET_P (base1)
+ && DECL_ASSEMBLER_NAME_SET_P (base2))
+ {
+ if (DECL_ASSEMBLER_NAME (base1) == DECL_ASSEMBLER_NAME (base2))
+ return 1;
+ return -1;
+ }
+
/* Declarations of non-automatic variables may have aliases. All other
decls are unique. */
if (!decl_in_symtab_p (base1)