http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59120
Bug ID: 59120
Summary: [c++11] ICE with invalid template alias
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 invalid line of code (compiled with "-std=c++11") triggers an ICE
since GCC 4.7.0 (when template alias was introduced):
=============================================
template<typename T> using X = int T::T*;
=============================================
bug.cc:1:36: error: expected ';'
template<typename T> using X = int T::T*;
^
bug.cc:1:39: internal compiler error: in dependent_type_p, at cp/pt.c:20192
template<typename T> using X = int T::T*;
^
0x596ea0 dependent_type_p(tree_node*)
../../gcc/gcc/cp/pt.c:20192
0x597644 dependent_scope_p(tree_node*)
../../gcc/gcc/cp/pt.c:20223
0x639251 cp_parser_lookup_name
../../gcc/gcc/cp/parser.c:21789
0x658ec0 cp_parser_class_name
../../gcc/gcc/cp/parser.c:18819
0x65935c cp_parser_constructor_declarator_p
../../gcc/gcc/cp/parser.c:22224
0x65935c cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:11374
0x65fd89 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:10979
0x643860 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:10928
0x66aaae cp_parser_declaration
../../gcc/gcc/cp/parser.c:10825
0x6697ca cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10711
0x66b0e6 cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:3989
0x66b0e6 c_parse_file()
../../gcc/gcc/cp/parser.c:30962
0x787f73 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1046
Please submit a full bug report, [etc.]