This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH for c++/17232 (abstract class, array and sfinae)
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 20 Mar 2013 23:10:24 -0400
- Subject: Re: C++ PATCH for c++/17232 (abstract class, array and sfinae)
- References: <5144CA1F dot 8060605 at redhat dot com> <5146289B dot 4070802 at redhat dot com> <514A79F5 dot 4060905 at redhat dot com>
And this is a robustness change that I ended up not needing, but still
makes sense.
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;