------- Comment #1 from tehila at il dot ibm dot com 2007-07-19 13:38 ------- (In reply to comment #0) > #0 first_stmt (bb=0xb7fa75a0) at ../../gcc/gcc/tree-iterator.h:43 > #1 0x0838d46e in dump_generic_bb (file=0x9785710, bb=0xb7fa75a0, indent=0, > flags=16448) at ../../gcc/gcc/tree-pretty-print.c:2909 > #2 0x0831b8a7 in tree_dump_bb (bb=0xb7fa75a0, outf=0x9785710, indent=0) at > ../../gcc/gcc/tree-cfg.c:2206 > #3 0x08127144 in dump_bb (bb=0xb7fa75a0, outf=0x9785710, indent=0) at > ../../gcc/gcc/cfghooks.c:294 > #4 0x08324f4e in remove_bb (bb=0xb7fa75a0) at ../../gcc/gcc/tree-cfg.c:1964 > #5 0x0812661d in delete_basic_block (bb=0xb7fa75a0) at > ../../gcc/gcc/cfghooks.c:472 > #6 0x0835ad2a in combine_blocks (loop=0xb7d73678) at > ../../gcc/gcc/tree-if-conv.c:991 > #7 0x0835bb2d in tree_if_conversion (loop=0xb7d73678, for_vectorizer=<value > optimized out>) at ../../gcc/gcc/tree-if-conv.c:201 > #8 0x0835c813 in main_tree_if_conversion () at > ../../gcc/gcc/tree-if-conv.c:1137 > #9 0x0829768f in execute_one_pass (pass=0x8823060) at > ../../gcc/gcc/passes.c:1125 > #10 0x0829788f in execute_pass_list (pass=0x8823060) at > ../../gcc/gcc/passes.c:1178 > #11 0x082978a2 in execute_pass_list (pass=0x88239a0) at > ../../gcc/gcc/passes.c:1179 > #12 0x082978a2 in execute_pass_list (pass=0x88231a0) at > ../../gcc/gcc/passes.c:1179 > #13 0x08375fc2 in tree_rest_of_compilation (fndecl=0xb7d66f00) at > ../../gcc/gcc/tree-optimize.c:406 > #14 0x084e8da0 in cgraph_expand_function (node=0xb7d66f80) at > ../../gcc/gcc/cgraphunit.c:1073 > #15 0x084eb500 in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:1142 > #16 0x0805ddd6 in c_write_global_declarations () at > ../../gcc/gcc/c-decl.c:7898 > #17 0x0831996f in toplev_main (argc=17, argv=0xbfced724) at > ../../gcc/gcc/toplev.c:1057 > #18 0x080da95f in main (argc=-1210635284, argv=0xb7d72c24) at > ../../gcc/gcc/main.c:35
(In reply to comment #0) > #0 first_stmt (bb=0xb7fa75a0) at ../../gcc/gcc/tree-iterator.h:43 > #1 0x0838d46e in dump_generic_bb (file=0x9785710, bb=0xb7fa75a0, indent=0, > flags=16448) at ../../gcc/gcc/tree-pretty-print.c:2909 > #2 0x0831b8a7 in tree_dump_bb (bb=0xb7fa75a0, outf=0x9785710, indent=0) at > ../../gcc/gcc/tree-cfg.c:2206 > #3 0x08127144 in dump_bb (bb=0xb7fa75a0, outf=0x9785710, indent=0) at > ../../gcc/gcc/cfghooks.c:294 > #4 0x08324f4e in remove_bb (bb=0xb7fa75a0) at ../../gcc/gcc/tree-cfg.c:1964 > #5 0x0812661d in delete_basic_block (bb=0xb7fa75a0) at > ../../gcc/gcc/cfghooks.c:472 > #6 0x0835ad2a in combine_blocks (loop=0xb7d73678) at > ../../gcc/gcc/tree-if-conv.c:991 > #7 0x0835bb2d in tree_if_conversion (loop=0xb7d73678, for_vectorizer=<value > optimized out>) at ../../gcc/gcc/tree-if-conv.c:201 > #8 0x0835c813 in main_tree_if_conversion () at > ../../gcc/gcc/tree-if-conv.c:1137 > #9 0x0829768f in execute_one_pass (pass=0x8823060) at > ../../gcc/gcc/passes.c:1125 > #10 0x0829788f in execute_pass_list (pass=0x8823060) at > ../../gcc/gcc/passes.c:1178 > #11 0x082978a2 in execute_pass_list (pass=0x88239a0) at > ../../gcc/gcc/passes.c:1179 > #12 0x082978a2 in execute_pass_list (pass=0x88231a0) at > ../../gcc/gcc/passes.c:1179 > #13 0x08375fc2 in tree_rest_of_compilation (fndecl=0xb7d66f00) at > ../../gcc/gcc/tree-optimize.c:406 > #14 0x084e8da0 in cgraph_expand_function (node=0xb7d66f80) at > ../../gcc/gcc/cgraphunit.c:1073 > #15 0x084eb500 in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:1142 > #16 0x0805ddd6 in c_write_global_declarations () at > ../../gcc/gcc/c-decl.c:7898 > #17 0x0831996f in toplev_main (argc=17, argv=0xbfced724) at > ../../gcc/gcc/toplev.c:1057 > #18 0x080da95f in main (argc=-1210635284, argv=0xb7d72c24) at > ../../gcc/gcc/main.c:35 Sorry, missed this info: The testcase is very simple: void main1(int *arr, int n, int a, int b) { int i; for (i = 0; i < n; i++) { int m = arr[i]; arr[i] = (m < a ? m-a : b); } } It fails while trying to delete a basic-block that is unnecessary after tree-if-conversion (on the dump command before the deletion). 2 comments: 1. It doesn't happen without the '-details' (-fdump-tree-all-details). 2. It fails only with -ftree-vectorize on (this is the only way to turn on the tree-if-conversion). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32821