On Thu, 9 Jan 2014 10:28:43, Jakub Jelinek wrote: > > On Thu, Jan 09, 2014 at 09:02:28AM +0000, Richard Sandiford wrote: >>> I think Jakub's patch will fix this case, but I did not try. >>> However even if the i368 is now clean, there are >>> still many targets that use target_reinit() in >>> target_set_current_function. >> >> FWIW I only see three others (nios, rs6000 and rx). nios and rs6000 >> are direct cut-&-pastes of the i386 version so should be easy to switch. >> rx looks more like MIPS in that it's switching between two specific >> subtargets. > > Yeah, if i386 is changed into SWITCHABLE_TARGET, then I'd strongly encourage > rs6000 and nios folks to follow the suit. > > Jakub
Ok for me. Hope they read this thread... If that is our policy for 4.9.0, then the comment in function.c where the targetm.set_current_function (fndecl); is called should _very_ clearly say that this callback is no longer allowed to call target_reinit() any more. Thanks Bernd.