From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 016863858D37; Fri, 28 Apr 2023 02:22:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 016863858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682648574; bh=e1RjU7zOh2cBkSZMXs5W6vDzDFB6Gu9npL0qIj2KTHE=; h=From:To:Subject:Date:From; b=K8ID9tGnpe1qqYlWd53HCaThMLv291NFQeCDVjS72haFjr7V0TTCtzPw1FokxbzNo kkP2jpfxF66EYp5cg9rI/02OyU8i6yt5kNVBUNat0czxj7b+lBLxk10aYmDZkJsrp3 mXZxcfjMnFlIoqtZulVCyu7VFYjcp0d6K8zKh6bo= From: "sjames at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109658] New: ICE when building aria2-1.36.0 (internal compiler error: in instantiate_decl, at cp/pt.cc:27095) Date: Fri, 28 Apr 2023 02:22:53 +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: sjames at gcc dot gnu.org 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=3D109658 Bug ID: 109658 Summary: ICE when building aria2-1.36.0 (internal compiler error: in instantiate_decl, at cp/pt.cc:27095) Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org Target Milestone: --- Created attachment 54946 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D54946&action=3Dedit json.ii.xz Hit this when building aria2-1.36.0: ``` gcc (Gentoo 14.0.0.9999 p, commit 28d2380b495e99daca3b01ca9e6a73a623a2f3d2) 14.0.0 20230427 (experimental) e86d01af7926b04e80d8f3e6409bc67dbff8a069 Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ``` ``` /bin/sh ../libtool --tag=3DCXX --mode=3Dcompile aarch64-unknown-linux-gn= u-g++ -DHAVE_CONFIG_H -I. -I.. -I../lib -I../intl -I./includes -I./includes -DLOCALEDIR=3D\"/usr/share/locale\" -DHAVE_CONFIG_H -pipe -O3 -pipe -mcpu=3Dnative -c -o json.lo json.cc libtool: compile: aarch64-unknown-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I../lib -I../intl -I./includes -I./includes -DLOCALEDIR=3D\"/usr/share/loc= ale\" -DHAVE_CONFIG_H -pipe -O3 -pipe -mcpu=3Dnative -c json.cc -fPIC -DPIC -o .libs/json.o In file included from ValueBase.h:45, from json.h:39, from json.cc:35: a2functional.h:106:39: warning: =E2=80=98template struct std::binary_function=E2=80=99 is deprecated [-Wdeprecated-d= eclarations] 106 | class LeastRecentAccess : public std::binary_function { | ^~~~~~~~~~~~~~~ In file included from /usr/lib/gcc/aarch64-unknown-linux-gnu/14/include/g++-v14/string:49, from ValueBase.h:40: /usr/lib/gcc/aarch64-unknown-linux-gnu/14/include/g++-v14/bits/stl_function= .h:131:12: note: declared here 131 | struct binary_function | ^~~~~~~~~~~~~~~ json.h: In instantiation of =E2=80=98void aria2::json::encode(OutputStream&= , const aria2::ValueBase*)::JsonValueBaseVisitor::encodeString(const std::string&) [with OutputStream =3D std::__cxx11::basic_ostringstream; std::string= =3D std::__cxx11::basic_string]=E2=80=99: json.h:56:7: required from =E2=80=98void aria2::json::encode(OutputStream= &, const aria2::ValueBase*)::JsonValueBaseVisitor::visit(const aria2::String&) [with OutputStream =3D std::__cxx11::basic_ostringstream]=E2=80=99 json.h:111:3: required from =E2=80=98OutputStream& aria2::json::encode(Ou= tputStream&, const aria2::ValueBase*) [with OutputStream =3D std::__cxx11::basic_ostringstream]=E2=80=99 json.cc:99:16: required from here json.h:56:7: internal compiler error: in instantiate_decl, at cp/pt.cc:27095 56 | encodeString(string.s()); | ^~~~~~~~~~~~ 0x9bcb1b instantiate_decl(tree_node*, bool, bool) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/pt.cc:27095 0x82f17f mark_used(tree_node*, int) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/decl2.cc:58= 75 0x9b130b tsubst_baselink =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/pt.cc:16923 0x999ce3 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/pt.cc:21428 0x997a8b tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/pt.cc:21035 0x9a7d6b tsubst_expr(tree_node*, tree_node*, int, tree_node*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/pt.cc:19891 0x9a97d7 tsubst_expr(tree_node*, tree_node*, int, tree_node*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/pt.cc:18868 0x9a903f tsubst_expr(tree_node*, tree_node*, int, tree_node*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/pt.cc:19220 0x9ba6cf tsubst_expr(tree_node*, tree_node*, int, tree_node*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/pt.cc:18826 0x9ba6cf instantiate_body =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/pt.cc:26915 0x9bc2cb instantiate_decl(tree_node*, bool, bool) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/pt.cc:27211 0x9a9793 tsubst_expr(tree_node*, tree_node*, int, tree_node*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/pt.cc:19382 0x9a93f7 tsubst_expr(tree_node*, tree_node*, int, tree_node*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/pt.cc:18840 0x9a903f tsubst_expr(tree_node*, tree_node*, int, tree_node*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/pt.cc:19220 0x9ba6cf tsubst_expr(tree_node*, tree_node*, int, tree_node*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/pt.cc:18826 0x9ba6cf instantiate_body =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/pt.cc:26915 0x9bc2cb instantiate_decl(tree_node*, bool, bool) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/pt.cc:27211 0x9e8b43 instantiate_pending_templates(int) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/pt.cc:27289 0x833a97 c_parse_final_cleanups() =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/decl2.cc:49= 88 0xafcd23 c_common_parse_file() =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/c-family/c-opt= s.cc:1266 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. ``` `aarch64-unknown-linux-gnu-g++ -O2 -c json.ii` is enough to repro.=