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 tree-optimization/15621] New: ICE: segfault in tree-cfg


Here the backtrace:

$ gdb --args ./cc1plus ~/bugs/pr14863-5-gcc35-O1-ICE.cc -quiet -O1
Using host libthread_db library "/lib/libthread_db.so.1".
Breakpoint 1 at 0x8413d26: file ../../gcc/gcc/diagnostic.c, line 589.
Function "exit" not defined.
Function "abort" not defined.
(gdb) run
Starting program: /usr/local/src/gcc/head/build/gcc/cc1plus
/home/ssb/bugs/pr14863-5-gcc35-O1-ICE.cc -quiet -O1

Program received signal SIGSEGV, Segmentation fault.
0x082a8e15 in tsi_stmt (i={ptr = 0x0, container = 0x4054de28}) at tree-iterator.h:93
93        return i.ptr->stmt;
(gdb) where
#0  0x082a8e15 in tsi_stmt (i={ptr = 0x0, container = 0x4054de28}) at
tree-iterator.h:93
#1  0x082aff5f in remove_useless_stmts_tc (stmt_p=0x40548258, data=0xbffff3b0)
at ../../gcc/gcc/tree-cfg.c:1241
#2  0x082b1540 in remove_useless_stmts_1 (tp=0x40548258, data=0xbffff3b0) at
../../gcc/gcc/tree-cfg.c:1409
#3  0x082b1a71 in remove_useless_stmts_1 (tp=0x40552078, data=0xbffff3b0) at
../../gcc/gcc/tree-cfg.c:1463
#4  0x082b0b37 in remove_useless_stmts_bind (stmt_p=0x405482b8, data=0xbffff3b0)
at ../../gcc/gcc/tree-cfg.c:1290
#5  0x082b1557 in remove_useless_stmts_1 (tp=0x405482b8, data=0xbffff3b0) at
../../gcc/gcc/tree-cfg.c:1413
#6  0x082b1a71 in remove_useless_stmts_1 (tp=0x4055204c, data=0xbffff3b0) at
../../gcc/gcc/tree-cfg.c:1463
#7  0x082b0b37 in remove_useless_stmts_bind (stmt_p=0x405482c8, data=0xbffff3b0)
at ../../gcc/gcc/tree-cfg.c:1290
#8  0x082b1557 in remove_useless_stmts_1 (tp=0x405482c8, data=0xbffff3b0) at
../../gcc/gcc/tree-cfg.c:1413
#9  0x082b1a71 in remove_useless_stmts_1 (tp=0x405520d0, data=0xbffff3b0) at
../../gcc/gcc/tree-cfg.c:1463
#10 0x082b0b37 in remove_useless_stmts_bind (stmt_p=0x4054a728, data=0xbffff3b0)
at ../../gcc/gcc/tree-cfg.c:1290
#11 0x082b1557 in remove_useless_stmts_1 (tp=0x4054a728, data=0xbffff3b0) at
../../gcc/gcc/tree-cfg.c:1413
#12 0x082b1b9d in remove_useless_stmts () at ../../gcc/gcc/tree-cfg.c:1497
#13 0x082d042b in execute_one_pass (pass=0x89de440) at
../../gcc/gcc/tree-optimize.c:406
#14 0x082d04fc in execute_pass_list (pass=0x89de440) at
../../gcc/gcc/tree-optimize.c:435
#15 0x082d093a in tree_rest_of_compilation (fndecl=0x4054a6cc, nested_p=false)
at ../../gcc/gcc/tree-optimize.c:530
#16 0x081f1b3a in expand_body (fn=0x4054a6cc) at ../../gcc/gcc/cp/semantics.c:2826
#17 0x088508ca in cgraph_expand_function (node=0x405519f8) at
../../gcc/gcc/cgraphunit.c:794
#18 0x0884f377 in cgraph_assemble_pending_functions () at
../../gcc/gcc/cgraphunit.c:295
#19 0x0884f53e in cgraph_finalize_function (decl=0x4054a6cc, nested=false) at
../../gcc/gcc/cgraphunit.c:376
#20 0x081f1fcf in expand_or_defer_fn (fn=0x4054a6cc) at
../../gcc/gcc/cp/semantics.c:2909
#21 0x081852fc in cp_parser_function_definition_after_declarator
(parser=0x40543cc0, inline_p=false)
    at ../../gcc/gcc/cp/parser.c:14313
#22 0x08185190 in cp_parser_function_definition_from_specifiers_and_declarator
(parser=0x40543cc0, decl_specifiers=0x40541df8, 
    attributes=0x0, declarator=0x404d2948) at ../../gcc/gcc/cp/parser.c:14251
#23 0x0817cd01 in cp_parser_init_declarator (parser=0x40543cc0,
decl_specifiers=0x40541df8, prefix_attributes=0x0, 
    function_definition_allowed_p=true, member_p=false,
declares_class_or_enum=0, function_definition_p=0xbffff723)
    at ../../gcc/gcc/cp/parser.c:10028
#24 0x0817832c in cp_parser_simple_declaration (parser=0x40543cc0,
function_definition_allowed_p=true)
    at ../../gcc/gcc/cp/parser.c:6573
#25 0x08178250 in cp_parser_block_declaration (parser=0x40543cc0,
statement_p=false) at ../../gcc/gcc/cp/parser.c:6489
#26 0x081780d5 in cp_parser_declaration (parser=0x40543cc0) at
../../gcc/gcc/cp/parser.c:6409
#27 0x08177e6b in cp_parser_declaration_seq_opt (parser=0x40543cc0) at
../../gcc/gcc/cp/parser.c:6307
#28 0x081728ed in cp_parser_translation_unit (parser=0x40543cc0) at
../../gcc/gcc/cp/parser.c:2393
#29 0x08187860 in c_parse_file () at ../../gcc/gcc/cp/parser.c:15379
#30 0x08290b1c in c_common_parse_file (set_yydebug=0) at ../../gcc/gcc/c-opts.c:1239
#31 0x087bb81a in compile_file () at ../../gcc/gcc/toplev.c:1649
#32 0x087bd7be in do_compile () at ../../gcc/gcc/toplev.c:2695
#33 0x087bd823 in toplev_main (argc=4, argv=0xbffff914) at
../../gcc/gcc/toplev.c:2727
#34 0x082a8660 in main (argc=4, argv=0xbffff914) at ../../gcc/gcc/main.c:35
(gdb) 

There is another bug 'derived' from 14863, i will report it tomorrow.

-- 
           Summary: ICE: segfault in tree-cfg
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: belyshev at lubercy dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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