https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118924
--- Comment #17 from Martin Jambor <jamborm at gcc dot gnu.org> --- After reading from ao_compare::compare_ao_refs, I tend to think the correct predicate for "tbaa_hazard" from my comment #14 is types_equal_for_same_type_for_tbaa_p (with the last argument true in early SRA and false in "late" SRA). But after reading Honza's comment #16 it feels like SRA's same_access_path_p is quite inadequate and we need to do at least 5 and 6 the list in addition - or instead of? - the call to operand_equal_p there. And perhaps also 4 and 3 (though I'm struggling to think of a testcase where this could be a problem).