ipa.c (function_and_variable_visibility): Fix my accidentail commit and clear DECL_COMMON on localized declarations.

* ipa.c (function_and_variable_visibility): Fix my accidentail commit and
	clear DECL_COMMON on localized declarations.

From-SVN: r154128
This commit is contained in:
Jan Hubicka 2009-11-12 20:13:17 +01:00 committed by Jan Hubicka
parent 0ccb5970ed
commit c8f59bc81c
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2009-11-12 Jan Hubicka <jh@suse.cz>
* ipa.c (function_and_variable_visibility): Fix my accidentail commit and
clear DECL_COMMON on localized declarations.
2009-11-12 Bernd Schmidt <bernd.schmidt@analog.com>
PR rtl-opt/38582

View File

@ -318,8 +318,8 @@ function_and_variable_visibility (bool whole_program)
{
if (!vnode->finalized)
continue;
gcc_assert ((!DECL_WEAK (vnode->decl) && !DECL_COMMON (vnode->decl) && !DECL_COMDAT (vnode->decl))
|| TREE_PUBLIC (vnode->decl) || DECL_EXTERNAL (node->decl));
gcc_assert ((!DECL_WEAK (vnode->decl) && !DECL_COMMON (vnode->decl))
|| TREE_PUBLIC (vnode->decl) || DECL_EXTERNAL (vnode->decl));
if (vnode->needed
&& (DECL_COMDAT (vnode->decl) || TREE_PUBLIC (vnode->decl))
&& (!whole_program
@ -337,6 +337,7 @@ function_and_variable_visibility (bool whole_program)
{
gcc_assert (whole_program || !TREE_PUBLIC (vnode->decl));
TREE_PUBLIC (vnode->decl) = 0;
DECL_COMMON (vnode->decl) = 0;
}
gcc_assert (TREE_STATIC (vnode->decl));
}