From c99b736ec0bcdc7d26ae53ae2f3ed2d8896ad06a Mon Sep 17 00:00:00 2001 From: jason Date: Thu, 21 Mar 2013 03:25:23 +0000 Subject: [PATCH] * pt.c (retrieve_specialization): Handle null tmpl argument. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196850 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 2 ++ gcc/cp/pt.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4191c860786..bef6faeb654 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 2013-03-20 Jason Merrill + * pt.c (retrieve_specialization): Handle null tmpl argument. + PR c++/17232 PR c++/56642 * pt.c (tsubst_decl): Check return value of register_specialization. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 531d8607aff..d56ffede6b6 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -1009,6 +1009,9 @@ optimize_specialization_lookup_p (tree tmpl) static tree retrieve_specialization (tree tmpl, tree args, hashval_t hash) { + if (tmpl == NULL_TREE) + return NULL_TREE; + if (args == error_mark_node) return NULL_TREE; -- 2.11.4.GIT