Assert failed in purge_dead_edges in cfgrtl.c
Mario Fanelli
mario.fanelli@gmail.com
Fri Apr 18 09:28:00 GMT 2008
Hi,
I have some problems with an assert in purge_dead_edges in
cfgrtl.c:2319. I use gcc version 4.2.2. and I add a new function to
the callgraph with cgraph_add_new_function.
My new function body is obtained by current_function body using
move_sese_region_to_fn and all seems go well but when the new function
is processed to obtain rtl, I have an assertion failed.
So, this is the cfg dump that I obtain in my pass for the new function
and I'm not be able to find the error.
Basic block 2 (new, reachable)
Predecessors: ENTRY [100.0%] (fallthru,exec)
Successors: 3 [100.0%] (fallthru,exec)
Basic block 3 (new, reachable)
Predecessors: 8 [100.0%] (fallthru) 2 [100.0%] (fallthru,exec)
Successors: 4 [100.0%] (fallthru,exec)
Basic block 4 (new, reachable)
Predecessors: 3 [100.0%] (fallthru,exec) 7 [100.0%] (fallthru)
Successors: 7 [89.0%] (dfs_back,true,exec) 5 [11.0%] (loop_exit,false,exec)
Basic block 7 (new)
Predecessors: 4 [89.0%] (dfs_back,true,exec)
Successors: 4 [100.0%] (fallthru)
Basic block 5 (new, reachable)
Predecessors: 4 [11.0%] (loop_exit,false,exec)
Successors: 8 [89.0%] (dfs_back,true,exec) 6 [11.0%] (loop_exit,false,exec)
Basic block 8 (new)
Predecessors: 5 [89.0%] (dfs_back,true,exec)
Successors: 3 [100.0%] (fallthru)
Basic block 6 (new, reachable)
Predecessors: 5 [11.0%] (loop_exit,false,exec)
Successors: EXIT [100.0%]
The dump of wrong basic block is ( unfortunately it doesn't have a successor )
;; basic block 6, loop depth 0, count 0
;; prev block 5, next block 8
;; pred: 5 [11.0%] (fallthru,loop_exit)
;; succ:
;; Registers live at start: (nil)
(code_label 66 65 67 6 8 "" [0 uses])
(note 67 66 68 6 [bb 6] NOTE_INSN_BASIC_BLOCK)
;; Registers live at end: (nil)
What am I doing wrong?
Regards,
Mario Fanelli
More information about the Gcc
mailing list