From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128483 invoked by alias); 31 Jan 2018 15:41:08 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 128473 invoked by uid 89); 31 Jan 2018 15:41:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=Hx-languages-length:1529, H*RU:209.85.214.66, Hx-spam-relays-external:209.85.214.66 X-HELO: mail-it0-f66.google.com Received: from mail-it0-f66.google.com (HELO mail-it0-f66.google.com) (209.85.214.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 31 Jan 2018 15:41:01 +0000 Received: by mail-it0-f66.google.com with SMTP id 68so38448ite.4 for ; Wed, 31 Jan 2018 07:41:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=uK6pVElnCQRV/DoyIVZV69R369D710DKyF8pCvIeen8=; b=h2Ua6EPVyFNCqKJAeup5ZsK9+LQIzC08VRbY48vbce14nNmOAPYkDoRGYSaBFD/1kB YFCrY8dpK4CvMXYG09tSiRLfpHiEUtT+ck55PBEM7Zf/uDft42PCwDvhhaYDzE8ya3c+ Dww9VsSfa/sWxe+RIcZ8dnKL/axC+ImbamCUpIV0HPoc5u+cU6UYWh6kfFbKwDrhoxgJ JbOao3b3hF5KFsYVb3EbUm0/DzTRWJZR5BN3xuj0s4TI8UkdBeUjMypg8BhBV+Tgp94S ndKkbfTIZ8Jzemt3tlT8+emo+KXQ706AqEkNrNkCYv7H0HAt8I4YVFH0e4DguyfSnODP O9uw== X-Gm-Message-State: AKwxytfezI0W0ndIoAG4elIYU2ZwQDWOGLGYOBR+TrAxDaA3HkZGOSOD lF96sIJxYL6DVAPKJB8wsVzEzpJIZLn8OfkVHARfwg== X-Google-Smtp-Source: AH8x227cnQ2igSrgB5tpPjVNRgJTyWFM1zNDcr0f4damSBQVKyHbKS+HzRrlW9zcIxqN2669CMN8lAOkyFsmGHrH2q4= X-Received: by 10.36.145.143 with SMTP id i137mr22896491ite.6.1517413259214; Wed, 31 Jan 2018 07:40:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.17.206 with HTTP; Wed, 31 Jan 2018 07:40:38 -0800 (PST) In-Reply-To: <9b30cab2-52e1-5005-367b-6554cfa672ce@oracle.com> References: <308f9750-52ed-4cd3-2340-50d189b24349@oracle.com> <9b30cab2-52e1-5005-367b-6554cfa672ce@oracle.com> From: Jason Merrill Date: Wed, 31 Jan 2018 16:22:00 -0000 Message-ID: Subject: Re: [C++ Patch] PR 84092 ("[8 Regression] ICE on C++14 code with variable template: in build_qualified_name, at cp/tree.c:2043") To: Paolo Carlini Cc: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg02457.txt.bz2 OK. On Mon, Jan 29, 2018 at 5:00 PM, Paolo Carlini wrote: > Hi, > > On 29/01/2018 21:41, Jason Merrill wrote: >> >> On Mon, Jan 29, 2018 at 10:45 AM, Paolo Carlini >> wrote: >>> >>> the fix for c++/81236 removed some special code for dependent_p from >>> finish_id_expression, and now finish_qualified_id_expr is used for this >>> snippet too. Then special code at the beginning of the latter takes care >>> of >>> calling build_qualified_name to create the relevant SCOPE_REF. Therefore >>> it >>> seems to me that - unless we really want to return an OFFSET_REF - at >>> that >>> point we are done, we don't want to get to the end of the following long >>> conditional and call again build_qualified_name on the SCOPE_REF and ICE. >>> We >>> don't need convert_from_reference either because build_qualified_name is >>> passed a null type. Finishing testing (in the library) on x86_64-linux. >> >> Hmm, it seems to me that the later code would handle this case fine >> if, instead of calling build_qualified_name here, we do >> >> qualifying_class = TYPE_CONTEXT (expr); >> expr = TYPE_IDENTIFIER (expr); >> >> Does that work? > > Indeed it appears to work great and would make for a nice simplification, > thanks! Testing the below is already past the C++ testsuite. Ok if it fully > passes? > > Thanks again, > Paolo. > > //////////////////