diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-17 02:37:33 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-17 02:37:33 +0000 |
commit | 7341fceade35b9efb27a6f7e406b3c7096947836 (patch) | |
tree | d9789b0249ac2541f2232a3bff6da282ccbe9a40 /gcc/cp/search.c | |
parent | 69ed07ff6653de4fd0543fbd05493c65d11cdeed (diff) | |
download | gcc-7341fceade35b9efb27a6f7e406b3c7096947836.tar.gz |
* search.c (lookup_base): Handle NULL_TREE.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196738 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r-- | gcc/cp/search.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c index 4cc02ba7dfc..54a5e4ae75d 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -188,6 +188,14 @@ lookup_base (tree t, tree base, base_access access, tree t_binfo; base_kind bk; + /* "Nothing" is definitely not derived from Base. */ + if (t == NULL_TREE) + { + if (kind_ptr) + *kind_ptr = bk_not_base; + return NULL_TREE; + } + if (t == error_mark_node || base == error_mark_node) { if (kind_ptr) |