public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bob.steagall.cpp at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/102547] New: g++ 11. ICE with NTTPs and partial specialization Date: Thu, 30 Sep 2021 16:09:05 +0000 [thread overview] Message-ID: <bug-102547-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102547 Bug ID: 102547 Summary: g++ 11. ICE with NTTPs and partial specialization Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: bob.steagall.cpp at gmail dot com Target Milestone: --- The following C++ source code: --------------------------------------------------------------------------- template<int... VALS> struct vals {}; template<class V, class A> struct vals_client {}; template<int V0, int V1, typename A> struct vals_client<vals<V0, V1>, A> {}; template<int V0, int V1> struct vals_client<vals<V0, V1>, void> {}; void testfn() { vals_client<vals<1, 2>, int> ci; //- OK vals_client<vals<1, 2>, void> cv; //- "sorry, unimplemented..., ICE" } --------------------------------------------------------------------------- When compiled with gcc 11.X generates this error: nttp_test.cpp: In function 'void testfn()': nttp_test.cpp:18:36: sorry, unimplemented: unexpected AST of kind nontype_argument_pack 18 | vals_client<vals<1, 2>, void> cv; //- "sorry, unimplemented..." | ^~ nttp_test.cpp:18: confused by earlier errors, bailing out --------------------------------------------------------------------------- When compiled with gcc trunk on godbolt.org, it elicits an ICE: <source>: In function 'void testfn()': <source>:23:36: sorry, unimplemented: unexpected AST of kind nontype_argument_pack 23 | vals_client<vals<1, 2>, void> cv; //- "sorry, unimplemented..., ICE" | ^~ <source>:23:36: internal compiler error: in potential_constant_expression_1, at cp/constexpr.c:9051 0x1fe73f9 internal_error(char const*, ...) ???:0 0x7d40a7 fancy_abort(char const*, int, char const*) ???:0 0x8475ff potential_constant_expression(tree_node*) ???:0 0xa21bd7 instantiation_dependent_expression_p(tree_node*) ???:0 0xa21c46 uses_template_parms(tree_node*) ???:0 0xa72888 most_specialized_partial_spec(tree_node*, int) ???:0 0xa7f834 instantiate_class_template(tree_node*) ???:0 0x89e107 start_decl_1(tree_node*, bool) ???:0 0x8c552f start_decl(cp_declarator const*, cp_decl_specifier_seq*, int, tree_node*, tree_node*, tree_node**) ???:0 0xa08395 c_parse_file() ???:0 0xb8f562 c_common_parse_file() ???:0 Please submit a full bug report, ... --------------------------------------------------------------------------- Testing with various version on godbolt.org reveals that the ICE does not occur with 10.X, 9.X, 8.X, or 7.X (that's as far back as I went).
next reply other threads:[~2021-09-30 16:09 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-30 16:09 bob.steagall.cpp at gmail dot com [this message] 2021-09-30 19:16 ` [Bug c++/102547] " ppalka at gcc dot gnu.org 2021-09-30 19:39 ` ppalka at gcc dot gnu.org 2021-09-30 19:41 ` [Bug c++/102547] [11/12 Regression] " ppalka at gcc dot gnu.org 2021-09-30 19:58 ` ppalka at gcc dot gnu.org 2021-09-30 21:35 ` bob.steagall.cpp at gmail dot com 2021-10-01 6:31 ` rguenth at gcc dot gnu.org 2021-10-05 19:36 ` cvs-commit at gcc dot gnu.org 2021-10-05 19:43 ` ppalka at gcc dot gnu.org 2021-10-05 19:44 ` [Bug c++/102547] [11 " ppalka at gcc dot gnu.org 2021-10-06 14:15 ` cvs-commit at gcc dot gnu.org 2021-10-06 14:21 ` ppalka at gcc dot gnu.org 2021-10-29 19:43 ` ppalka 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-102547-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: linkBe 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).