aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2015-12-23 14:47:39 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2015-12-23 14:47:39 +0000
commit7ec4f3438cd3fc7a83a32d6c9b910b26a220376e (patch)
tree23ff2500b938c7cf94d14dd55668e27574e466b8 /gcc/alias.c
parent986e29bc6a3df0269268d7045058049beb26e1cb (diff)
downloadgcc-7ec4f3438cd3fc7a83a32d6c9b910b26a220376e.zip
gcc-7ec4f3438cd3fc7a83a32d6c9b910b26a220376e.tar.gz
gcc-7ec4f3438cd3fc7a83a32d6c9b910b26a220376e.tar.bz2
alias.c (compare_base_decls): Simplify in-symtab check.
gcc/ * alias.c (compare_base_decls): Simplify in-symtab check. * cgraph.h (decl_in_symtab_p): Check DECL_IN_CONSTANT_POOL. testsuite/ * gcc.dg/alias-15.c: New. From-SVN: r231928
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index 1ab9600..42a974a 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -2038,13 +2038,12 @@ compare_base_decls (tree base1, tree base2)
if (base1 == base2)
return 1;
- bool in_symtab1 = decl_in_symtab_p (base1);
- bool in_symtab2 = decl_in_symtab_p (base2);
-
/* Declarations of non-automatic variables may have aliases. All other
decls are unique. */
- if (in_symtab1 != in_symtab2 || !in_symtab1)
+ if (!decl_in_symtab_p (base1)
+ || !decl_in_symtab_p (base2))
return 0;
+
ret = symtab_node::get_create (base1)->equal_address_to
(symtab_node::get_create (base2), true);
if (ret == 2)