https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92328
prathamesh3492 at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |prathamesh3492 at gcc dot gnu.org --- Comment #2 from prathamesh3492 at gcc dot gnu.org --- Reverting the following hunk in vn_reference_lookup_3 from r276882, seems to resolve the ICE: #if 0 if (known_eq (ref->size, size2)) return vn_reference_lookup_or_insert_for_pieces (vuse, get_alias_set (lhs), vr->type, vr->operands, SSA_VAL (def_rhs)); #endif if (! INTEGRAL_TYPE_P (TREE_TYPE (def_rhs)) || type_has_mode_precision_p (TREE_TYPE (def_rhs))) { gimple_match_op op (gimple_match_cond::UNCOND, Altho, I am not sure if that's the issue. In eliminate_stmt, lhs is unsigned and sprime is int, and thus it goes into else branch and hits gcc_unreachable(): if (!useless_type_conversion_p (TREE_TYPE (lhs), TREE_TYPE (sprime))) { /* We preserve conversions to but not from function or method types. This asymmetry makes it necessary to re-instantiate conversions here. */ if (POINTER_TYPE_P (TREE_TYPE (lhs)) && FUNC_OR_METHOD_TYPE_P (TREE_TYPE (TREE_TYPE (lhs)))) sprime = fold_convert (TREE_TYPE (lhs), sprime); else gcc_unreachable (); Thanks, Prathamesh