public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/113649] New: ICE: nested template class template argument deduction
@ 2024-01-29  7:57 schaumb at gmail dot com
  2024-01-29  8:10 ` [Bug c++/113649] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: schaumb at gmail dot com @ 2024-01-29  7:57 UTC (permalink / raw)
  To: gcc-bugs

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-02-08 14:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-29  7:57 [Bug c++/113649] New: ICE: nested template class template argument deduction schaumb at gmail dot com
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

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).