re PR bootstrap/41436 (Revision 152018 failed to bootstrap on i386)

PR bootstrap/41436
	* cgraphunit.c (cgraph_lower_function): Set DECL_NO_STATIC_CHAIN
	on non-nested functions.

From-SVN: r152067
This commit is contained in:
Jakub Jelinek 2009-09-23 15:06:20 +02:00 committed by Jakub Jelinek
parent d4c74acca9
commit 66f0e027f5
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2009-09-23 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/41436
* cgraphunit.c (cgraph_lower_function): Set DECL_NO_STATIC_CHAIN
on non-nested functions.
2009-09-23 Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>

View File

@ -498,6 +498,11 @@ cgraph_lower_function (struct cgraph_node *node)
lower_nested_functions (node->decl);
gcc_assert (!node->nested);
/* Non-nested functions never need a static chain. */
if (!DECL_NO_STATIC_CHAIN (node->decl)
&& decl_function_context (node->decl) == NULL)
DECL_NO_STATIC_CHAIN (node->decl) = 1;
tree_lowering_passes (node->decl);
node->lowered = true;
}