aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-structalias.cc')
-rw-r--r--gcc/tree-ssa-structalias.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-ssa-structalias.cc b/gcc/tree-ssa-structalias.cc
index 3ad0c69..deca44a 100644
--- a/gcc/tree-ssa-structalias.cc
+++ b/gcc/tree-ssa-structalias.cc
@@ -6562,7 +6562,7 @@ create_variable_info_for (tree decl, const char *name, bool add_id)
varpool_node *vnode = varpool_node::get (decl);
/* For escaped variables initialize them from nonlocal. */
- if (!vnode->all_refs_explicit_p ())
+ if (!vnode || !vnode->all_refs_explicit_p ())
make_copy_constraint (vi, nonlocal_id);
/* While we can in theory walk references for the varpool
@@ -6581,7 +6581,7 @@ create_variable_info_for (tree decl, const char *name, bool add_id)
process_constraint (new_constraint (lhs, *rhsp));
/* If this is a variable that escapes from the unit
the initializer escapes as well. */
- if (!vnode->all_refs_explicit_p ())
+ if (!vnode || !vnode->all_refs_explicit_p ())
{
lhs.var = escaped_id;
lhs.offset = 0;