https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106833
Bug ID: 106833 Summary: Handle OPAQUE_TYPE in gimple_canonical_types_compatible_p Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: linkw at gcc dot gnu.org Target Milestone: --- This is from one encountered ICE when using const type: https://gcc.gnu.org/pipermail/gcc-patches/2022-August/600751.html As the above link, the ICE reproduction requires to use type ptr_vector_quad_type_node for the pointer type build and under lto, function gimple_canonical_types_compatible_p is intended to check if const __vector_quad is canonical types compatible to __vector_quad, the arguments are: const __vector_quad, __vector_quad and false. For now, in function gimple_canonical_types_compatible_p we don't handle OPAQUE_TYPE explicitly, so it will go to the code: /* Consider all types with language specific trees in them mutually compatible. This is executed only from verify_type and false positives can be tolerated. */ gcc_assert (!in_lto_p); return true; Since it's in wpa, the assertion failed.