https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96564
Jeffrey A. Law <law at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at gcc dot gnu.org, | |rguenth at gcc dot gnu.org --- Comment #12 from Jeffrey A. Law <law at gcc dot gnu.org> --- So I think we could solve this with a bit of help from the alias oracle. We have the routine ptrs_compare_unequal, but points-to-null is going to get in the way. I think VRP and DOM have enough information to rule out NULL for both objects in question. So if we could query the points-to information, ignoring NULL then we could likely solve this particular bug. Essentially VRP or DOM would prove NULL isn't in the set of possible values at the comparison point. Then we query the alias information ignoring NULL. Voila we compute a static result for the comparison of the two pointers and the problematical block becomes unreachable and the bogus warning goes away. Richi, any thoughts in viability of such an API?