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: [PATCH] Clear DECL_LANG_SPECIFIC after changing arguments (PR tree-optimization/60002)


> Hi!
> 
> As described in the PR, while build_function_decl_skip_args
> takes care of changing the type from METHOD_TYPE to FUNCTION_TYPE
> if removing first argument (this), the FE may have other special arguments
> that it is aware of (such as in-charge etc.) and if the this argument
> is not removed, but the other arguments are, then the FE can crash
> upon seeing such methods.
> 
> Fixed by clearing DECL_LANG_SPECIFIC if we remove any arguments.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> 
> 2014-02-04  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR tree-optimization/60002
> 	* cgraphclones.c (build_function_decl_skip_args): Clear
> 	DECL_LANG_SPECIFIC.
> 
> 	* g++.dg/opt/pr60002.C: New test.

Seems OK to me.  So we basically care to not crash from langhooks, right?
Naturally, those should go away ;)

Honza


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