This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Clear DECL_LANG_SPECIFIC after changing arguments (PR tree-optimization/60002)
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jason Merrill <jason at redhat dot com>, Jan Hubicka <hubicka at ucw dot cz>, Richard Biener <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 4 Feb 2014 18:08:11 +0100
- Subject: Re: [PATCH] Clear DECL_LANG_SPECIFIC after changing arguments (PR tree-optimization/60002)
- Authentication-results: sourceware.org; auth=none
- References: <20140204123743 dot GI12671 at tucnak dot redhat dot com>
> 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