This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/59347] New: ICE on invalid: tree check: expected class 'type', have 'exceptional' (error_mark) in tsubst_decl, at cp/pt.c:10798


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

            Bug ID: 59347
           Summary: ICE on invalid: tree check: expected class 'type',
                    have 'exceptional' (error_mark) in tsubst_decl, at
                    cp/pt.c:10798
           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

$ uname -a
Linux dim.cp.ru 3.11.9-200.fc19.x86_64 #1 SMP Wed Nov 20 21:22:24 UTC 2013
x86_64 x86_64 x86_64 GNU/Linux

$ 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 20131129 (experimental) [trunk revision 205527] (GCC) 

$ cat x.ii 
struct cast_retty_wrap;
template <class> struct cast_retty {
  typedef cast_retty_wrap<>::ret_type
} class Y cast_retty<Y>::

$ g++ -fpreprocessed -fsyntax-only x.ii
x.ii:3:11: error: 'cast_retty_wrap' is not a template
   typedef cast_retty_wrap<>::ret_type
           ^
x.ii:3:30: error: typedef name may not be a nested-name-specifier
   typedef cast_retty_wrap<>::ret_type
                              ^
x.ii:3:30: error: expected ';' at end of member declaration
x.ii:4:1: error: expected ';' after struct definition
 } class Y cast_retty<Y>::
 ^
x.ii: In instantiation of 'struct cast_retty<Y>':
x.ii:4:24:   required from here
x.ii:3:30: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in tsubst_decl, at cp/pt.c:10798
   typedef cast_retty_wrap<>::ret_type
                              ^
0xeea097 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
    /home/dimhen/src/gcc_current/gcc/tree.c:9241
0x6c14d8 tree_class_check
    /home/dimhen/src/gcc_current/gcc/tree.h:2825
0x6c14d8 tsubst_decl
    /home/dimhen/src/gcc_current/gcc/cp/pt.c:10798
0x6abd2c tsubst(tree_node*, tree_node*, int, tree_node*)
    /home/dimhen/src/gcc_current/gcc/cp/pt.c:11338
0x6da18f instantiate_class_template_1
    /home/dimhen/src/gcc_current/gcc/cp/pt.c:8987
0x6da18f instantiate_class_template(tree_node*)
    /home/dimhen/src/gcc_current/gcc/cp/pt.c:9251
0x76a933 complete_type(tree_node*)
    /home/dimhen/src/gcc_current/gcc/cp/typeck.c:134
0x743298 cp_parser_nested_name_specifier_opt
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:5389
0x743d7b cp_parser_nested_name_specifier
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:5452
0x743eb7 cp_parser_ptr_operator
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:17485
0x74b800 cp_parser_declarator
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:16834
0x756939 cp_parser_init_declarator
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:16433
0x758699 cp_parser_simple_declaration
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:11134
0x73c5a3 cp_parser_block_declaration
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:11015
0x762c26 cp_parser_declaration
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:10912
0x761918 cp_parser_declaration_seq_opt
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:10798
0x7631eb cp_parser_translation_unit
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:4018
0x7631eb c_parse_file()
    /home/dimhen/src/gcc_current/gcc/cp/parser.c:31261
0x880973 c_common_parse_file()
    /home/dimhen/src/gcc_current/gcc/c-family/c-opts.c:1056
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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]