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]

19991228 chk-ICE at tree.c:4853 compiling gcc/ch/lex.c on i586-sco-sysv5uw7.1.0


Title: 19991228 chk-ICE at tree.c:4853 compiling gcc/ch/lex.c on i586-sco-sysv5uw7.1.0

i586-sco-sysv5uw7.1.0 --enable-checking

stage1/xgcc -Bstage1/ -B/usr/local/i586-sco-sysv5uw7.1.0/bin/ -c  -DIN_GCC   -W -Wall -Wtraditional -O2 -g -O2     -I. -I.. -I../../../egcs-19991228/gcc/ch -I../../../egcs-19991228/gcc/ch/.. -I../../../egcs-19991228/gcc/ch/../config -I../../../egcs-19991228/gcc/ch/../../include ../../../egcs-19991228/gcc/ch/lex.c

../../../egcs-19991228/gcc/ch/lex.c: In function `handle_name':
../../../egcs-19991228/gcc/ch/lex.c:665: Tree check: expected class 'd', have 't' (enumeral_type)
../../../egcs-19991228/gcc/ch/lex.c:665: Internal compiler error in `decl_function_context', at tree.c:4853
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
make[3]: *** [lex.o] Error 1
make[3]: Leaving directory `/devel/src/egcs-19991228.chk/gcc/ch'


 stage1/cc1 lex.i -quiet -dumpbase lex.c -g -O2 -O2 -W -Wall -Wtraditional -version -o lex.s
GNU C version 2.96 19991228 (experimental) (i586-sco-sysv5uw7.1.0) compiled by GNU C version 2.95.2 19991024 (release).
../../../egcs-19991228/gcc/ch/lex.c: In function `handle_name':
../../../egcs-19991228/gcc/ch/lex.c:665: Tree check: expected class 'd', have 't' (enumeral_type)
../../../egcs-19991228/gcc/ch/lex.c:665: Internal compiler error in `decl_function_context', at tree.c:4853
Please submit a full bug report.


GNU C version 2.96 19991228 (experimental) (i586-sco-sysv5uw7.1.0) compiled by GNU C version 2.95.2 19991024 (release).

Breakpoint 5, decl_function_context (decl=0xbfe6f300)
    at ../../egcs-19991228/gcc/tree.c:4853
4853        context = DECL_CONTEXT (decl);
#0  decl_function_context (decl=0xbfe6f300)
    at ../../egcs-19991228/gcc/tree.c:4853



#1  0x8149877 in make_function_rtl (decl=0xbfe6f300)
    at ../../egcs-19991228/gcc/varasm.c:523
#2  0x86b1248 in start_function (declspecs=0xbfe71620, declarator=0xbfe71880,
    prefix_attributes=0x0, attributes=0x0, nested=0)
    at ../../egcs-19991228/gcc/c-decl.c:6047
#3  0x8691f95 in yyparse () at ../../egcs-19991228/gcc/c-parse.c:307
#4  0x804c85b in compile_file (name=0xbff61398 "lex.i")
    at ../../egcs-19991228/gcc/toplev.c:2383
#5  0x80516e7 in main (argc=14, argv=0x8047ccc)
    at ../../egcs-19991228/gcc/toplev.c:4791
#6  0x8049121 in _start ()
4848         and use something else for the "virtual context".  */
4849      else if (TREE_CODE (decl) == FUNCTION_DECL && DECL_VINDEX (decl))
4850        context = TYPE_MAIN_VARIANT
4851          (TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (decl)))));
4852      else
4853        context = DECL_CONTEXT (decl);
4854   
4855      while (context && TREE_CODE (context) != FUNCTION_DECL)
4856        {

4857          if (TREE_CODE (context) == BLOCK)
(gdb) ptype decl
type = union tree_node {
    struct tree_common common;
    struct tree_int_cst int_cst;
    struct tree_real_cst real_cst;
    struct tree_string string;
    struct tree_complex complex;
    struct tree_identifier identifier;
    struct tree_decl decl;
    struct tree_type type;
    struct tree_list list;
    struct tree_vec vec;
    struct tree_exp exp;
    struct tree_block block;
} *
(gdb) call debug_tree(decl)
 <function_decl bfe6f300 getlogin_r
    type <function_type bfe77e00
        type <integer_type bff75400 int
            permanent SI
            size <integer_cst bff77560 constant permanent 32>
            align 32 symtab 0 alias set 2 precision 32
            min <integer_cst bff77520 constant permanent -2147483648>
            max <integer_cst bff77540 constant permanent 2147483647>
            pointer_to_this <pointer_type bff71500>>
      
        permanent DI
        size <integer_cst bff776a0 constant permanent 64>
        align 32 symtab 0 alias set 0
        arg-types <tree_list bfe71160
            permanent value <pointer_type bff71280>
            chain <tree_list bfe71180
                permanent value <integer_type bff31480 size_t>
                chain <tree_list bfe711a0
                    permanent value <void_type bff73900 void>>>>>
  
    permanent static in_system_header QI file include/stdlib.h line 226
    initial <error_mark bff7d330> chain <function_decl bfe6f100 _xttyname_r>>
(gdb)
 <function_decl bfe6f300 getlogin_r
    type <function_type bfe77e00
        type <integer_type bff75400 int
            permanent SI
            size <integer_cst bff77560 constant permanent 32>
            align 32 symtab 0 alias set 2 precision 32
            min <integer_cst bff77520 constant permanent -2147483648>
            max <integer_cst bff77540 constant permanent 2147483647>
            pointer_to_this <pointer_type bff71500>>
      
        permanent DI
        size <integer_cst bff776a0 constant permanent 64>
        align 32 symtab 0 alias set 0
        arg-types <tree_list bfe71160
            permanent value <pointer_type bff71280>
            chain <tree_list bfe71180
                permanent value <integer_type bff31480 size_t>
                chain <tree_list bfe711a0
                    permanent value <void_type bff73900 void>>>>>
  
    permanent static in_system_header QI file include/stdlib.h line 226
    initial <error_mark bff7d330> chain <function_decl bfe6f100 _xttyname_r>>
(gdb) ptype context
type = union tree_node {
    struct tree_common common;
    struct tree_int_cst int_cst;
    struct tree_real_cst real_cst;
    struct tree_string string;
    struct tree_complex complex;
    struct tree_identifier identifier;
    struct tree_decl decl;
    struct tree_type type;
    struct tree_list list;
    struct tree_vec vec;
    struct tree_exp exp;
    struct tree_block block;
} *
(gdb) p context
$1 = (union tree_node *) 0xbff75400
(gdb) call debug_tree(context)
 <integer_type bff75400 int
    permanent SI
    size <integer_cst bff77560 type <integer_type bff73580 unsigned int> constant permanent 32>
    align 32 symtab 0 alias set 2 precision 32
    min <integer_cst bff77520 type <integer_type bff75400 int> constant permanent -2147483648>
    max <integer_cst bff77540 type <integer_type bff75400 int> constant permanent 2147483647>
    pointer_to_this <pointer_type bff71500>>
(gdb) c
Continuing.

Breakpoint 5, decl_function_context (decl=0xbfe6f300)
    at ../../egcs-19991228/gcc/tree.c:4853
4853        context = DECL_CONTEXT (decl);
(gdb) c
Continuing.

Breakpoint 5, decl_function_context (decl=0xbfe6f200)
    at ../../egcs-19991228/gcc/tree.c:4853
4853        context = DECL_CONTEXT (decl);
(gdb) c
Continuing.

Breakpoint 5, decl_function_context (decl=0xbfe6f180)
    at ../../egcs-19991228/gcc/tree.c:4853
4853        context = DECL_CONTEXT (decl);
(gdb) bt
#0  decl_function_context (decl=0xbfe6f180)
    at ../../egcs-19991228/gcc/tree.c:4853
#1  0x80f1639 in expand_expr (exp=0xbfe6f180, target=0x0, tmode=VOIDmode,
    modifier=EXPAND_NORMAL) at ../../egcs-19991228/gcc/expr.c:5917
#2  0x8119449 in store_one_arg (arg=0x8047164, argblock=0x0, may_be_alloca=0,
    variable_size=0, reg_parm_stack_space=0)
    at ../../egcs-19991228/gcc/calls.c:3868
#3  0x8116d92 in expand_call (exp=0xbfe71b00, target=0xbfeebf20, ignore=0)
    at ../../egcs-19991228/gcc/calls.c:2266
#4  0x80fabb0 in expand_expr (exp=0xbfe71b00, target=0xbfeebf20, tmode=SImode,
    modifier=EXPAND_NORMAL) at ../../egcs-19991228/gcc/expr.c:7020
#5  0x80c66de in expand_return (retval=0xbfe71b40)
    at ../../egcs-19991228/gcc/stmt.c:3052
#6  0x86ca69d in c_expand_return (retval=0xbfe71b00)
    at ../../egcs-19991228/gcc/c-typeck.c:6685
#7  0x8696aa3 in yyparse () at ../../egcs-19991228/gcc/c-parse.c:1880
#8  0x804c85b in compile_file (name=0xbff61398 "lex.i")
    at ../../egcs-19991228/gcc/toplev.c:2383
#9  0x80516e7 in main (argc=14, argv=0x8047ccc)
    at ../../egcs-19991228/gcc/toplev.c:4791
#10 0x8049121 in _start ()
(gdb) info break
Num Type           Disp Enb Address    What
4   breakpoint     keep y   0x0804a7e2 in fatal
                                       at ../../egcs-19991228/gcc/diagnostic.c:802
5   breakpoint     keep y   0x08062c40 in decl_function_context
                                       at ../../egcs-19991228/gcc/tree.c:4853
        breakpoint already hit 4 times
(gdb) dele 5
(gdb) c
Continuing.
../../../egcs-19991228/gcc/ch/lex.c: In function `handle_name':
../../../egcs-19991228/gcc/ch/lex.c:665: Tree check: expected class 'd', have 't' (enumeral_type)

Breakpoint 4, fatal (
    msgid=0x86ec540 "Internal compiler error in `%s', at %s:%d\nPlease submit a full bug report.\nSee <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.") at ../../egcs-19991228/gcc/diagnostic.c:802

802       VA_START (ap, msgid);
(gdb) up 1
#1  0x8162703 in fancy_abort (file=0x86e2b40 "../../egcs-19991228/gcc/tree.c",
    line=4853, function=0x86e3b7f "decl_function_context")
    at ../../egcs-19991228/gcc/rtl.c:1255
1255      fatal (
(gdb) l
1250         int line;
1251         const char *function;
1252    {
1253      if (function == NULL)
1254        function = "?";
1255      fatal (
1256    "Internal compiler error in `%s', at %s:%d\n\
1257    Please submit a full bug report.\n\
1258    See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> \
1259    for instructions.",
(gdb) bt
#0  fatal (
    msgid=0x86ec540 "Internal compiler error in `%s', at %s:%d\nPlease submit a full bug report.\nSee <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.") at ../../egcs-19991228/gcc/diagnostic.c:802

#1  0x8162703 in fancy_abort (file=0x86e2b40 "../../egcs-19991228/gcc/tree.c",
    line=4853, function=0x86e3b7f "decl_function_context")
    at ../../egcs-19991228/gcc/rtl.c:1255
#2  0x8063be0 in tree_class_check_failed (node=0xbfa99380, cl=100 'd',
    file=0x86e2b40 "../../egcs-19991228/gcc/tree.c", line=4853,
    function=0x86e3b7f "decl_function_context")
    at ../../egcs-19991228/gcc/tree.c:5253
#3  0x8062c76 in decl_function_context (decl=0xbfa99380)
    at ../../egcs-19991228/gcc/tree.c:4853

#4  0x81cdbee in add_abstract_origin_attribute ()
    at ../../egcs-19991228/gcc/dwarf2out.c:7511
#5  0x81c795d in gen_inlined_enumeration_type_die (type=0xbfa99380,
    context_die=0x87f4f10) at ../../egcs-19991228/gcc/dwarf2out.c:7948
#6  0x81cad8e in gen_tagged_type_instantiation_die (type=0xbfa99380,
    context_die=0x87f4f10) at ../../egcs-19991228/gcc/dwarf2out.c:9223
#7  0x81cb60b in gen_decl_die (decl=0xbf726000, context_die=0x87f4f10)
    at ../../egcs-19991228/gcc/dwarf2out.c:9466
#8  0x81cb1da in decls_for_scope (stmt=0xbf72a540, context_die=0x87f4f10,
    depth=3) at ../../egcs-19991228/gcc/dwarf2out.c:9361
#9  0x81caf9e in gen_block_die (stmt=0xbf72a540, context_die=0x87f4f10,
    depth=3) at ../../egcs-19991228/gcc/dwarf2out.c:9320
#10 0x81cb23a in decls_for_scope (stmt=0xbf72a520, context_die=0x87f4f10,

    depth=2) at ../../egcs-19991228/gcc/dwarf2out.c:9369
#11 0x81c9708 in gen_inlined_subroutine_die (stmt=0xbf72a520,
    context_die=0x879cc20, depth=2) at ../../egcs-19991228/gcc/dwarf2out.c:8670
#12 0x81caf74 in gen_block_die (stmt=0xbf72a520, context_die=0x879cc20,
    depth=2) at ../../egcs-19991228/gcc/dwarf2out.c:9315
#13 0x81cb23a in decls_for_scope (stmt=0xbf6c1720, context_die=0x879cc20,
    depth=1) at ../../egcs-19991228/gcc/dwarf2out.c:9369
#14 0x81caf9e in gen_block_die (stmt=0xbf6c1720, context_die=0x879cc20,
    depth=1) at ../../egcs-19991228/gcc/dwarf2out.c:9320
#15 0x81cb23a in decls_for_scope (stmt=0xbf6c1740, context_die=0x879cc20,
    depth=0) at ../../egcs-19991228/gcc/dwarf2out.c:9369
#16 0x81c8d8c in gen_subprogram_die (decl=0xbf916a00, context_die=0x8763df8)
    at ../../egcs-19991228/gcc/dwarf2out.c:8486
#17 0x81cb4c5 in gen_decl_die (decl=0xbf916a00, context_die=0x8763df8)
    at ../../egcs-19991228/gcc/dwarf2out.c:9448
#18 0x81cbb62 in dwarf2out_decl (decl=0xbf916a00)
    at ../../egcs-19991228/gcc/dwarf2out.c:9677
#19 0x804f8a0 in rest_of_compilation (decl=0xbf916a00)
    at ../../egcs-19991228/gcc/toplev.c:3657
#20 0x86b37b4 in finish_function (nested=0)
    at ../../egcs-19991228/gcc/c-decl.c:6721
#21 0x8691fd6 in yyparse () at ../../egcs-19991228/gcc/c-parse.c:314
#22 0x804c85b in compile_file (name=0xbff61398 "lex.i")

    at ../../egcs-19991228/gcc/toplev.c:2383
#23 0x80516e7 in main (argc=14, argv=0x8047ccc)
    at ../../egcs-19991228/gcc/toplev.c:4791
#24 0x8049121 in _start ()
(gdb) up 1
#2  0x8063be0 in tree_class_check_failed (node=0xbfa99380, cl=100 'd',
    file=0x86e2b40 "../../egcs-19991228/gcc/tree.c", line=4853,
    function=0x86e3b7f "decl_function_context")
    at ../../egcs-19991228/gcc/tree.c:5253
5253      fancy_abort (file, line, function);
(gdb) l
5248         const char *function;
5249    {
5250      error ("Tree check: expected class '%c', have '%c' (%s)",
5251             cl, TREE_CODE_CLASS (TREE_CODE (node)),
5252             tree_code_name[TREE_CODE (node)]);
5253      fancy_abort (file, line, function);
5254    }
5255   
5256    #endif /* ENABLE_TREE_CHECKING */
5257   
(gdb) l 5240
5235      error ("Tree check: expected %s, have %s",
5236             tree_code_name[code], tree_code_name[TREE_CODE (node)]);
5237      fancy_abort (file, line, function);
5238    }
5239   
5240    /* Similar to above, except that we check for a class of tree
5241       code, given in CL.  */
5242    void
5243    tree_class_check_failed (node, cl, file, line, function)
5244         const tree node;
(gdb) up 1
#3  0x8062c76 in decl_function_context (decl=0xbfa99380)
    at ../../egcs-19991228/gcc/tree.c:4853
4853        context = DECL_CONTEXT (decl);
(gdb) l
4848         and use something else for the "virtual context".  */
4849      else if (TREE_CODE (decl) == FUNCTION_DECL && DECL_VINDEX (decl))
4850        context = TYPE_MAIN_VARIANT
4851          (TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (decl)))));
4852      else
4853        context = DECL_CONTEXT (decl);
4854   
4855      while (context && TREE_CODE (context) != FUNCTION_DECL)
4856        {
4857          if (TREE_CODE (context) == BLOCK)
(gdb) call debug_tree(decl)
 <enumeral_type bfa99380
    unsigned asm_written type_0 SI
    size <integer_cst bff77560 type <integer_type bff73580 unsigned int> constant permanent 32>
    align 32 symtab 142561296 alias set -1 precision 32
    min <integer_cst bfa9dbc0 type <integer_type bff75400 int> constant 2>
    max <integer_cst bfa9dd40 type <integer_type bff75400 int> constant 2821>
    values <tree_list bfa9dba0
      
        purpose <identifier_node bfadbfc0 TOTAL_KEYWORDS
            permanent>
        value <integer_cst bfa9db40 constant 300>
        chain <tree_list bfa9dc20
          
            purpose <identifier_node bfa97000 MIN_WORD_LENGTH
                permanent> value <integer_cst bfa9dbc0 2>
            chain <tree_list bfa9dca0
              
                purpose <identifier_node bfa97040 MAX_WORD_LENGTH
                    permanent>
                value <integer_cst bfa9dc40 constant 30>
                chain <tree_list bfa9dd20
                  
                    purpose <identifier_node bfa97080 MIN_HASH_VALUE
                        permanent>
                    value <integer_cst bfa9dcc0 constant 7>
                    chain <tree_list bfa9dda0
                      
                        purpose <identifier_node bfa970c0 MAX_HASH_VALUE
                            permanent> value <integer_cst bfa9dd40 2821>>>>>> context <function_decl bfad7900 in_word_set>

    chain <type_decl bfa99400>>
(gdb)
 <enumeral_type bfa99380
    unsigned asm_written type_0 SI
    size <integer_cst bff77560 type <integer_type bff73580 unsigned int> constant permanent 32>
    align 32 symtab 142561296 alias set -1 precision 32
    min <integer_cst bfa9dbc0 type <integer_type bff75400 int> constant 2>
    max <integer_cst bfa9dd40 type <integer_type bff75400 int> constant 2821>
    values <tree_list bfa9dba0
      
        purpose <identifier_node bfadbfc0 TOTAL_KEYWORDS
            permanent>
        value <integer_cst bfa9db40 constant 300>
        chain <tree_list bfa9dc20
          
            purpose <identifier_node bfa97000 MIN_WORD_LENGTH
                permanent> value <integer_cst bfa9dbc0 2>
            chain <tree_list bfa9dca0
              
                purpose <identifier_node bfa97040 MAX_WORD_LENGTH
                    permanent>
                value <integer_cst bfa9dc40 constant 30>
                chain <tree_list bfa9dd20
                  
                    purpose <identifier_node bfa97080 MIN_HASH_VALUE
                        permanent>
                    value <integer_cst bfa9dcc0 constant 7>
                    chain <tree_list bfa9dda0
                      
                        purpose <identifier_node bfa970c0 MAX_HASH_VALUE
                            permanent> value <integer_cst bfa9dd40 2821>>>>>> context <function_decl bfad7900 in_word_set>

    chain <type_decl bfa99400>>
(gdb) call debug_tree(context)
 <error_mark 20>
(gdb) c
Continuing.
../../../egcs-19991228/gcc/ch/lex.c:665: Internal compiler error in `decl_function_context', at tree.c:4853
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.

Program exited with code 041.


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