https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87663
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org, | |rguenth at gcc dot gnu.org --- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> --- I think the "variant" type set_underlying_type builds doesn't have to be in the variant type list. The only thing that is probably needed is that it has TYPE_CANONICAL (tt) = TYPE_CANONICAL (TREE_TYPE (x)); Other than that this whole dance of set_underlying_type & friends should probably be revisited in the light of early debug info generation (add a debug hook to emit DIEs in whatever way this is supposed to happen through this mechanism?). That is, if the FE knows an object is of a type with name X then say so rather than requiring this type copy that is just used to refer to the typedef. That is, it looks like a quite awkward and expensive way to communicate this to dwarf2out.