https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87957

--- Comment #32 from Jan Hubicka <hubicka at ucw dot cz> ---
> I guess we might end up streaming stuff we don't need.  Can't we simply
> remove the assert?  We do build the copy using the main variant type
> so this seems to be just a consistency check.
The consistency check prevents code from creating duplicated copies of
TYPE_DECL (if multiple types could reffer to one TYPE_DECL we would copy
it each time we copy a type).
We really should rewrite it to IDENTIFIER_TYPE for middle-end purposes
because TYPE_DECLs are useful only for C++ ODR types.  It just appeared
that tings works otherwise (i.e. we do not try to produce mangled name
for Ada types) because need_assembler_name_p return false or Ada
frontend makes assembler names of TYPE_DECLs NULL anyway. I will try
adding that check.

Honza

Reply via email to