From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1441B3858D28; Thu, 7 Apr 2022 13:28:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1441B3858D28 From: "ppalka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/59716] [10/11 Regression] variadic template multiple parameter pack expansion fails Date: Thu, 07 Apr 2022 13:28:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.2.1 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: ppalka at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2022 13:28:12 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D59716 --- Comment #9 from Patrick Palka --- Hmm, this PR is essentially a dup of PR88580 but I don't think it's a 10/11 regression: between r8-2715 and r10-3735 it seems we just went from incorre= ctly rejecting the testcase (the behavior before r8-2715) to miscompiling it. A= fter r10-3735 we went back to incorrectly rejecting it (arguably an improvement)= .=20 So AFAICT we never correctly handled this testcase before r12-174. Output when compiled with GCC trunk: Construction of: DebugPrinter::DebugPrinter(Y ...) [with Y =3D {= int, char, void*, int}; Head =3D int; T =3D {char, int, float}] Values: 1, c, 0x= ddddd, 1,=20 Construction of: DebugPrinter::DebugPrinter(Y ...) [with Y =3D {= float, char, void*, float}; Head =3D float; T =3D {void*, int, float}] Values: 2.2= , c, 0xddddd, 2.2,=20 GCC 10/11 reject the testcase. Output when compiled with GCC 7.4/8/9 (miscompile): Construction of: DebugPrinter::DebugPrinter(Y ...) [with Y =3D {= int, bool, int}; Head =3D int; T =3D {char, int, float}] Values: 1, 0, 1,=20 Construction of: DebugPrinter::DebugPrinter(Y ...) [with Y =3D {= float, bool, float}; Head =3D float; T =3D {void*, int, float}] Values: 2.2, 0, 2.= 2,=20 GCC < 7.4 reject the testcase. Output when compiled with Clang (equivalent to GCC trunk output): Construction of: DebugPrinter::DebugPrinter(Y...) [Head =3D int, T =3D , Y =3D ] Va= lues: 1, c, 0xddddd, 1,=20 Construction of: DebugPrinter::DebugPrinter(Y.= ..) [Head =3D float, T =3D , Y =3D ] Values: 2.2, c, 0xddddd, 2.2,=