diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2014-05-25 00:02:13 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2014-05-24 22:02:13 +0000 |
commit | 6adda80bb23e3c2bbe754ecb25afcc5c197a7943 (patch) | |
tree | 6ff3d4337fb98a7b110f8f89c2d8927d86b6622e | |
parent | aede2c10ca855d3b00020caf846aae6d9d378ebe (diff) | |
download | gcc-6adda80bb23e3c2bbe754ecb25afcc5c197a7943.zip gcc-6adda80bb23e3c2bbe754ecb25afcc5c197a7943.tar.gz gcc-6adda80bb23e3c2bbe754ecb25afcc5c197a7943.tar.bz2 |
gimple-fold.c (can_refer_decl_in_current_unit_p): Be sure that var decl is available.
* gimple-fold.c (can_refer_decl_in_current_unit_p): Be sure
that var decl is available.
From-SVN: r210902
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/gimple-fold.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 09f014a..9477db8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2014-05-23 Jan Hubicka <hubicka@ucw.cz> + * gimple-fold.c (can_refer_decl_in_current_unit_p): Be sure + that var decl is available. + +2014-05-23 Jan Hubicka <hubicka@ucw.cz> + * tree-core.h (tree_decl_with_vis): Replace comdat_group by symtab_node pointer. * tree.c (copy_node_stat): Be sure tonot copy diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c index 44bb0e2..a9c01bd 100644 --- a/gcc/gimple-fold.c +++ b/gcc/gimple-fold.c @@ -114,7 +114,8 @@ can_refer_decl_in_current_unit_p (tree decl, tree from_decl) && (vnode = varpool_get_node (from_decl)) != NULL && vnode->definition) || (flag_ltrans - && symtab_get_node (from_decl)->in_other_partition)) + && (vnode = varpool_get_node (from_decl)) != NULL + && vnode->in_other_partition)) return true; /* We are folding reference from external vtable. The vtable may reffer to a symbol keyed to other compilation unit. The other compilation |