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

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #3)
> > > We ICE on the fact that _ZTV1aIN12_GLOBAL__N_11fEE which is vtable for
> > > anonymous namespace type but it has EXTERNAL flag set.
> > > 
> > > Jason, why this happens? I am changing type to C++: if there is indeed 
> > > legal
> > > reason to have exported vtables for anonymous types, then we can simply 
> > > drop
> > > the sanity check.
> > 
> > It isn't exported; it has DECL_EXTERNAL set because it isn't defined, and it
> > isn't defined because nothing uses it, so it isn't needed.  Note that it 
> > isn't
> > TREE_PUBLIC.
> 
> Hmm, so perhaps just adjusting sanity check to also check ||
> !TREE_PUBLIC?

I'd suggest changing the behavior on type_in_anonymous_namespace_p to just
"return decl".

Reply via email to