And this is a robustness change that I ended up not needing, but still makes sense.
commit 3099f644d5427e1db3b4041ca4ed779ef213b6a0
Author: Jason Merrill <ja...@redhat.com>
Date:   Tue Mar 19 11:34:46 2013 -0400

    	* pt.c (retrieve_specialization): Handle null tmpl argument.

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;
 

Reply via email to