]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* pt.c (retrieve_specialization): Handle null tmpl argument.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Mar 2013 03:25:23 +0000 (03:25 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Mar 2013 03:25:23 +0000 (03:25 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196850 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/pt.c

index 4191c860786f454c212c3da76be45f2153f57db1..bef6faeb65469ecd348ba1810575fb17ffcc553b 100644 (file)
@@ -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.
index 531d8607aff393b0ac5eb46f3e09c030067edec6..d56ffede6b68ae24012c98e510ae8c6a67924d74 100644 (file)
@@ -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;