aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2013-03-20 23:25:23 -0400
committerJason Merrill <jason@gcc.gnu.org>2013-03-20 23:25:23 -0400
commitc77f56bb5149721d410b2ff4e065bd3fc6c53cc7 (patch)
treeea13540f29a14e613b8c06ae35e43d057db811ef
parent9f5d44f495b5ed8dad5890c30ced1b1e3a8128f7 (diff)
downloadgcc-c77f56bb5149721d410b2ff4e065bd3fc6c53cc7.zip
gcc-c77f56bb5149721d410b2ff4e065bd3fc6c53cc7.tar.gz
gcc-c77f56bb5149721d410b2ff4e065bd3fc6c53cc7.tar.bz2
* pt.c (retrieve_specialization): Handle null tmpl argument.
From-SVN: r196850
-rw-r--r--gcc/cp/ChangeLog2
-rw-r--r--gcc/cp/pt.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 4191c86..bef6fae 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,7 @@
2013-03-20 Jason Merrill <jason@redhat.com>
+ * 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 531d860..d56ffed 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;