diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-07 07:35:11 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-07 07:35:11 +0000 |
commit | c11b875d3fdbf7e8a9f033ef63f66f4ae305f214 (patch) | |
tree | 94cb96a4a951949b96e031fdf5a464a3bdc185de /gcc/cgraph.h | |
parent | 7e20c7a8ec6dad78e5306dacff4a6c65c934055e (diff) | |
download | gcc-c11b875d3fdbf7e8a9f033ef63f66f4ae305f214.tar.gz |
* symtab.c (symtab_node::equal_address_to): New function.
* cgraph.h (symtab_node::equal_address_to): Declare.
* fold-const.c (fold_comparison, fold_binary_loc): Use it.
* c-family/c-common.c: Refuse weaks for symbols that can not change
visibility.
* gcc.dg/addr_equal-1.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218462 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r-- | gcc/cgraph.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 54ee7489416..997414ce894 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -332,6 +332,11 @@ public: /* Return true if symbol is known to be nonzero. */ bool nonzero_address (); + /* Return 0 if symbol is known to have different address than S2, + Return 1 if symbol is known to have same address as S2, + return 2 otherwise. */ + int equal_address_to (symtab_node *s2); + /* Return symbol table node associated with DECL, if any, and NULL otherwise. */ static inline symtab_node *get (const_tree decl) |