From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12715 invoked by alias); 19 Feb 2018 04:39:32 -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 12703 invoked by uid 89); 19 Feb 2018 04:39:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy= X-HELO: mail-io0-f177.google.com Received: from mail-io0-f177.google.com (HELO mail-io0-f177.google.com) (209.85.223.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Feb 2018 04:39:30 +0000 Received: by mail-io0-f177.google.com with SMTP id b34so7121142ioj.6 for ; Sun, 18 Feb 2018 20:39:30 -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=YuisTdzipeVBiAwapmGX5AHRdSIV7F507y+3Fwnpv7E=; b=NLaMGLKrLZGxDhmCrhFYRXnh7+jKkQTjYBeYHRKFn1an/FYorz6T92BOxvFL3Yvvoy zNoD5AJ4NitU24pNultVXaifafYbH3UROwEw+x6z4x1FT/o7Hjqd50+vInYrcEPUZXiO JrbhfHr11GeJKSnCSJdzaA+RBLYSo++plXvC01Fmrt1v2Y7azUnd4fIpSmJjiA7ll28a baDsb/BszN2UzZhPemTrWUrARVqHZ63n2xzi11z+9KublP69rkcHzb57i/ayGs/KWMnF /dRbqk7057uhoiFJWlXtTKCPjcsx3oZ1RFke7kMYKhizZHa7GtYVLcwn7uY6KFWNjbUF ECXw== X-Gm-Message-State: APf1xPBEX4kxLGuL2TiCIMj67GZGYxQD83B1COb8DhB70SD+trmRwpFw NHIEAJpcrfOEotLJiSRC0/UoNXe/Vvx1R9SeHG/OJw== X-Google-Smtp-Source: AH8x227+vFLTm0OTXdiMgRaGtPrSzhdZs0tm9g4jW2N49fObtNnkbq1dEVAdn0dr6aiNBhNQWp/YbM9JeWL65T8lZow= X-Received: by 10.107.161.200 with SMTP id k191mr6436999ioe.270.1519015168501; Sun, 18 Feb 2018 20:39:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.17.200 with HTTP; Sun, 18 Feb 2018 20:39:08 -0800 (PST) In-Reply-To: <2a7a4f0c-052e-783a-a51c-8efa77839e8d@gmail.com> References: <786533c4-2017-86c0-8813-0bea046fc7d0@gmail.com> <2a7a4f0c-052e-783a-a51c-8efa77839e8d@gmail.com> From: Jason Merrill Date: Mon, 19 Feb 2018 04:39:00 -0000 Message-ID: Subject: Re: [PATCH] replace ICE with error for failed template deduction (PR 84355) To: Martin Sebor Cc: Gcc Patch List Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg01086.txt.bz2 On Fri, Feb 16, 2018 at 4:33 PM, Martin Sebor wrote: > On 02/16/2018 07:04 AM, Jason Merrill wrote: >> >> On Thu, Feb 15, 2018 at 6:36 PM, Martin Sebor wrote: >>> >>> A failed template deduction in template member of a template >>> triggers an ICE with -std=c++17 due to what seems like >>> a missing handling of invalid input. Replacing >>> the gcc_unreachable() call that causes the ICE with a return >>> statement indicating the deduction failure eliminates the ICE >>> and restores sane diagnostics. >> >> >> Hmm, we really shouldn't have gotten there; that assert is checking >> that when we see a TEMPLATE_*_PARM node in the template signature, it >> corresponds to one of the actual parms of the template. Sounds like >> something is going wrong in build_deduction_guide. > > > Are you suggesting that build_deduction_guide should fail somehow > (it's not expected to fail right now) or that the guide it creates > is wrong? The latter. Maybe we're handling T wrong somehow? We shouldn't be trying to deduce it. In fact, we probably shouldn't be trying to deduce arguments for 'b' until we instantiate A. Jason