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 !