public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109859] New: ICE on concept mis-typed as template type parameter
@ 2023-05-15  8:53 saifi.khan at nishan dot io
  2023-05-15  9:22 ` [Bug c++/109859] " hewillk at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: saifi.khan at nishan dot io @ 2023-05-15  8:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109859
           Summary: ICE on concept mis-typed as template type parameter
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: saifi.khan at nishan dot io
  Target Milestone: ---

while exploring ranges, i mis-typed the code as follows.

should have written

template <std::ranges::random_access_range R>

--

#include <ranges>

template <typename R = std::ranges::random_access_range>

int  fn (R);

int main () {;}

--

using gcc version 14.0.0 20230514 (experimental) (GCC)

g++ -std=c++23 file.cc

--

output is

file.cc:3:37: internal compiler error: in cp_parser_placeholder_type_specifier,
at cp/parser.cc:20242
    3 | template <typename R = std::ranges::random_access_range>
      |                                     ^~~~~~~~~~~~~~~~~~~
0x75a5de cp_parser_placeholder_type_specifier
        /opt/gcc/src/gcc/cp/parser.cc:20242
0xbb9e11 cp_parser_simple_type_specifier
        /opt/gcc/src/gcc/cp/parser.cc:20079
0xb8ec55 cp_parser_type_specifier
        /opt/gcc/src/gcc/cp/parser.cc:19614
0xba3e42 cp_parser_type_specifier_seq
        /opt/gcc/src/gcc/cp/parser.cc:24615
0xba1a3d cp_parser_type_id_1
        /opt/gcc/src/gcc/cp/parser.cc:24412
0xba1d50 cp_parser_type_id
        /opt/gcc/src/gcc/cp/parser.cc:24511
0xba1d50 cp_parser_default_type_template_argument
        /opt/gcc/src/gcc/cp/parser.cc:17963
0xbb5617 cp_parser_type_parameter
        /opt/gcc/src/gcc/cp/parser.cc:18199
0xbb46d4 cp_parser_template_parameter
        /opt/gcc/src/gcc/cp/parser.cc:18080
0xbb46d4 cp_parser_template_parameter_list
        /opt/gcc/src/gcc/cp/parser.cc:17679
0xbc6ce7 cp_parser_explicit_template_declaration
        /opt/gcc/src/gcc/cp/parser.cc:32382
0xbc9a95 cp_parser_declaration
        /opt/gcc/src/gcc/cp/parser.cc:15050
0xbca553 cp_parser_toplevel_declaration
        /opt/gcc/src/gcc/cp/parser.cc:15142
0xbca553 cp_parser_translation_unit
        /opt/gcc/src/gcc/cp/parser.cc:5131
0xbca553 c_parse_file()
        /opt/gcc/src/gcc/cp/parser.cc:49635
0xd17685 c_common_parse_file()
        /opt/gcc/src/gcc/c-family/c-opts.cc:1248

---

Thanks for your time !

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

end of thread, other threads:[~2024-02-16 18:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-15  8:53 [Bug c++/109859] New: ICE on concept mis-typed as template type parameter saifi.khan at nishan dot io
2023-05-15  9:22 ` [Bug c++/109859] " hewillk at gmail dot com
2023-05-15 14:47 ` [Bug c++/109859] [12/13/14 Regression] " pinskia at gcc dot gnu.org
2023-05-15 14:47 ` pinskia at gcc dot gnu.org
2023-05-17  6:44 ` rguenth at gcc dot gnu.org
2023-08-29  5:53 ` pinskia at gcc dot gnu.org
2024-02-16 18:54 ` mpolacek 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).