From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 399703858C50; Tue, 11 Jun 2024 09:57:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 399703858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718099877; bh=6cxrElD7Qzk80wY7zmYTpZS/vnlj1e43KGEM+2OZ9D8=; h=From:To:Subject:Date:From; b=T8XCmCPXsajWt6hxYwV3901Ajz3dsnfD8JtR8c1cGNWrTlH94F0RbNY37O/9TNZGy 0dDrRYNBDsoAitikBTSLHsNWB2QVFOKA8y8+B6tWo3nib4e7W8dqb0LCNi0t14FQno de+nnu8mmy9SUQKrTEtPfNWGyhpO6OOf0WnRXSLQ= From: "iamanonymous.cs at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBjKysvMTE1NDMxXSBOZXc6IElDRTogdHJlZSBjaGVjazog?= =?UTF-8?B?ZXhwZWN0ZWQgdHJlZSB0aGF0IGNvbnRhaW5zIOKAmGRlY2wgY29tbW9u4oCZ?= =?UTF-8?B?IHN0cnVjdHVyZSwgaGF2ZSDigJhlcnJvcl9tYXJr4oCZIGluIGRlY2xfdGVt?= =?UTF-8?B?cGxhdGVfcGFybV9jaGVjaywgYXQgY3AvY3AtdHJlZS5oOjUxMzE=?= Date: Tue, 11 Jun 2024 09:57:56 +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: 15.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: iamanonymous.cs at gmail 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 cf_gcctarget 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=3D115431 Bug ID: 115431 Summary: ICE: tree check: expected tree that contains =E2=80=98d= ecl common=E2=80=99 structure, have =E2=80=98error_mark=E2= =80=99 in decl_template_parm_check, at cp/cp-tree.h:5131 Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: iamanonymous.cs at gmail dot com Target Milestone: --- Target: x86_64 ***************************************************************************= **** Internal Compiler Error (ICE) when compiling a specific C++ code with GCC. The error message specifically indicates an issue in decl_template_parm_che= ck at cp/cp-tree.h:5131. ***************************************************************************= **** OS and Platform: # uname -a Linux ubuntu 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux ***************************************************************************= **** #g++ -v Using built-in specs. COLLECT_GCC=3Dg++ COLLECT_LTO_WRAPPER=3D/root/gdbtest/gcc/gcc-15/libexec/gcc/x86_64-pc-linux-= gnu/15.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /root/gdbtest/gcc/obj/../gcc/configure --prefix=3D/root/gdbtest/gcc/gcc-15 --enable-languages=3Dc,c++,fortran,go --disable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 15.0.0 20240509 (experimental) (GCC)=20 ***************************************************************************= **** Program: # cat constrained.ii template struct c { c( b) } template struct d : c { c::c; } template d(b)->d; d a =3D [] < e f ***************************************************************************= **** Command Lines: # g++ -Wall -Wextra -pedantic -Werror -O2 -g -fsanitize=3Daddress,undefined -fno-omit-frame-pointer -o bug.out constrained.ii constrained.ii:1:45: error: expected =E2=80=98;=E2=80=99 at end of member d= eclaration 1 | template struct c { c( b) | ^ | ; constrained.ii:2:2: error: expected =E2=80=98;=E2=80=99 after struct defini= tion 2 | } template struct d : c { | ^ | ; constrained.ii:3:3: error: access declarations are deprecated in favor of using-declarations; suggestion: add the =E2=80=98using=E2=80=99 keyword [-W= error=3Ddeprecated] 3 | c::c; | ^~~~ constrained.ii:4:2: error: expected =E2=80=98;=E2=80=99 after struct defini= tion 4 | } template d(b)->d; | ^ | ; constrained.ii:5:10: error: lambda templates are only available with =E2=80=98-std=3Dc++20=E2=80=99 or =E2=80=98-std=3Dgnu++20=E2=80=99 [-Werror= =3Dc++20-extensions] 5 | d a =3D [] < e f | ^ constrained.ii:5:12: error: =E2=80=98e=E2=80=99 has not been declared 5 | d a =3D [] < e f | ^ constrained.ii:5:15: error: expected =E2=80=98>=E2=80=99 at end of input 5 | d a =3D [] < e f | ^ constrained.ii: In lambda function: constrained.ii:5:15: error: expected =E2=80=98{=E2=80=99 at end of input constrained.ii: At global scope: constrained.ii:3:9: internal compiler error: tree check: expected tree that contains =E2=80=98decl common=E2=80=99 structure, have =E2=80=98error_mark= =E2=80=99 in decl_template_parm_check, at cp/cp-tree.h:5131 3 | c::c; | ^ 0x99ed98 tree_contains_struct_check_failed(tree_node const*, tree_node_structure_enum, char const*, int, char const*) /root/gdbtest/gcc/obj/../gcc/gcc/tree.cc:9169 0x7f386f contains_struct_check(tree_node const*, tree_node_structure_enum, = char const*, int, char const*) /root/gdbtest/gcc/obj/../gcc/gcc/tree.h:4058 0x7f386f decl_template_parm_check(tree_node const*, char const*, int, char const*) /root/gdbtest/gcc/obj/../gcc/gcc/cp/cp-tree.h:5131 0x7f386f write_closure_template_head /root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:1964 0x7f386f write_closure_type_name /root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:1993 0x7f386f write_unqualified_name /root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:1591 0xbc78df write_nested_name /root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:1280 0xbc7e12 write_class_enum_type /root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:3096 0xbc7e12 write_type /root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:2515 0xbc715b write_template_args /root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:3228 0xbc756f write_prefix /root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:1342 0xbc756f write_prefix /root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:1293 0xbc78d7 write_nested_name /root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:1279 0xbc5276 write_encoding /root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:938 0xbc541b write_mangled_name /root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:820 0xbcb4e0 mangle_decl_string /root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:4420 0xbcb6ca get_mangled_id /root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:4441 0xbcb6ca mangle_decl(tree_node*) /root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:4479 0x16bc0fd decl_assembler_name(tree_node*) /root/gdbtest/gcc/obj/../gcc/gcc/tree.cc:719 0x17354f1 notice_global_symbol(tree_node*) /root/gdbtest/gcc/obj/../gcc/gcc/varasm.cc:1794 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. ***************************************************************************= **** Also ICE on trunk, compiler explorer:https://godbolt.org/z/es3P1he76 ***************************************************************************= ****=