X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Ftree-nested.c;h=d2608a837f0eed415dfaa1cbe39ad2c44ce6dc50;hb=158eddcca188bb48469098a88c69624d20a0549c;hp=135ac0486a8a8976d4a4fb751823e9ed2387a2a5;hpb=ce45a448519f33c37b3ab6819fed86b28c267ab8;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c index 135ac0486a8..d2608a837f0 100644 --- a/gcc/tree-nested.c +++ b/gcc/tree-nested.c @@ -1207,6 +1207,7 @@ finalize_nesting_tree_1 (struct nesting_info *root) tree stmt_list = NULL; tree context = root->context; struct function *sf; + struct cgraph_node *node; /* If we created a non-local frame type or decl, we need to lay them out at this time. */ @@ -1317,6 +1318,15 @@ finalize_nesting_tree_1 (struct nesting_info *root) /* Dump the translated tree function. */ dump_function (TDI_nested, root->context); + node = cgraph_node (root->context); + + /* For nested functions update the cgraph to reflect unnesting. + We also delay finalizing of these functions up to this point. */ + if (node->origin) + { + cgraph_unnest_node (cgraph_node (root->context)); + cgraph_finalize_function (root->context, true); + } } static void