Hi Richard, I just (re-)discovered that the new TBAA machinery is quite aggressive and breaks cases that used to work in Ada (-O2 testcase for SPARC64 attached). The problem boils down to this: D.1416_1 = (struct p__rec &) &r.F; r.F = ... ... = D.1416_1->d; DSE computes that the store to r.F is dead and eliminates it at -O2 because ultimately nonaliasing_component_refs_p returns false: /* If we have two type access paths B1.path1 and B2.path2 they may only alias if either B1 is in B2.path2 or B2 is in B1.path1. */ return false; [Shouldn't nonaliasing_component_refs_p be named aliasing_component_refs_p or component_refs_may_alias_p instead]? Yes, it's a blatant type-punning case but all the structure types are given the same alias set (struct p__rec, type of r, type of F) and 'd' is not addressable so all the memory accesses are done with the same alias set. The root of the problem is that same_type_for_tbaa never returns true since the types don't have the same TYPE_CANONICAL (rightfully so, they are not equivalent) so we fall back to the final return of nonaliasing_c_r_p. Shouldn't this final return be 'true' instead of 'false', like the final return in indirect_ref_may_alias_decl_p, so that the ultimate fallback is the comparison of alias sets like it used to be? Thanks in advance. -- Eric Botcazou