diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2014-09-20 01:56:52 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2014-09-19 23:56:52 +0000 |
commit | f7217cde7f382aeb19dd3e80bc8f7ffae798315f (patch) | |
tree | d7d5f6d00208bddb323b80ac27eed3ded29bed4a /gcc/cgraph.h | |
parent | 3f99b0612f7db76b6ed1a25ecce8fa327eec9f61 (diff) | |
download | gcc-f7217cde7f382aeb19dd3e80bc8f7ffae798315f.zip gcc-f7217cde7f382aeb19dd3e80bc8f7ffae798315f.tar.gz gcc-f7217cde7f382aeb19dd3e80bc8f7ffae798315f.tar.bz2 |
re PR c++/61825 (g++.dg/cpp0x/static_assert9.C FAILs)
PR c++/61825
* c-family/c-common.c (handle_alias_ifunc_attribute): Check
that visibility change is possible
(handle_weakref_attribute): Likewise.
* cgraph.h (symtab_node): Add method get_create and
field refuse_visibility_changes.
(symtab_node::get_create): New method.
* fold-const.c (tree_single_nonzero_warnv_p): Use get_create.
* varasm.c (mark_weak): Verify that visibility change is
possible.
* gcc.dg/tree-ssa/nonzero-1.c: Require error to be output.
From-SVN: r215409
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r-- | gcc/cgraph.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 030a1c7..a316e40 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -346,6 +346,10 @@ public: return decl->decl_with_vis.symtab_node; } + /* Try to find a symtab node for declaration DECL and if it does not + exist or if it corresponds to an inline clone, create a new one. */ + static inline symtab_node * get_create (tree node); + /* Return the cgraph node that has ASMNAME for its DECL_ASSEMBLER_NAME. Return NULL if there's no such node. */ static symtab_node *get_for_asmname (const_tree asmname); @@ -394,7 +398,9 @@ public: unsigned analyzed : 1; /* Set for write-only variables. */ unsigned writeonly : 1; - + /* Visibility of symbol was used for further optimization; do not + permit further changes. */ + unsigned refuse_visibility_changes : 1; /*** Visibility and linkage flags. ***/ @@ -2519,4 +2525,12 @@ cgraph_node::mark_force_output (void) gcc_checking_assert (!global.inlined_to); } +inline symtab_node * symtab_node::get_create (tree node) +{ + if (TREE_CODE (node) == VAR_DECL) + return varpool_node::get_create (node); + else + return cgraph_node::get_create (node); +} + #endif /* GCC_CGRAPH_H */ |