From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60769 invoked by alias); 29 Nov 2018 03:34:19 -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 60668 invoked by uid 89); 29 Nov 2018 03:34:18 -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= X-HELO: mail-qt1-f170.google.com Received: from mail-qt1-f170.google.com (HELO mail-qt1-f170.google.com) (209.85.160.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Nov 2018 03:34:14 +0000 Received: by mail-qt1-f170.google.com with SMTP id v11so552382qtc.2 for ; Wed, 28 Nov 2018 19:34:14 -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 j38sm711072qtj.72.2018.11.28.19.34.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Nov 2018 19:34:12 -0800 (PST) Subject: Re: C++ PATCH for c++/88184, ICE when treating name as template-name To: Marek Polacek , GCC Patches References: <20181128154849.GD3269@redhat.com> From: Jason Merrill Message-ID: <51f04722-f35d-7df0-40a3-dc7926c82981@redhat.com> Date: Thu, 29 Nov 2018 03:34: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: <20181128154849.GD3269@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-11/txt/msg02403.txt.bz2 On 11/28/18 10:48 AM, Marek Polacek wrote: > Since P0846R0 was implemented, a name will be treated as a template-name when > it is an unqualified-id followed by a < and name lookup finds either one or > more functions or finds nothing, in order to potentially cause ADL to be performed. > > In this case, we had > > f (); > > where we'd found a decl for f (not a TEMPLATE_DECL) and < follows. From the backtrace in the PR, it seems as though we're treating f as non-dependent, which is wrong. type_dependent_expression_p only looks at the arguments of a TEMPLATE_ID_EXPR if it has unknown_type_node, so we probably want to give it that type. Jason