From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ABB593858D28; Sat, 6 May 2023 10:33:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ABB593858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683369181; bh=jf1LO9g4j1mjJY3LSqIu8Nd0oxpIP3nPHnmrjqzsp4E=; h=From:To:Subject:Date:From; b=Ayc5Bgr3t/trg/ijv8kLFSwALwOXZMSuTRxCSogLyxp2LCaIKp8l74hrZffUdFbIb Ls38Lh7DhByQpizk2fNy33yJEnj7AE7ows0Hm1yWyw//sy8K/LBsleAHvlNv5g5Efc q0UGUBn6g05dmfL1Unv7XpAFAlbhiAGT7N+mfTnk= From: "ensadc at mailnesia dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109756] New: "internal compiler error: tree check" when using the [[assume]] attribute with pack expansion Date: Sat, 06 May 2023 10:33:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: ensadc at mailnesia dot com X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 Bug ID: 109756 Summary: "internal compiler error: tree check" when using the [[assume]] attribute with pack expansion Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ensadc at mailnesia dot com Target Milestone: --- https://godbolt.org/z/WPn9aq8sr =3D=3D=3D=3D bool f(auto... args) { [[assume(args > 0)...]]; return ((args =3D=3D 0) && ...); } bool g(int a, int b) { return f(a, b); } =3D=3D=3D=3D : In function 'bool f(auto:1 ...)': :2:28: internal compiler error: tree check: expected tree that cont= ains 'common' structure, have 'expr_pack_expansion' in list_length, at tree.cc:3= 414 2 | [[assume(args > 0)...]]; | ^ 0x235945e internal_error(char const*, ...) ???:0 0x96da3a tree_contains_struct_check_failed(tree_node const*, tree_node_structure_enum, char const*, int, char const*) ???:0 0xb20632 process_stmt_assume_attribute(tree_node*, tree_node*, unsigned int) ???:0 0xc7212f c_parse_file() ???:0 0xdb0d99 c_common_parse_file() ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. Compiler returned: 1 =3D=3D=3D=3D I believe that [[assume(args > 0)...]] is a valid pack expansion. The stand= ard says ([temp.variadic]/5): > Pack expansions can occur in the following contexts: > (5.8) - In an attribute-list ([dcl.attr.grammar]); the pattern is an attr= ibute.=