public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sjames at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-109658-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109658

            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=54946&action=edit
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=CXX   --mode=compile aarch64-unknown-linux-gnu-g++
-DHAVE_CONFIG_H -I. -I..  -I../lib -I../intl -I./includes -I./includes
-DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H   -pipe -O3 -pipe
-mcpu=native -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=\"/usr/share/locale\"
-DHAVE_CONFIG_H -pipe -O3 -pipe -mcpu=native -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: ‘template<class _Arg1, class _Arg2, class
_Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]
  106 | class LeastRecentAccess : public std::binary_function<T, T, bool> {
      |                                       ^~~~~~~~~~~~~~~
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 ‘void aria2::json::encode(OutputStream&, const
aria2::ValueBase*)::JsonValueBaseVisitor::encodeString(const std::string&)
[with OutputStream = std::__cxx11::basic_ostringstream<char>; std::string =
std::__cxx11::basic_string<char>]’:
json.h:56:7:   required from ‘void aria2::json::encode(OutputStream&, const
aria2::ValueBase*)::JsonValueBaseVisitor::visit(const aria2::String&) [with
OutputStream = std::__cxx11::basic_ostringstream<char>]’
json.h:111:3:   required from ‘OutputStream& aria2::json::encode(OutputStream&,
const aria2::ValueBase*) [with OutputStream =
std::__cxx11::basic_ostringstream<char>]’
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)
       
/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)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/decl2.cc:5875
0x9b130b tsubst_baselink
       
/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*)
       
/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*)
       
/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*)
       
/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*)
       
/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*)
       
/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*)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/pt.cc:18826
0x9ba6cf instantiate_body
       
/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)
       
/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*)
       
/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*)
       
/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*)
       
/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*)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/pt.cc:18826
0x9ba6cf instantiate_body
       
/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)
       
/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)
       
/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()
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cp/decl2.cc:4988
0xafcd23 c_common_parse_file()
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/c-family/c-opts.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 <https://bugs.gentoo.org/> for instructions.
```

`aarch64-unknown-linux-gnu-g++ -O2 -c json.ii` is enough to repro.

             reply	other threads:[~2023-04-28  2:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-28  2:22 sjames at gcc dot gnu.org [this message]
2023-04-28  2:23 ` [Bug c++/109658] " sjames at gcc dot gnu.org
2023-04-28  2:28 ` pinskia at gcc dot gnu.org
2023-04-28  5:05 ` [Bug c++/109658] ICE when building aria2-1.36.0 (internal compiler error: in instantiate_decl, at cp/pt.cc:27095) since r14-283-g95d4c0d2e6318a sjames at gcc dot gnu.org
2023-04-28  5:06 ` sjames at gcc dot gnu.org
2023-04-28  5:58 ` sjames at gcc dot gnu.org
2023-04-28  6:32 ` sjames at gcc dot gnu.org
2023-04-28  6:47 ` [Bug c++/109658] [14 Regression] " rguenth at gcc dot gnu.org
2023-05-05  1:07 ` cvs-commit at gcc dot gnu.org
2023-05-05  1:08 ` jason at gcc dot gnu.org
2023-05-05  1:09 ` jason at gcc dot gnu.org
2023-05-05  1:09 ` jason at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-109658-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).