From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 83CF8388A03B; Fri, 3 Apr 2020 19:26:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 83CF8388A03B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1585942002; bh=/YaP+FUcNml3yGUgLxR8bQgbGp2iXRVIY+7RXdj6kDA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=HY/SLppk1xop2usVzDURHx/c7ol6uHS53Im+YS+ZXy9STCa0xUuK19oyLc0ZuLkTw nXEheixjAmmYXSK1SHh03p2bZFufkyApmRRbKU7usgvBgsQ3Qwq6cWrzKPhcmTCa9X vhHrg5eL+FGPg2rY0RfBmuTrzSfnGLrouqcjgIUc= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/91966] [8/9 Regression] pack expansion for Cartesian product breaks if certain indirections are involved since r6-1487-g1a4cd2cd7e7266b0 Date: Fri, 03 Apr 2020 19:26:42 +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: 9.2.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 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: Fri, 03 Apr 2020 19:26:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D91966 --- Comment #4 from CVS Commits --- The releases/gcc-9 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:70ae61692245b5002f32454c8447655ad65a8535 commit r9-8450-g70ae61692245b5002f32454c8447655ad65a8535 Author: Jason Merrill Date: Thu Apr 2 23:40:46 2020 -0400 c++: alias template and parameter packs (PR91966). In this testcase, when we do a pack expansion of count_better_mins, nums appears both in the definition of count_better_mins and as its template argument. The intent is that we get a expansion over pairs of elements= of the pack, i.e. less<2,2>, less<2,7>, less<7,2>, .... But if we substit= ute into the definition of count_better_mins when parsing the template, we = end up with sum...>, which never gives us less<2,7>. We co= uld deal with this by somehow marking up the use of 'nums' as an argument f= or 'num', but it's simpler to mark the alias as complex, so we need to instantiate it later with all its arguments rather than replace it early with its expansion. gcc/cp/ChangeLog 2020-04-03 Jason Merrill PR c++/91966 * pt.c (complex_pack_expansion_r): New. (complex_alias_template_p): Use it.=