diff options
author | Jan Hubicka <jh@suse.cz> | 2010-10-04 22:59:07 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-10-04 20:59:07 +0000 |
commit | b3b9f3d0a808a2e0773e90d70dff2048270cc359 (patch) | |
tree | 1d98e516244d02c9fedbab147a5e449884c9d35c /gcc/gimple.c | |
parent | fa37ed29b9a77b698c67548a82484c5fab584b07 (diff) | |
download | gcc-b3b9f3d0a808a2e0773e90d70dff2048270cc359.zip gcc-b3b9f3d0a808a2e0773e90d70dff2048270cc359.tar.gz gcc-b3b9f3d0a808a2e0773e90d70dff2048270cc359.tar.bz2 |
gimple-fold.c (static_object_in_other_unit_p): Rename to...
* gimple-fold.c (static_object_in_other_unit_p): Rename to...
(can_refer_decl_in_current_unit_p): ... this one; reverse return
value; handle comdats too.
(canonicalize_constructor_val): Use it; handle function_decls
correctly.
(gimple_fold_obj_type_ref_known_binfo): Likewise.
* gimple.c (get_base_address): Accept all kinds of decls.
From-SVN: r164961
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r-- | gcc/gimple.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c index fa8acd0..54e6857 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -3013,7 +3013,8 @@ get_base_address (tree t) && TREE_CODE (TREE_OPERAND (t, 0)) == ADDR_EXPR) t = TREE_OPERAND (TREE_OPERAND (t, 0), 0); - if (SSA_VAR_P (t) + if (TREE_CODE (t) == SSA_NAME + || DECL_P (t) || TREE_CODE (t) == STRING_CST || TREE_CODE (t) == CONSTRUCTOR || INDIRECT_REF_P (t) |