On Tue, Feb 04, 2014 at 01:43:01PM +0100, Richard Biener wrote: > On Tue, 4 Feb 2014, Jakub Jelinek wrote: > > > 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? > > Ok, but shouldn't we do that in the copy_node case as well? Two > places look like > > /* Make a new FUNCTION_DECL tree node */ > if (!args_to_skip) > new_decl = copy_node (old_decl); > else > new_decl = build_function_decl_skip_args (old_decl, args_to_skip, > false); > > it's no longer a FE created function after all?
It is not a FE created function then, sure, but if we don't remove any arguments, at least the issue the patch is fixing isn't a problem there. Jakub