https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124608
--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
Possibly
diff --git a/gcc/ipa-modref-tree.cc b/gcc/ipa-modref-tree.cc
index 5d91dc44241..c147ba43ecc 100644
--- a/gcc/ipa-modref-tree.cc
+++ b/gcc/ipa-modref-tree.cc
@@ -96,7 +96,7 @@ modref_access_node::contains (const modref_access_node &a)
const
&& (!known_size_p (a.size)
|| !known_le (size, a.size)))
return false;
- if (known_size_p (max_size))
+ if (known_size_p (max_size) && known_size_p (a.max_size))
return known_subrange_p (poly_offset_int::from (a.offset, SIGNED)
+ aoffset_adj, a.max_size,
poly_offset_int::from (offset, SIGNED),
at least could be validated that it doesn't happen by asserting known_size_p
(a.max_size). I'll try that. Because known_subrange_p will test
known_size_p on a.max_size, so this might cause odd differences in behavior
of ::contains where the fallback with
else
return known_le (poly_offset_int::from (offset, SIGNED),
poly_offset_int::from (a.offset, SIGNED)
+ aoffset_adj);
would have returned true instead of false because of !known_size_p
(a.max_size).