From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C8C5B3857365; Fri, 3 Mar 2023 00:03:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C8C5B3857365 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677801805; bh=vG3QEzMWYC60x+JOEFITDK+qNXGJ9XurlQLw5OLVrcM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=s3ezAEWT+9kWIRJOZQZaLL2oF1Mm/YuitYPd9w17BHFj0yxK0IDovfqIbIVCJfnyw wo8yHZjM+czwsm5d3N5jJYfL/C/APm28F6Z3y0Kq6+kn5RagN0oUHlGwzCz3yCF44Y eI1NWGQObQTo+ljDPPzSyXKk4+g80LaIxyf/T23Q= From: "waffl3x at protonmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108998] ICE in tsubst, at cp/pt.cc:16037 Date: Fri, 03 Mar 2023 00:03:25 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: waffl3x at protonmail 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=3D108998 --- Comment #1 from waffl3x --- I ran it on my local system, just to get some line numbers, and I accidenta= lly ran it on an older version (12.1) and found that it has a similar result, I= 'm posting the output of -v and the error of both here. As a reminder, gcc 12.= 2 on godbolt does not ICE. [waffl3x@waffl3x-manjaro-desktop gcc]$ /opt/compiler/bin/g++ -v Using built-in specs. COLLECT_GCC=3D/opt/compiler/bin/g++ COLLECT_LTO_WRAPPER=3D/opt/compiler/libexec/gcc/x86_64-pc-linux-gnu/13.0.0/= lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-13-20230115/configure --enable-languages=3Dc,c++,lto --enable-bootstrap --prefix=3D/opt/compiler --mandir=3D/usr/share/man --infodir=3D/usr/share/info --with-linker-hash-style=3Dgnu --enable-__cxa_a= texit --enable-cet=3Dauto --enable-checking=3Drelease --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-obj= ect --enable-link-serialization=3D1 --enable-linker-build-id --enable-lto --enable-plugin --enable-shared --enable-threads=3Dposix --disable-libssp --disable-werror --enable-clocale=3Dgnu --enable-libstdcxx-backtrace --enable-multilib --disable-libstdcxx-pch --with-build-config=3Dbootstrap-l= to Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 13.0.0 20230115 (experimental) (GCC)=20 [waffl3x@waffl3x-manjaro-desktop gcc]$ /opt/compiler/bin/g++ test.cpp test.cpp: In instantiation of =E2=80=98ice(int):: [with int = I =3D 0]=E2=80=99: test.cpp:11:34: required from =E2=80=98void ice(T) [with T =3D int]=E2=80= =99 test.cpp:15:8: required from here test.cpp:7:10: internal compiler error: in tsubst, at cp/pt.cc:16025 7 | auto aa =3D a; | ^~ 0x635279 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc-13-20230115/gcc/cp/pt.cc:16025 0x8278de tsubst_decl ../../gcc-13-20230115/gcc/cp/pt.cc:15194 0x8302c8 tsubst_copy ../../gcc-13-20230115/gcc/cp/pt.cc:17267 0x8200fc tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*) ../../gcc-13-20230115/gcc/cp/pt.cc:21530 0x8248c8 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc-13-20230115/gcc/cp/pt.cc:16547 0x829de5 tsubst_template_args(tree_node*, tree_node*, int, tree_node*) ../../gcc-13-20230115/gcc/cp/pt.cc:13659 0x821322 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*) ../../gcc-13-20230115/gcc/cp/pt.cc:20299 0x80d340 tsubst_expr(tree_node*, tree_node*, int, tree_node*) ../../gcc-13-20230115/gcc/cp/pt.cc:19764 0x80e512 tsubst_expr(tree_node*, tree_node*, int, tree_node*) ../../gcc-13-20230115/gcc/cp/pt.cc:18711 0x80e512 tsubst_expr(tree_node*, tree_node*, int, tree_node*) ../../gcc-13-20230115/gcc/cp/pt.cc:19041 0x80eb23 tsubst_expr(tree_node*, tree_node*, int, tree_node*) ../../gcc-13-20230115/gcc/cp/pt.cc:18711 0x80eb23 tsubst_expr(tree_node*, tree_node*, int, tree_node*) ../../gcc-13-20230115/gcc/cp/pt.cc:19105 0x80eb23 tsubst_expr(tree_node*, tree_node*, int, tree_node*) ../../gcc-13-20230115/gcc/cp/pt.cc:18711 0x80eb23 tsubst_expr(tree_node*, tree_node*, int, tree_node*) ../../gcc-13-20230115/gcc/cp/pt.cc:19105 0x80d0d9 tsubst_expr(tree_node*, tree_node*, int, tree_node*) ../../gcc-13-20230115/gcc/cp/pt.cc:26702 0x80d0d9 instantiate_body ../../gcc-13-20230115/gcc/cp/pt.cc:26702 0x81219d instantiate_decl(tree_node*, bool, bool) ../../gcc-13-20230115/gcc/cp/pt.cc:26992 0x6ffcb3 maybe_instantiate_decl(tree_node*) ../../gcc-13-20230115/gcc/cp/decl2.cc:5448 0x6ffcb3 maybe_instantiate_decl(tree_node*) ../../gcc-13-20230115/gcc/cp/decl2.cc:5435 0x718092 mark_used(tree_node*, int) ../../gcc-13-20230115/gcc/cp/decl2.cc:5747 [waffl3x@waffl3x-manjaro-desktop gcc]$ g++ -v Using built-in specs. COLLECT_GCC=3Dg++ COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /build/gcc/src/gcc/configure --enable-languages=3Dc,c++,ada,fortran,go,lto,objc,obj-c++,d --enable-boots= trap --prefix=3D/usr --libdir=3D/usr/lib --libexecdir=3D/usr/lib --mandir=3D/usr= /share/man --infodir=3D/usr/share/info --with-bugurl=3Dhttps://bugs.archlinux.org/ --with-build-config=3Dbootstrap-lto --with-linker-hash-style=3Dgnu --with-system-zlib --enable-__cxa_atexit --enable-cet=3Dauto --enable-checking=3Drelease --enable-clocale=3Dgnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-obj= ect --enable-libstdcxx-backtrace --enable-link-serialization=3D1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=3Dposix --disable-libssp --disable-libstdc= xx-pch --disable-werror Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.2.1 20230111 (GCC)=20 [waffl3x@waffl3x-manjaro-desktop gcc]$ g++ test.cpp test.cpp: In instantiation of =E2=80=98ice(int):: [with int = I =3D 0]=E2=80=99: test.cpp:11:34: required from =E2=80=98void ice(T) [with T =3D int]=E2=80= =99 test.cpp:15:8: required from here test.cpp:7:10: internal compiler error: in tsubst, at cp/pt.cc:15869 7 | auto aa =3D a; | ^~ 0x19e2ee8 internal_error(char const*, ...) ???:0 0x65443c fancy_abort(char const*, int, char const*) ???:0 0x7e0672 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, boo= l, bool) ???:0 0x7e4429 tsubst(tree_node*, tree_node*, int, tree_node*) ???:0 0x7ed512 tsubst_template_args(tree_node*, tree_node*, int, tree_node*) ???:0 0x7e1ab6 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, boo= l, bool) ???:0 0x7db493 instantiate_decl(tree_node*, bool, bool) ???:0 0x6eddcb mark_used(tree_node*, int) ???:0 0x67f26f build_new_method_call(tree_node*, tree_node*, vec**, tree_node*, int, tree_node**, int) ???:0 0x7e37bd tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, boo= l, bool) ???:0 0x7db493 instantiate_decl(tree_node*, bool, bool) ???:0 0x7f9a73 instantiate_pending_templates(int) ???:0 0x6fe618 c_parse_final_cleanups() ???:0=