https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103229
--- Comment #1 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- Untested, but if someone wants to test and commit, feel free. diff --git a/gcc/gimple-range-cache.cc b/gcc/gimple-range-cache.cc index a63e20e7e49..b347edeb474 100644 --- a/gcc/gimple-range-cache.cc +++ b/gcc/gimple-range-cache.cc @@ -651,7 +651,8 @@ ssa_global_cache::clear_global_range (tree name) void ssa_global_cache::clear () { - memset (m_tab.address(), 0, m_tab.length () * sizeof (irange *)); + if (m_tab.address ()) + memset (m_tab.address(), 0, m_tab.length () * sizeof (irange *)); } // Dump the contents of the global cache to F.