C++ PATCH for c++/17232 (abstract class, array and sfinae)

Submitted by Jason Merrill on March 21, 2013, 3:10 a.m.

Details

Message ID 514A7A20.1030104@redhat.com
State New
Headers show

Commit Message

Jason Merrill March 21, 2013, 3:10 a.m.
And this is a robustness change that I ended up not needing, but still 
makes sense.

Patch hide | download patch | download mbox

commit 3099f644d5427e1db3b4041ca4ed779ef213b6a0
Author: Jason Merrill <jason@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;