https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92883
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
What I see is that the jfunc->m_vr originally pointed to the expected
long unsigned int [1, +INF]
value range.
But the hash table used to store the value ranges actually doesn't care about
type compatibility of different value ranges.
So I think we need additionally:
--- gcc/ipa-prop.c.jj 2019-12-06 01:26:39.000000000 +0100
+++ gcc/ipa-prop.c 2019-12-10 12:38:57.564926519 +0100
@@ -121,7 +121,7 @@ struct ipa_vr_ggc_hash_traits : public g
static bool
equal (const value_range *a, const value_range *b)
{
- return a->equal_p (*b);
+ return a->equal_p (*b) && types_compatible_p (a->type (), b->type ());
}
static void
mark_empty (value_range *&p)
because value_range equal_p really assumes that it is called with compatible
typed value ranges.