diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2014-12-07 08:35:11 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2014-12-07 07:35:11 +0000 |
commit | 3cb251b77933671acc8717ede172be28d839927f (patch) | |
tree | 94cb96a4a951949b96e031fdf5a464a3bdc185de /gcc/cgraph.h | |
parent | 8c8d3b4c128996f8188d76a0fe61e79b8304f0a8 (diff) | |
download | gcc-3cb251b77933671acc8717ede172be28d839927f.zip gcc-3cb251b77933671acc8717ede172be28d839927f.tar.gz gcc-3cb251b77933671acc8717ede172be28d839927f.tar.bz2 |
symtab.c (symtab_node::equal_address_to): New function.
* 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.
From-SVN: r218462
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 54ee748..997414c 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) |