From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 377673858D1E; Sat, 6 May 2023 16:54:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 377673858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683392077; bh=1mPGW/CTbCekw585/gNbycaqsyaVXztI16AUCTpVFnk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ygkTM4CLwT2zP3nE2/4UqAvdNXmac3BrF5akgd2X1+iTp9OvOedRDiiCNA/BSNc4Z ug1rUTL4Xs7tRfdbcDeAiZ6IhaVCeU9n1gohwRTterhxKkB9HYATVF9VDDBjEE4VhZ qVUHqcSXdpHGAscfZSJ5V2gvOuvXirGcXHpOcMyY= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109756] "internal compiler error: tree check" when using the [[assume]] attribute with pack expansion Date: Sat, 06 May 2023 16:54:37 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109756 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- The https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1774r8.pdf paper says in the introductory part: We could therefore hypothetically permit the assume attribute to directly support pack expansion: template void f() { [[assume(args >=3D 0)...]]; } However, we do not propose this. It would require substantial additional wo= rk for a very rare use case. Note that this can instead be expressed with a fold expression, which= is equivalent to the above and works out of the box without any extra effort: template void f() { [[assume(((args >=3D 0) && ...))]]; } http://eel.is/c++draft/dcl.attr#grammar-4 says: "In an attribute-list, an ellipsis may appear only if that attribute's specification permits it." And I don't see it being explicitly permitted for any of the standard attri= bute (except for alignas which uses a different syntax). So, I think this is invalid and we should reject it.=