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. Index: cilk.c =================================================================== --- cilk.c (revision 212278) +++ cilk.c (working copy) @@ -314,6 +314,7 @@ create_cilk_helper_decl (struct wrapper_ tree block = make_node (BLOCK); DECL_INITIAL (fndecl) = block; TREE_USED (block) = 1; + BLOCK_SUPERCONTEXT (block) = fndecl; gcc_assert (!DECL_SAVED_TREE (fndecl)); /* Inlining would defeat the purpose of this wrapper.