[Bug c++/60065] New: [c++1y] ICE with auto parameter pack
reichelt at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 4 21:10:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60065
Bug ID: 60065
Summary: [c++1y] ICE with auto parameter pack
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: reichelt at gcc dot gnu.org
The following line of code (compiled with "-std=c++1y") triggers an ICE on
trunk:
========================================
template<int> void foo(auto... x);
========================================
bug.cc:1:32: internal compiler error: tree check: expected template_type_parm
or template_template_parm or bound_template_template_parm, have integer_type in
convert_generic_types_to_packs, at cp/pt.c:21726
template<int> void foo(auto... x);
^
0xdc4824 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/gcc/tree.c:9192
0x64ad63 tree_check3
../../gcc/gcc/tree.h:2749
0x64ad63 convert_generic_types_to_packs(tree_node*, int, int)
../../gcc/gcc/cp/pt.c:21726
0x6c8f47 cp_parser_parameter_declaration_list
../../gcc/gcc/cp/parser.c:18279
0x6c9532 cp_parser_parameter_declaration_clause
../../gcc/gcc/cp/parser.c:18179
0x6bfd05 cp_parser_direct_declarator
../../gcc/gcc/cp/parser.c:17072
0x6bfd05 cp_parser_declarator
../../gcc/gcc/cp/parser.c:16943
0x6ca599 cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:16496
0x6cb41a cp_parser_single_declaration
../../gcc/gcc/cp/parser.c:23113
0x6cb704 cp_parser_template_declaration_after_export
../../gcc/gcc/cp/parser.c:22915
0x6d6af9 cp_parser_declaration
../../gcc/gcc/cp/parser.c:10947
0x6d55e8 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10869
0x6d6eca cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4014
0x6d6eca c_parse_file()
../../gcc/gcc/cp/parser.c:31528
0x7f6973 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1060
Please submit a full bug report, [etc.]
The code compiles if I remove the 'x' or replace 'int' by 'typename'.
I'm not sure whether the code is valid or not, though.
More information about the Gcc-bugs
mailing list