From patchwork Fri Oct 14 18:55:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Merrill X-Patchwork-Id: 119905 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]) by ozlabs.org (Postfix) with SMTP id C9C3EB7090 for ; Sat, 15 Oct 2011 05:56:16 +1100 (EST) Received: (qmail 26472 invoked by alias); 14 Oct 2011 18:56:15 -0000 Received: (qmail 26460 invoked by uid 22791); 14 Oct 2011 18:56:14 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL, BAYES_00, MISSING_HEADERS, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 14 Oct 2011 18:55:48 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9EItlEL000820 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 14 Oct 2011 14:55:47 -0400 Received: from [127.0.0.1] (ovpn-113-122.phx2.redhat.com [10.3.113.122]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p9EItkVR017115 for ; Fri, 14 Oct 2011 14:55:46 -0400 Message-ID: <4E9885B1.5070900@redhat.com> Date: Fri, 14 Oct 2011 14:55:45 -0400 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1 MIME-Version: 1.0 CC: gcc-patches List Subject: Re: C++ PATCH for c++/50614 (ICE with NSDMI and -fcompare-debug) References: <4E97568E.7090406@redhat.com> In-Reply-To: <4E97568E.7090406@redhat.com> 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 On 10/13/2011 05:22 PM, Jason Merrill wrote: > + DECL_INITIAL (r) = error_mark_node; While working on 50507 I noticed that we check for error_mark_node in walk_field_subobs, so I'm changing the placeholder to void_zero_node. Tested x86_64-pc-linux-gnu, applying to trunk. commit ca436fb810b1b85abcb3bd7bc950e55df259dafd Author: Jason Merrill Date: Thu Oct 13 21:56:23 2011 -0400 * pt.c (tsubst_decl) [FIELD_DECL]: Use void_zero_node instead of error_mark_node as a placeholder. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 1632c01..bbe1139 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -10273,8 +10273,8 @@ tsubst_decl (tree t, tree args, tsubst_flags_t complain) { /* Set up DECL_TEMPLATE_INFO so that we can get at the NSDMI in perform_member_init. Still set DECL_INITIAL - to error_mark_node so that we know there is one. */ - DECL_INITIAL (r) = error_mark_node; + so that we know there is one. */ + DECL_INITIAL (r) = void_zero_node; gcc_assert (DECL_LANG_SPECIFIC (r) == NULL); retrofit_lang_decl (r); DECL_TEMPLATE_INFO (r) = build_template_info (t, args);