Commit 77f846e9 by Richard Guenther Committed by Richard Biener

re PR target/47822 (Multiple test suite failures due to revision 170321)

2011-02-20  Richard Guenther  <rguenther@suse.de>

	PR lto/47822
	* tree.c (free_lang_data_in_decl): Clean builtins from
	the TU decl BLOCK_VARS.

From-SVN: r170339
parent 6e549dd2
2011-02-20 Richard Guenther <rguenther@suse.de>
PR lto/47822
* tree.c (free_lang_data_in_decl): Clean builtins from
the TU decl BLOCK_VARS.
2011-02-19 Alexandre Oliva <aoliva@redhat.com>
PR debug/47620
......
......@@ -4577,6 +4577,25 @@ free_lang_data_in_decl (tree decl)
}
else if (TREE_CODE (decl) == TYPE_DECL)
DECL_INITIAL (decl) = NULL_TREE;
else if (TREE_CODE (decl) == TRANSLATION_UNIT_DECL
&& DECL_INITIAL (decl)
&& TREE_CODE (DECL_INITIAL (decl)) == BLOCK)
{
/* Strip builtins from the translation-unit BLOCK. We still have
targets without builtin_decl support and also builtins are
shared nodes and thus we can't use TREE_CHAIN in multiple
lists. */
tree *nextp = &BLOCK_VARS (DECL_INITIAL (decl));
while (*nextp)
{
tree var = *nextp;
if (TREE_CODE (var) == FUNCTION_DECL
&& DECL_BUILT_IN (var))
*nextp = TREE_CHAIN (var);
else
nextp = &TREE_CHAIN (var);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment