http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58170
--- Comment #2 from Volker Reichelt <reichelt at gcc dot gnu.org> --- Stack trace on trunk: bug.cc: In substitution of 'template<class T, class U, class V> using B = A< <template-parameter-1-1>, <template-parameter-1-2> >::B<V> [with T = T; U = char; V = bool]': bug.cc:10:18: required from here bug.cc:6:70: internal compiler error: tree check: expected record_type or union_type or qual_union_type, have template_decl in lookup_template_class_1, at cp/pt.c:7674 template <typename T, typename U, typename V> using B = A<T, U>::B<V>; ^ 0xdbfc54 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/gcc/tree.c:9192 0x5bc4c9 tree_check3(tree_node*, char const*, int, char const*, tree_code, tree_code, tree_code) ../../gcc/gcc/tree.h:2749 0x62520c lookup_template_class_1 ../../gcc/gcc/cp/pt.c:7674 0x62520c lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) ../../gcc/gcc/cp/pt.c:7725 0x6296d3 tsubst_aggr_type ../../gcc/gcc/cp/pt.c:10031 0x61ba51 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11436 0x62dbee tsubst_decl ../../gcc/gcc/cp/pt.c:10908 0x61beff tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11357 0x632e4d instantiate_template_1 ../../gcc/gcc/cp/pt.c:15325 0x632e4d instantiate_template(tree_node*, tree_node*, int) ../../gcc/gcc/cp/pt.c:15375 0x61c02d instantiate_alias_template ../../gcc/gcc/cp/pt.c:15405 0x61c02d tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11384 0x62435f lookup_template_class_1 ../../gcc/gcc/cp/pt.c:7499 0x62435f lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) ../../gcc/gcc/cp/pt.c:7725 0x72dcc2 finish_template_type(tree_node*, tree_node*, int) ../../gcc/gcc/cp/semantics.c:2953 0x6c2078 cp_parser_template_id ../../gcc/gcc/cp/parser.c:13440 0x6c2398 cp_parser_class_name ../../gcc/gcc/cp/parser.c:19074 0x6b3bc9 cp_parser_qualifying_entity ../../gcc/gcc/cp/parser.c:5524 0x6b3bc9 cp_parser_nested_name_specifier_opt ../../gcc/gcc/cp/parser.c:5249 0x6cba77 cp_parser_simple_type_specifier ../../gcc/gcc/cp/parser.c:14638 Please submit a full bug report, [etc.]