https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70029
Jan Hubicka <hubicka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at redhat dot com --- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Jason, Marek, it seems that the issue is in build_ref_qualified_type in C++ frontend. It builds a type variant which is correctly built with tree.c as having same canonical type as the main variant and then it does: 1972 else 1973 /* T is its own canonical type. */ 1974 TYPE_CANONICAL (t) = t; here we end up with TYPE_CANONICAL being a variant type. This seems odd to me, but it looks like this code is intentional. I think the effect of this code is that pointer to TYPE and pointer to T (i.e. the type and the qualified type we build it from) will be considered incompatible. So it seemt o me that hunk should be dropped? Honza