summaryrefslogtreecommitdiff
path: root/gcc/cp/search.c
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-23 12:14:56 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-23 12:14:56 +0000
commita9d891a46fc3e7d5a768367d57ca8894c3ab4cd4 (patch)
treec930c8d6bf8525eccaa0e1b6a99bfea98bd244f7 /gcc/cp/search.c
parenta54caa56bef47dcf8b1ff70e1f81cc1081880c3e (diff)
downloadgcc-a9d891a46fc3e7d5a768367d57ca8894c3ab4cd4.tar.gz
PR c++/59111
cp/ * search.c (lookup_conversions): Return NULL_TREE if !CLASS_TYPE_P. testsuite/ * g++.dg/cpp0x/pr59111.C: New test. * g++.dg/cpp1y/pr59110.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206177 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r--gcc/cp/search.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index 166ac116fd3..b700be9a7e2 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -2506,7 +2506,7 @@ lookup_conversions (tree type)
tree list = NULL_TREE;
complete_type (type);
- if (!TYPE_BINFO (type))
+ if (!CLASS_TYPE_P (type) || !TYPE_BINFO (type))
return NULL_TREE;
lookup_conversions_r (TYPE_BINFO (type), 0, 0,