diff options
author | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-08 16:13:18 +0000 |
---|---|---|
committer | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-08 16:13:18 +0000 |
commit | faebb21bade90c6017e8ce177818c8c20d6ca9c9 (patch) | |
tree | 23b1fc7769734fa75e5f8a4353a4ea72d274c65a | |
parent | f706bd17f3ec945fd122c3146a9d74ddfac6f78c (diff) | |
download | gcc-faebb21bade90c6017e8ce177818c8c20d6ca9c9.tar.gz |
* symtab.c (symtab_node::equal_address_to): Return -1 instead of 2
if we can't determine address equivalence.
* alias.c (compare_base_decl): Update for changed return value of
symtab_node::equal_address_to.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232172 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/alias.c | 2 | ||||
-rw-r--r-- | gcc/symtab.c | 8 |
3 files changed, 11 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4ffc776839f..c3524fcde18 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-01-08 Uros Bizjak <ubizjak@gmail.com> + + * symtab.c (symtab_node::equal_address_to): Return -1 instead of 2 + if we can't determine address equivalence. + * alias.c (compare_base_decl): Update for changed return value of + symtab_node::equal_address_to. + 2016-01-08 Jason Merrill <jason@redhat.com> PR c++/68983 diff --git a/gcc/alias.c b/gcc/alias.c index e276d71f046..1b8390e85bb 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -2053,8 +2053,6 @@ compare_base_decls (tree base1, tree base2) return 0; ret = node1->equal_address_to (node2, true); - if (ret == 2) - return -1; return ret; } diff --git a/gcc/symtab.c b/gcc/symtab.c index f7788bede89..308a489206c 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -1877,7 +1877,7 @@ symtab_node::nonzero_address () /* Return 0 if symbol is known to have different address than S2, Return 1 if symbol is known to have same address as S2, - return 2 otherwise. + return -1 otherwise. If MEMORY_ACCESSED is true, assume that both memory pointer to THIS and S2 is going to be accessed. This eliminates the situations when @@ -1941,7 +1941,7 @@ symtab_node::equal_address_to (symtab_node *s2, bool memory_accessed) /* If both symbols may resolve to NULL, we can not really prove them different. */ if (!memory_accessed && !nonzero_address () && !s2->nonzero_address ()) - return 2; + return -1; /* Except for NULL, functions and variables never overlap. */ if (TREE_CODE (decl) != TREE_CODE (s2->decl)) @@ -1949,7 +1949,7 @@ symtab_node::equal_address_to (symtab_node *s2, bool memory_accessed) /* If one of the symbols is unresolved alias, punt. */ if (rs1->alias || rs2->alias) - return 2; + return -1; /* If we have a non-interposale definition of at least one of the symbols and the other symbol is different, we know other unit can not interpose @@ -1976,7 +1976,7 @@ symtab_node::equal_address_to (symtab_node *s2, bool memory_accessed) We probably should be consistent and use this fact here, too, but for the moment return false only when we are called from the alias oracle. */ - return memory_accessed && rs1 != rs2 ? 0 : 2; + return memory_accessed && rs1 != rs2 ? 0 : -1; } /* Worker for call_for_symbol_and_aliases. */ |