This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ patch] Avoid re-synthetizing methods


> > I found the unprotected call be insinde synthetize_method itself.  Again I
> > don't see quite why DECL_INITIAL is not set for the clone when the clone is
> > supposed to be inicialized but the attached patch fixes the crash at least.
> 
> It fixes the crash, but not the real bug.
> 
> You need to answer the question you've implied -- how is it that the
> main function got its DECL_INITIAL set but the clone did not?

OK, it is the case where synthetize_method is called, it produces body,
does expansion of it and during testing function inlinability it calls
instantiate_decl that in turn calls mark_used on different clone of very
same function that ends up calling synthetize_method again as that clone
has not been initialized yet... Funny.

Honza
> 
> -- 
> Mark Mitchell
> CodeSourcery, LLC
> mark@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]