public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "schaumb at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113649] New: ICE: nested template class template argument deduction Date: Mon, 29 Jan 2024 07:57:16 +0000 [thread overview] Message-ID: <bug-113649-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113649 Bug ID: 113649 Summary: ICE: nested template class template argument deduction Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: schaumb at gmail dot com Target Milestone: --- The following code does not compile, see here https://godbolt.org/z/vz5KMzhsh: template<class ...Ts> struct params { template <typename Return> struct return_type { constexpr return_type(Return (*p1)(Ts...)){} }; template <typename Return> return_type(Return (*)(Ts...)) -> return_type<Return>; template<return_type Any> struct addr {}; }; void x(double); template struct params<double>::addr<&x>; It runs to internal compiler error: <source>:19:40: internal compiler error: in build_function_type, at tree.cc:7488 19 | template struct params<double>::addr<&x>; | ^ 0x2647edc internal_error(char const*, ...) ???:0 0xa51cb7 fancy_abort(char const*, int, char const*) ???:0 0xc72375 do_auto_deduction(tree_node*, tree_node*, tree_node*, int, auto_deduction_context, tree_node*, int, tree_node*) ???:0 0xc76223 coerce_template_parms(tree_node*, tree_node*, tree_node*, int, bool) ???:0 0xc93089 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) ???:0 0xccf8ff finish_template_type(tree_node*, tree_node*, int) ???:0 0xc53d2a c_parse_file() ???:0 0xda79a9 c_common_parse_file() ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Compiler returned: 1
next reply other threads:[~2024-01-29 7:57 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-29 7:57 schaumb at gmail dot com [this message] 2024-01-29 8:10 ` [Bug c++/113649] " pinskia at gcc dot gnu.org 2024-01-29 9:00 ` pinskia at gcc dot gnu.org 2024-01-30 16:51 ` mpolacek at gcc dot gnu.org 2024-02-08 14:11 ` cvs-commit 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-113649-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).