> On 08/23/2013 10:51 AM, Jan Hubicka wrote:
> >Sadly we ICE here because BINFO of type is not built yet.
> >I tried to move the code after xref_binfos and it does seem to lead to errors
> >while building libstdc++ PCH.  Any idea what to do here?
> 
> If it's causing trouble, let's just put the flag on the type.

OK, I mostly need the flag on type anyway, so it will save some indirection.  I 
will
re-test and commit the variant using default_def flag of type.

In the next step I would like to introduce the DECL_CPP_CONSTRUCTOR/DESTRUCTOR 
macro.
The catch I run into is that these flags are tested on TEMPLATE_DECL so the 
middle-end
macro bombs on type checking.  I wonder what is best approach here.

I guess I can just disable FUNCTION_DECL checking on this macro in middle-end,
but I do not like it much.  Or I can have same C++ FE macros using the same
flag that also allow templates, but then we can get them out of sync.  Or I can
update 100+ places in C++ FE to use different macro on template or I can
introduce SET variant that will care about decl type or I can just have two
flags and make C++ FE to mirror DECL_CONSTRUCTOR_P into the middle end flag?

Any more resonable options?
> 
> >here I now can devirtualize b->foo into A because A is in anonymous 
> >namespace.
> >We however won't remove b because it is externally visible.  Is it valid to
> >bring b local based on fact that A is anonymous and thus no valid C++ program
> >can read it?
> 
> Hmm, determine_visibility ought to be doing that already.

You are right.  I simplified the testcase from code I looked at but probably I
overlooked something.  Sorry for the noise!

Honza

Reply via email to