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
This commit is contained in:
Jan Hubicka 2014-05-25 00:02:13 +02:00 committed by Jan Hubicka
parent aede2c10ca
commit 6adda80bb2
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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