From: hubicka Date: Tue, 5 Oct 2010 16:15:00 +0000 (+0000) Subject: * cgraphunit.c (assemble_function): Output thunks and aliases before X-Git-Url: http://git.sourceforge.jp/view?a=commitdiff_plain;h=f777731452a61b365196ab1c9a9090f087b8596b;p=pf3gnuchains%2Fgcc-fork.git * cgraphunit.c (assemble_function): Output thunks and aliases before the function itself. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164994 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cf45a53ff12..924eb98e029 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-09-29 Jan Hubicka + + * cgraphunit.c (assemble_function): Output thunks and aliases before + the function itself. + 2010-09-29 Hariharan Sandanagobalane * config/picochip/picochip.c (picochip_option_override): Disable diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index b51a71c2b72..e9d1f1df09b 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -1470,15 +1470,6 @@ cgraph_expand_function (struct cgraph_node *node) announce_function (decl); node->process = 0; - - gcc_assert (node->lowered); - - /* Generate RTL for the body of DECL. */ - tree_rest_of_compilation (decl); - - /* Make sure that BE didn't give up on compiling. */ - gcc_assert (TREE_ASM_WRITTEN (decl)); - current_function_decl = NULL; if (node->same_body) { struct cgraph_node *alias, *next; @@ -1498,7 +1489,17 @@ cgraph_expand_function (struct cgraph_node *node) assemble_thunk (alias); } node->alias = saved_alias; + cgraph_process_new_functions (); } + + gcc_assert (node->lowered); + + /* Generate RTL for the body of DECL. */ + tree_rest_of_compilation (decl); + + /* Make sure that BE didn't give up on compiling. */ + gcc_assert (TREE_ASM_WRITTEN (decl)); + current_function_decl = NULL; gcc_assert (!cgraph_preserve_function_body_p (decl)); cgraph_release_function_body (node); /* Eliminate all call edges. This is important so the GIMPLE_CALL no longer