On 12/23/2015 02:39 AM, Uros Bizjak wrote:
Hello!
There is a logic error in Honza's patch "Transparent alias suport part
10" [1]. The part in memrefs_conflict_p should be changed to:
- /* If decls are different or we know by offsets that there is no overlap,
- we win. */
- if (!cmp || !offset_overlap_p (c, xsize, ysize))
+ /* If decls are different and we know by offsets that
+ there is no overlap, we win. */
+ if (!cmp && !offset_overlap_p (c, xsize, ysize))
return 0;
- /* Decls may or may not be different and offsets overlap....*/
+ /* Decls are different and offsets overlap....*/
Even if decls are different, their offsets shouldn't overlap!
Addresses with alignment ANDs depend on increased xsize and ysize, so
no wonder gcc fails to bootstrap on alpha.
In addition to this, the check for SYMBOL_REFs in base_alias_check
should be moved after checks for addresses.
The patch also adds some simplification. If
symtab_address::equal_address_to returns -1 for "unknown" (as is
otherwise customary throughout the sources), we can simplify
compare_base_decls a bit.
2015-12-23 Uros Bizjak <ubiz...@gmail.com>
PR middle-end/68999
* 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.
(memrefs_conflict_p): Return 0 when decls are different
and offsets don't overlap.
(base_alias_check): Move check for addresses with alignment ANDs
before the call for compare_base_decls.
So with the symtab and part of the alias bits in, I assume you're going
to post the remainder of the fix separately, right?
jeff