From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 56569 invoked by alias); 28 Nov 2017 15:49:09 -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 56553 invoked by uid 89); 28 Nov 2017 15:49:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.7 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*RU:sk:ppp46-1, Hx-spam-relays-external:sk:ppp46-1, H*r:sk:ppp46-1, H*UA:2.3273 X-HELO: mail-lf0-f54.google.com Received: from mail-lf0-f54.google.com (HELO mail-lf0-f54.google.com) (209.85.215.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 28 Nov 2017 15:49:06 +0000 Received: by mail-lf0-f54.google.com with SMTP id l81so314644lfl.6 for ; Tue, 28 Nov 2017 07:49:06 -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:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=JkKmzT2Cq2L/c4zr6HEG7wonXfwupKyovlV0amCK0mo=; b=uZltjNqK9ftCVADeK85O9z2twVC4hStk2rzsO7mhSLbD1ggHENiQgrIzQ9zICtyoBb VVmRt2qUNz8WufpYy6aNiL8ZzTpcZ1dzoLDYP8XsOj2m9H0XRfUZ35l8XPnupUi7kHuK C5HB8jq6c4fc/vHqel80QBHFjFO+0PDcR7OXiCde4PuMu/j0i9269EEN3f8TXx1YusTj +jq4RCHu4OMYAZ/o+7Utwj/wotLlK9UgZRFAYwTU4x7Bi2zfu19jrcKzhm9dwwKXd/R3 HdjJX/sJCasSeUw4s83/eRmZCAAiaWtn/d+xKkhjkD2oitKrJj0KFoFcaulHHqn+lOOr c2gA== X-Gm-Message-State: AJaThX6neAqzcDG80Nb6znZGpyvkXNmrCEJmNY7/jYSdqDnzsNZeHq20 LmtyTlHnAGONeE91fMa4gWBT X-Google-Smtp-Source: AGs4zMbFZi5o9VvLnHiNtNcSZXsXCXtoF5/CL1DCggF18xRMhLuT53kSb+wDUP0QCdz/Axnv8RYGtw== X-Received: by 10.25.242.7 with SMTP id q7mr1082051lfh.32.1511884144422; Tue, 28 Nov 2017 07:49:04 -0800 (PST) Received: from [192.168.1.65] (ppp46-138-54-175.pppoe.spdop.ru. [46.138.54.175]) by smtp.gmail.com with ESMTPSA id d27sm2805570lfb.93.2017.11.28.07.49.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Nov 2017 07:49:03 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: C++ PATCH to primary_template_instantiation_p From: Maxim Kuvyrkov In-Reply-To: Date: Tue, 28 Nov 2017 16:00:00 -0000 Cc: gcc-patches List Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Jason Merrill X-SW-Source: 2017-11/txt/msg02411.txt.bz2 > On Nov 28, 2017, at 12:29 AM, Jason Merrill wrote: >=20 > All the uses of primary_template_instantiation_p actually want to > query whether the entity in question is a specialization of the > template, not whether it's an instantiation or explicit > specialization. >=20 > Tested x86_64-pc-linux-gnu, applying to trunk. > Hi Jason, I get the following failure with the new test on x86_64-linux-gnu and aarch= 64-linux-gnu: > --- /dev/null > +++ b/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg2a.C > @@ -0,0 +1,27 @@ > +// PR c++/46831 > +// { dg-do compile { target c++11 } } > +// { dg-options "" } > + > +struct B { }; > +struct D : B { }; > +struct A { > + template operator D&(); // { dg-message "template= conversion" } > + operator long(); > +}; > + > +template <> A::operator D&(); "Template conversion" warning is triggered on this line, rather than above. > + > +void f(long); > +void f(B&); > + > +struct A2 { > + template operator B&(); > +}; > + > +void f2(const B&); > + > +int main() { > + f(A()); > + f2(A2()); > + f2(A()); // { dg-error "" } > +} >=20 Would you please take a look? =3D=3D=3D spawn -ignore SIGHUP /home/tcwg-buildslave/workspace/tcwg-buildfarm/tcwg-x8= 6_64-build/_build/builds/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/= gcc.git~master-stage2/gcc/testsuite/g++5/../../xg++ -B/home/tcwg-buildslave= /workspace/tcwg-buildfarm/tcwg-x86_64-build/_build/builds/x86_64-unknown-li= nux-gnu/x86_64-unknown-linux-gnu/gcc.git~master-stage2/gcc/testsuite/g++5/.= ./../ /home/tcwg-buildslave/workspace/tcwg-buildfarm/tcwg-x86_64-build/snap= shots/gcc.git~master/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg2a.C -fno-diagno= stics-show-caret -fdiagnostics-color=3Dnever -nostdinc++ -I/home/tcwg-build= slave/workspace/tcwg-buildfarm/tcwg-x86_64-build/_build/builds/x86_64-unkno= wn-linux-gnu/x86_64-unknown-linux-gnu/gcc.git~master-stage2/x86_64-unknown-= linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu -I/home/tcwg-builds= lave/workspace/tcwg-buildfarm/tcwg-x86_64-build/_build/builds/x86_64-unknow= n-linux-gnu/x86_64-unknown-linux-gnu/gcc.git~master-stage2/x86_64-unknown-l= inux-gnu/libstdc++-v3/include -I/home/tcwg-buildslave/workspace/tcwg-buildf= arm/tcwg-x86_64-build/snapshots/gcc.git~master/libstdc++-v3/libsupc++ -I/ho= me/tcwg-buildslave/workspace/tcwg-buildfarm/tcwg-x86_64-build/snapshots/gcc= .git~master/libstdc++-v3/include/backward -I/home/tcwg-buildslave/workspace= /tcwg-buildfarm/tcwg-x86_64-build/snapshots/gcc.git~master/libstdc++-v3/tes= tsuite/util -fmessage-length=3D0 -std=3Dgnu++11 -S -o fntmpdefarg2a.s /home/tcwg-buildslave/workspace/tcwg-buildfarm/tcwg-x86_64-build/snapshots/= gcc.git~master/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg2a.C: In function 'int= main()': /home/tcwg-buildslave/workspace/tcwg-buildfarm/tcwg-x86_64-build/snapshots/= gcc.git~master/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg2a.C:26:6: error: inva= lid user-defined conversion from 'A' to 'const B&' [-fpermissive] /home/tcwg-buildslave/workspace/tcwg-buildfarm/tcwg-x86_64-build/snapshots/= gcc.git~master/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg2a.C:12:13: note: cand= idate is: 'A::operator D&() [with T =3D void]' /home/tcwg-buildslave/workspace/tcwg-buildfarm/tcwg-x86_64-build/snapshots/= gcc.git~master/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg2a.C:12:13: note: co= nversion from return type 'D&' of template conversion function specializati= on to 'const B&' is not an exact match /home/tcwg-buildslave/workspace/tcwg-buildfarm/tcwg-x86_64-build/snapshots/= gcc.git~master/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg2a.C:21:6: note: ini= tializing argument 1 of 'void f2(const B&)' compiler exited with status 1 FAIL: g++.dg/cpp0x/fntmpdefarg2a.C -std=3Dgnu++11 (test for warnings, lin= e 8) PASS: g++.dg/cpp0x/fntmpdefarg2a.C -std=3Dgnu++11 (test for errors, line = 26) PASS: g++.dg/cpp0x/fntmpdefarg2a.C -std=3Dgnu++11 (test for excess errors) =3D=3D=3D Regards, -- Maxim Kuvyrkov www.linaro.org