https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117724
--- Comment #5 from uecker at gcc dot gnu.org --- Preliminary patch (but does not cover all similar cases): diff --git a/gcc/tree.cc b/gcc/tree.cc index 1da06c7d4e9..453b56cc37c 100644 --- a/gcc/tree.cc +++ b/gcc/tree.cc @@ -13977,6 +13977,9 @@ gimple_canonical_types_compatible_p (const_tree t1, const_tree t2, tree max1 = TYPE_MAX_VALUE (i1); tree max2 = TYPE_MAX_VALUE (i2); + if (!max1 || !max2) + return true; + /* The minimum/maximum values have to be the same. */ if ((min1 == min2 || (min1 && min2