From patchwork Thu Mar 21 03:10:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Merrill X-Patchwork-Id: 229543 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id A97A82C00BF for ; Thu, 21 Mar 2013 14:10:43 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; q=dns; s=default; b=p07+hAPQ9RKCrhiMS xeH/rod3/Q1R4QhWGHQtyquLL+W2sQBzwActt5FFORFx72FtwkJs05nRLlenEcsB 2lCUknUXXnm3rdoXPY0vBYOM9qxbn+Vu+05By1qBOJgM5m46IEtDvG3ajvhTNJPk BsyJNgTpMruNMXT1+yTNXcuEH4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; s=default; bh=RnbZflmqr6XQdIGbsIB6/Q+ nMgw=; b=TyOfeasM9JQXo3Q7ZdF0R4VujtExe4gFaAAciOY0dKaXhQUpQdmYfiR XtzpNX5gjs0vMYqR+LyWlAiix7J1zzUFLh6RfnFl7NkmNswhrwCsXO7K4G/F7FoI Rcu4DxialaPJ3nDBGjXMCC0SjEs8p5p0wiY2I78TlFk57lzNxYBE= Received: (qmail 25412 invoked by alias); 21 Mar 2013 03:10:37 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 25386 invoked by uid 89); 21 Mar 2013 03:10:29 -0000 X-Spam-SWARE-Status: No, score=-8.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 21 Mar 2013 03:10:26 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2L3APgi011686 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 20 Mar 2013 23:10:25 -0400 Received: from [10.3.113.56] (ovpn-113-56.phx2.redhat.com [10.3.113.56]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r2L3AObg004778 for ; Wed, 20 Mar 2013 23:10:25 -0400 Message-ID: <514A7A20.1030104@redhat.com> Date: Wed, 20 Mar 2013 23:10:24 -0400 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:21.0) Gecko/20100101 Thunderbird/21.0a2 MIME-Version: 1.0 To: gcc-patches List Subject: Re: C++ PATCH for c++/17232 (abstract class, array and sfinae) References: <5144CA1F.8060605@redhat.com> <5146289B.4070802@redhat.com> <514A79F5.4060905@redhat.com> In-Reply-To: <514A79F5.4060905@redhat.com> And this is a robustness change that I ended up not needing, but still makes sense. commit 3099f644d5427e1db3b4041ca4ed779ef213b6a0 Author: Jason Merrill 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;