decl2.c (constrain_visibility): Clear WEAK and COMMON flags.
* decl2.c (constrain_visibility): Clear WEAK and COMMON flags. * ipa.c (function_and_variable_visibility): Verify that WEAK || COMMON imply PUBLIC || EXTERNAL. From-SVN: r154115
This commit is contained in:
parent
0a8fff5778
commit
fcc993f6f5
|
@ -1,3 +1,8 @@
|
||||||
|
2009-11-12 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
|
* ipa.c (function_and_variable_visibility): Verify that WEAK || COMMON
|
||||||
|
imply PUBLIC || EXTERNAL.
|
||||||
|
|
||||||
2009-11-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
|
2009-11-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
|
||||||
|
|
||||||
PR middle-end/41440
|
PR middle-end/41440
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2009-11-12 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
|
* decl2.c (constrain_visibility): Clear WEAK and COMMON flags.
|
||||||
|
|
||||||
2009-11-11 Jason Merrill <jason@redhat.com>
|
2009-11-11 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
PR c++/39131
|
PR c++/39131
|
||||||
|
|
|
@ -1883,6 +1883,8 @@ constrain_visibility (tree decl, int visibility)
|
||||||
if (!DECL_EXTERN_C_P (decl))
|
if (!DECL_EXTERN_C_P (decl))
|
||||||
{
|
{
|
||||||
TREE_PUBLIC (decl) = 0;
|
TREE_PUBLIC (decl) = 0;
|
||||||
|
DECL_WEAK (decl) = 0;
|
||||||
|
DECL_COMMON (decl) = 0;
|
||||||
DECL_COMDAT_GROUP (decl) = NULL_TREE;
|
DECL_COMDAT_GROUP (decl) = NULL_TREE;
|
||||||
DECL_INTERFACE_KNOWN (decl) = 1;
|
DECL_INTERFACE_KNOWN (decl) = 1;
|
||||||
if (DECL_LANG_SPECIFIC (decl))
|
if (DECL_LANG_SPECIFIC (decl))
|
||||||
|
|
|
@ -292,6 +292,7 @@ function_and_variable_visibility (bool whole_program)
|
||||||
|
|
||||||
for (node = cgraph_nodes; node; node = node->next)
|
for (node = cgraph_nodes; node; node = node->next)
|
||||||
{
|
{
|
||||||
|
gcc_assert (!DECL_WEAK (node->decl) || TREE_PUBLIC (node->decl) || DECL_EXTERNAL (node->decl));
|
||||||
if (cgraph_externally_visible_p (node, whole_program))
|
if (cgraph_externally_visible_p (node, whole_program))
|
||||||
{
|
{
|
||||||
gcc_assert (!node->global.inlined_to);
|
gcc_assert (!node->global.inlined_to);
|
||||||
|
@ -316,6 +317,8 @@ function_and_variable_visibility (bool whole_program)
|
||||||
{
|
{
|
||||||
if (!vnode->finalized)
|
if (!vnode->finalized)
|
||||||
continue;
|
continue;
|
||||||
|
gcc_assert ((!DECL_WEAK (vnode->decl) || DECL_COMMON (vnode->decl))
|
||||||
|
|| TREE_PUBLIC (vnode->decl) || DECL_EXTERNAL (node->decl));
|
||||||
if (vnode->needed
|
if (vnode->needed
|
||||||
&& (DECL_COMDAT (vnode->decl) || TREE_PUBLIC (vnode->decl))
|
&& (DECL_COMDAT (vnode->decl) || TREE_PUBLIC (vnode->decl))
|
||||||
&& (!whole_program
|
&& (!whole_program
|
||||||
|
|
Loading…
Reference in New Issue