Bug 12447 - [tree-ssa] ICE: segfault in require_phi
Summary: [tree-ssa] ICE: segfault in require_phi
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: tree-ssa
: P2 critical
Target Milestone: tree-ssa
Assignee: Daniel Berlin
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks: 12781
  Show dependency treegraph
 
Reported: 2003-09-29 20:34 UTC by marcus
Modified: 2003-10-30 05:57 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2003-09-29 22:16:59


Attachments
testcase for 12447 (166 bytes, text/plain)
2003-09-29 20:34 UTC, marcus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description marcus 2003-09-29 20:34:16 UTC
gcc -O2 -c xx.i 
xx.i: In function `d': 
 
xx.i:6: internal compiler error: Segmentation fault
Comment 1 marcus 2003-09-29 20:34:40 UTC
Created attachment 4861 [details]
testcase for 12447
Comment 2 marcus 2003-09-29 20:35:50 UTC
(gdb) run -fpreprocessed xx.i -quiet -dumpbase xx.i -mtune=pentiumpro -auxbase 
xx -O2 -version -o /tmp/cc2CvB5w.s 
Starting program: 
/home/marcus/projects/gcc/BIN/libexec/gcc/i686-pc-linux-gnu/3.5-tree-ssa/cc1 
-fpreprocessed xx.i -quiet -dumpbase xx.i -mtune=pentiumpro -auxbase xx -O2 
-version -o /tmp/cc2CvB5w.s 
GNU C version 3.5-tree-ssa 20030929 (merged 20030923) (i686-pc-linux-gnu) 
        compiled by GNU C version 3.5-tree-ssa 20030929 (merged 20030923). 
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 
 
Program received signal SIGSEGV, Segmentation fault. 
0x08114427 in require_phi (ei=0x40205560, bb=0x19) 
    at /home/marcus/projects/gcc/gcc/tree-ssa-pre.c:2154 
2154      EXECUTE_IF_SET_IN_BITMAP (pre_dfs[bb->index], 0, i, 
(gdb) bt 
#0  0x08114427 in require_phi (ei=0x40205560, bb=0x19) 
    at /home/marcus/projects/gcc/gcc/tree-ssa-pre.c:2154 
#1  0x08114782 in finalize_2 (ei=0x40205560) 
    at /home/marcus/projects/gcc/gcc/tree-ssa-pre.c:2234 
#2  0x081171c4 in pre_expression (slot=0x40205560, data=0x19) 
    at /home/marcus/projects/gcc/gcc/tree-ssa-pre.c:2853 
#3  0x08117805 in tree_perform_ssapre (fndecl=0x19, phase=TDI_pre) 
    at /home/marcus/projects/gcc/gcc/tree-ssa-pre.c:2996 
#4  0x080eb3e9 in optimize_function_tree (fndecl=0x40040a78) 
    at /home/marcus/projects/gcc/gcc/tree-optimize.c:161 
#5  0x080eba30 in tree_rest_of_compilation (fndecl=0x401a8f20, nested_p=false) 
    at /home/marcus/projects/gcc/gcc/tree-optimize.c:304 
#6  0x08064ef8 in c_expand_body_1 (fndecl=0x40040a78, nested_p=1075482400) 
    at /home/marcus/projects/gcc/gcc/c-decl.c:6152 
#7  0x080650c7 in c_expand_body (fndecl=0x19) at 
/home/marcus/projects/gcc/gcc/c-decl.c:6182 
#8  0x083c806b in cgraph_expand_function (node=0x402017b4) 
    at /home/marcus/projects/gcc/gcc/cgraphunit.c:491 
#9  0x083c757f in cgraph_assemble_pending_functions () 
    at /home/marcus/projects/gcc/gcc/cgraphunit.c:141 
#10 0x083c76b5 in cgraph_finalize_function (decl=0x401fee0c, nested=false) 
    at /home/marcus/projects/gcc/gcc/cgraphunit.c:217 
#11 0x0806499f in finish_function () at 
/home/marcus/projects/gcc/gcc/c-decl.c:6108 
#12 0x0804b546 in yyparse () at c-parse.y:385 
#13 0x0805245b in c_parse_file () at c-parse.y:3022 
#14 0x0809872b in c_common_parse_file (set_yydebug=25) 
    at /home/marcus/projects/gcc/gcc/c-opts.c:1209 
#15 0x0837201b in compile_file () at 
/home/marcus/projects/gcc/gcc/toplev.c:1833 
#16 0x083769ab in do_compile () at /home/marcus/projects/gcc/gcc/toplev.c:4540 
#17 0x08376aad in toplev_main (argc=25, argv=0x8) 
    at /home/marcus/projects/gcc/gcc/toplev.c:4580 
#18 0x080c92cb in main (argc=25, argv=0x19) at 
/home/marcus/projects/gcc/gcc/main.c:35 
#19 0x400614c2 in __libc_start_main () from /lib/i686/libc.so.6 
 
Comment 3 Wolfgang Bangerth 2003-09-29 20:55:05 UTC
The ICE position already indicates this, but just to confirm: doesn't happen
on mainline, only on tree-ssa.

W.
Comment 4 Daniel Berlin 2003-09-29 22:17:26 UTC
SSAPRE is my area
Comment 5 Daniel Berlin 2003-09-29 22:24:13 UTC
This is a side effect of not pre-splitting critical edges.
If you change the #if 0 code in tree-ssa-pre.c's split_critical_edges to #if 1, the test case compiles 
fine.

ENabling this code is currently blocked on another bug in edge splitting/edge insertion, but as 
soon as that is cleared up, this will be fixed.
Comment 6 Daniel Berlin 2003-10-30 05:57:20 UTC
Fixed as of 10-30-2003