diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2014-01-08 22:39:07 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2014-01-08 22:39:07 +0000 |
commit | ff36fcbe09845c3bdf11757e96be18741857b4a8 (patch) | |
tree | d21f8e2d032efdaf27e5118bc18444f4ba9472b9 /gcc/cgraph.h | |
parent | 03694c4310bacc44251926dc68cb3ff22d63e8a7 (diff) | |
download | gcc-ff36fcbe09845c3bdf11757e96be18741857b4a8.zip gcc-ff36fcbe09845c3bdf11757e96be18741857b4a8.tar.gz gcc-ff36fcbe09845c3bdf11757e96be18741857b4a8.tar.bz2 |
* cgraph.h (varpool_variable_node): Do not choke on null node.
From-SVN: r206449
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r-- | gcc/cgraph.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 8b25d94..7ce5401 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -1426,8 +1426,12 @@ varpool_variable_node (varpool_node *node, { varpool_node *n; - n = dyn_cast <varpool_node> (symtab_alias_ultimate_target (node, - availability)); + if (node) + n = dyn_cast <varpool_node> (symtab_alias_ultimate_target (node, + availability)); + else + n = NULL; + if (!n && availability) *availability = AVAIL_NOT_AVAILABLE; return n; |