> On 07/04/14 03:05, Jan Hubicka wrote: > >Hi, > >BLOCK_SUPERCONTEXT for normal blocks leads all the way to FUNCTOIN_DECL. > >This is not the case of some > >automatically generated functions, like one for cilk. I think it is bug. > >This patch fixes cilk, I will > >look for other cases if that looks OK. > > > >Bootstrapped/regtested x86_64-linux > > > >Honza > > > > * cilk.c (create_cilk_helper_decl): Create toplevel block correctly. > But doesn't this put the CILK created FUNCTION_DECL within the scope FNDECL?
I am not sure I understand your question... FNDECL is a newly created decl that will get its body filled in later. I believe the BLOCK_SUPERCONTEXT of its main block should be always FNDECL instead of NULL as for was majority of functions we produce... if that function contains code outlined from the main function, I think these are linked by ABSTRACT_ORIGIN. Honza > > Though I guess that may be reasonable since these decls are created > in response to the spawn keyword. To some degree they are nested > within the scope of the current function. > > OK. > > jeff