From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 17A1B389364E; Fri, 21 Jun 2024 02:40:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 17A1B389364E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718937627; bh=dNmhirVvgx8l4rAQYvhNYgSMxqxe1040olSRR9rCETE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=E0TxBCTsH+6wubq/Lt7TCMVklhAsVIqF3+sD/duWXIBcfiRNwysCTdbhWb1xB8+av Qa/EXx7ssMwG/NOuS7znRabPYn6LmMbBM8DJmDR0ILSVE06rNQaLedtTZDqZzvHnf8 ds6a7NtRwTE8N/mBk20rmuDxxFMvNaAE6nO1eg8g= From: "iamanonymous.cs at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/115572] internal compiler error: in dependent_type_p, at cp/pt.cc:28020 Date: Fri, 21 Jun 2024 02:40:26 +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: 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: 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=3D115572 --- Comment #1 from Anonymous --- ***************************************************************************= **** The compiler produces an internal error in lookup_template_class when compi= ling the provided code with the specified options.=20 The issue can also be reproduced on Compiler Explorer. ***************************************************************************= **** 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 source_code_1.cpp template auto f(Ts...) { [] { enum class e : Ts {}; }; } int main() { f(0, true); } ***************************************************************************= **** Command Lines: # g++ source_code_1.cpp -std=3Dc++2a -Wall -Wextra -pedantic -fsanitize=3Dundefined -fsanitize=3Daddress -O2 -c -o source_code_1.o source_code_1.cpp: In instantiation of =E2=80=98auto f(Ts ...) [with Ts =3D= {int, bool}]=E2=80=99: source_code_1.cpp:7:4: required from here 7 | f(0, true); | ~^~~~~~~~~ source_code_1.cpp:3:19: internal compiler error: in dependent_type_p, at cp/pt.cc:28020 3 | [] { enum class e : Ts {}; }; | ^ 0x825d35 dependent_type_p(tree_node*) /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:28020 0xb55fd3 start_enum(tree_node*, tree_node*, tree_node*, tree_node*, bool, bool*) /root/gdbtest/gcc/obj/../gcc/gcc/cp/decl.cc:17113 0xcde80b lookup_template_class(tree_node*, tree_node*, tree_node*, tree_nod= e*, int) /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:10268 0xcd2cd0 tsubst(tree_node*, tree_node*, int, tree_node*) /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:16265 0xccf2d4 tsubst_decl /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:15435 0xcc77e4 tsubst_stmt /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18541 0xcc6106 tsubst_stmt /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18410 0xcc6106 tsubst_stmt /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18424 0xcc6bee tsubst_stmt /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18797 0xce1718 tsubst_stmt /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18410 0xce1718 tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*) /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:19850 0xcbe1a0 tsubst_expr(tree_node*, tree_node*, int, tree_node*) /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:21757 0xcc4837 tsubst_stmt /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:19482 0xcc55cc tsubst_stmt /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18442 0xcc6106 tsubst_stmt /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18410 0xcc6106 tsubst_stmt /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18424 0xcc6bee tsubst_stmt /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18797 0xce0b52 tsubst_stmt /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18410 0xce0b52 instantiate_body /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:27107 0xcc4425 instantiate_decl(tree_node*, bool, bool) /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:27392 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/7aPr9fWxn ***************************************************************************= ****=