From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 478CB3858C60; Fri, 19 Jan 2024 06:35:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 478CB3858C60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705646133; bh=/GaGvXLN6G/Ra3UA4nub+c1gJJs+wNP95ilJMmWMGjg=; h=From:To:Subject:Date:From; b=Wq1VFLP1giv2sztse+t+3w+73fDfMKLgPqQAPBmwAUkJ/Kyzh1ZKWnGv2W27Enqir FvvGmdcgjyiXXYNPS7liHYd6ewS4Pu2UNQ7VJr0m9D/LQCDF5v5vOQgVDAxhe/s4bq c44ILG14c/YrBii08YtSg9ff6Tu9UGySbO1pfNCQ= From: "bobmiller at nvidia dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113498] New: ICE in GCC trunk: tree check: have using_decl in get_template_info, at cp/pt.cc:357 Date: Fri, 19 Jan 2024 06:35:32 +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: bobmiller at nvidia 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 attachments.created 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=3D113498 Bug ID: 113498 Summary: ICE in GCC trunk: tree check: have using_decl in get_template_info, at cp/pt.cc:357 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: bobmiller at nvidia dot com Target Milestone: --- Created attachment 57154 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57154&action=3Dedit GCC Bug report generated via -freport-bug the exact version of GCC: Any GCC trunk at/after 14.0.0-20240107gita6b8d8f9= 19c4 the system type: x86_64-pc-linux-gnu the options given when GCC was configured/built: ../configure --prefix=3D/opt/gcc-latest --enable-languages=3Dc,c++ --enable-libstdcxx-de= bug --enable-libstdcxx-backtrace --disable-bootstrap --disable-multilib --disable-libvtv --with-system-zlib --without-isl --enable-multiarch the complete command line that triggers the bug: ./g++ -O3 --std=3Dc++23 -W= all -Wextra -pedantic -freport-bug /test.cpp -o /test the compiler output (error messages, warnings, etc.): the preprocessed file (*.i*) that triggers the bug, generated by adding -save-temps to the complete compilation command, or, in the case of a bug report for the GNAT front end, a complete set of source files (see below): = This is the file attached to this bug. root@ceceda56193b:/opt/gcc-latest/bin# ./g++ -O3 --std=3Dc++23 -Wall -Wextra -pedantic -freport-bug /test.cpp -o /test /test.cpp: In instantiation of 'constexpr ThisTT S::f() const requires ('using_decl' not supported by expression) > 0 [w= ith ThisTT =3D S2; T =3D int; long unsigned int ...Dims =3D {1, 1}]': /test.cpp:30:9: required from here 30 | s2.f(); | ~~~~^~ /test.cpp:18:26: error: no return statement in 'constexpr' function returni= ng non-void 18 | requires(D > 0) {} | ^ /test.cpp: In instantiation of 'constexpr ThisTT S::f() const requires ('using_decl' not supported by expression) > 0 [w= ith ThisTT =3D S2; T =3D int; long unsigned int ...Dims =3D {1, 1}]': /test.cpp:17:34: internal compiler error: tree check: expected var_decl or function_decl or field_decl or type_decl or concept_decl or template_decl, = have using_decl in get_template_info, at cp/pt.cc:357 17 | constexpr ThisTT f() const | ^ 0x7994c4 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/tree.cc:8954 0xafa224 template_info_decl_check(tree_node const*, char const*, int, char const*) ../../gcc/cp/cp-tree.h:665 0xafa224 get_template_info(tree_node const*) ../../gcc/cp/pt.cc:357 0xb0455f most_general_template(tree_node const*) ../../gcc/cp/pt.cc:26017 0xa063f2 write_unqualified_name ../../gcc/cp/mangle.cc:1601 0xa12561 write_nested_name ../../gcc/cp/mangle.cc:1273 0xa13159 write_encoding ../../gcc/cp/mangle.cc:938 0xa1338b write_mangled_name ../../gcc/cp/mangle.cc:820 0xa0a00f write_expression ../../gcc/cp/mangle.cc:3441 0xa08f8e write_expression ../../gcc/cp/mangle.cc:3942 0xa1327d write_constraint_expression ../../gcc/cp/mangle.cc:860 0xa1327d write_encoding ../../gcc/cp/mangle.cc:968 0xa1338b write_mangled_name ../../gcc/cp/mangle.cc:820 0xa15138 mangle_decl_string ../../gcc/cp/mangle.cc:4420 0xa153d8 get_mangled_id ../../gcc/cp/mangle.cc:4441 0xa153d8 mangle_decl(tree_node*) ../../gcc/cp/mangle.cc:4479 0x16a2175 decl_assembler_name(tree_node*) ../../gcc/tree.cc:719 0xd947ab symtab_node::get_comdat_group_id() ../../gcc/cgraph.h:258 0xd947ab analyze_functions ../../gcc/cgraphunit.cc:1200 0xd960cd symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.cc:2555 Please submit a full bug report, with preprocessed source. Please include the complete backtrace with any bug report. See for instructions. Please let me know if additional information is required :D=