+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
/* 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
/* 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))
/* 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
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. */