From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28645 invoked by alias); 21 Dec 2018 02:51: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 28622 invoked by uid 89); 21 Dec 2018 02:51:06 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=HX-Gm-Message-State:sk:AJcUukd X-HELO: mail-qt1-f174.google.com Received: from mail-qt1-f174.google.com (HELO mail-qt1-f174.google.com) (209.85.160.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Dec 2018 02:51:05 +0000 Received: by mail-qt1-f174.google.com with SMTP id k12so4198173qtf.7 for ; Thu, 20 Dec 2018 18:51:05 -0800 (PST) Return-Path: Received: from [192.168.1.149] (209-6-216-142.s141.c3-0.smr-cbr1.sbo-smr.ma.cable.rcncustomer.com. [209.6.216.142]) by smtp.gmail.com with ESMTPSA id m1sm6398777qkh.15.2018.12.20.18.51.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Dec 2018 18:51:02 -0800 (PST) Subject: Re: C++ PATCH for c++/88196, ICE with class non-type template parameter To: Marek Polacek , GCC Patches References: <20181220215403.GQ21364@redhat.com> From: Jason Merrill Message-ID: Date: Fri, 21 Dec 2018 02:51:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <20181220215403.GQ21364@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg01527.txt.bz2 On 12/20/18 4:54 PM, Marek Polacek wrote: > This testcase breaks in C++20 because convert_nontype_argument gets a PTRMEM_CST > as the expression, and we're trying to convert it to a class type, which > doesn't work, but because of the PTRMEM_CST check below we never diagnosed it. > > The comment says a PTRMEM_CST is a valid template argument for a parameter of > pointer to member type, but it doesn't check that that's what we're converting > it to. Fixed by adding such a check. > > Bootstrapped/regtested on x86_64-linux, ok for trunk? OK. Jason