http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58448

            Bug ID: 58448
           Summary: ICE on invalid: tree_class_check_failed
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dimhen at gmail dot com

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc_current/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/dimhen/src/gcc_current/configure
--prefix=/usr/local/gcc_current --with-multilib-list=m64
--enable-checking=yes,df,fold,rtl,tree --enable-languages=c,c++,lto
--enable-plugin --with-tune=native --with-arch=native
--enable-version-specific-runtime-libs
Thread model: posix
gcc version 4.9.0 20130917 (experimental) [trunk revision 202642] (GCC) 

$ cat tree_class_check_failed.ii 
class SmallVector struct Types4;
template <typename, typename, typename, typename> struct Types {
  typedef Types4<>::Constructable
} Types<SmallVector, SmallVector, SmallVector, SmallVector>:: >

$ g++ -fpreprocessed  -fsyntax-only tree_class_check_failed.ii 
tree_class_check_failed.ii:1:26: error: multiple types in one declaration
 class SmallVector struct Types4;
                          ^
tree_class_check_failed.ii:3:11: error: ‘Types4’ is not a template
   typedef Types4<>::Constructable
           ^
tree_class_check_failed.ii:3:21: error: typedef name may not be a
nested-name-specifier
   typedef Types4<>::Constructable
                     ^
tree_class_check_failed.ii:3:21: error: expected ‘;’ at end of member
declaration
tree_class_check_failed.ii: In instantiation of ‘struct Types<SmallVector,
SmallVector, SmallVector, SmallVector>’:
tree_class_check_failed.ii:4:60:   required from here
tree_class_check_failed.ii:3:21: internal compiler error: tree check: expected
class ‘type’, have ‘exceptional’ (error_mark) in tsubst_decl, at cp/pt.c:10745
0xe287c9 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
    /home/dimhen/src/gcc_current/gcc/tree.c:9258
0x65f7c1 tree_class_check
    /home/dimhen/src/gcc_current/gcc/tree.h:2727
0x65f7c1 tsubst_decl
    /home/dimhen/src/gcc_current/gcc/cp/pt.c:10745
0x64b5c4 tsubst(tree_node*, tree_node*, int, tree_node*)
    /home/dimhen/src/gcc_current/gcc/cp/pt.c:11285
0x677f61 instantiate_class_template_1
    /home/dimhen/src/gcc_current/gcc/cp/pt.c:8952
0x677f61 instantiate_class_template(tree_node*)
    /home/dimhen/src/gcc_current/gcc/cp/pt.c:9216
0x70302b complete_type(tree_node*)
    /home/dimhen/src/gcc_current/gcc/cp/typeck.c:132
0x6e1a9a cp_parser_nested_name_specifier_opt
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:5309
0x6e23bb cp_parser_nested_name_specifier
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:5372
0x6e24f3 cp_parser_ptr_operator
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:17302
0x6e879e cp_parser_declarator
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:16653
0x6ef959 cp_parser_init_declarator
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:16258
0x6f0c54 cp_parser_single_declaration
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:22647
0x6f3830 cp_parser_template_declaration_after_export
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:22449
0x6fb5c1 cp_parser_declaration
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:10728
0x6fa1ed cp_parser_declaration_seq_opt
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:10650
0x6fbac7 cp_parser_translation_unit
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:3939
0x6fbac7 c_parse_file()
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:28893
0x80e184 c_common_parse_file()
    /home/dimhen/src/gcc_current/gcc/c-family/c-opts.c:1046
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to