------- Comment #8 from steven at gcc dot gnu dot org 2006-08-02 21:10 ------- Happens when we are in find_if_case_1, where we call:
delete_basic_block (then_bb); The basic block we try to remove is this one: ;; basic block 5, loop depth 1, count 0 ;; prev block 9, next block 6 ;; pred: ;; succ: 6 [100.0%] ;; Registers live at start: 12 [r12] 32 [r34] 33 [r35] 34 [r36] 35 [r37] 36 [r38] 37 [r39] 38 [r40] 112 [r32] 113 [r33] 272 [p16] 273 [p17] (note 129 214 47 5 [bb 5] NOTE_INSN_BASIC_BLOCK) (jump_insn 47 129 48 5 (parallel [ (set (pc) (reg:DI 326 b6)) (use (label_ref 48)) ]) 331 {*tablejump_internal} (nil) (expr_list:REG_DEAD (reg:DI 326 b6) (nil))) ;; Registers live at end: 12 [r12] 32 [r34] 33 [r35] 34 [r36] 35 [r37] 36 [r38] 37 [r39] 38 [r40] 112 [r32] 113 [r33] 272 [p16] 273 [p17] $72 = void But the jump table follows right after this block: ;; Start of basic block 5, registers live: 12 [r12] 32 [r34] 33 [r35] 34 [r36] 35 [r37] 36 [r38] 37 [r39] 38 [r40] 112 [r32] 113 [r33] 272 [p16] 273 [p17] (note 129 214 47 5 [bb 5] NOTE_INSN_BASIC_BLOCK) (jump_insn 47 129 48 5 (parallel [ (set (pc) (reg:DI 326 b6)) (use (label_ref 48)) ]) 331 {*tablejump_internal} (nil) (expr_list:REG_DEAD (reg:DI 326 b6) (nil))) ;; End of basic block 5, registers live: 12 [r12] 32 [r34] 33 [r35] 34 [r36] 35 [r37] 36 [r38] 37 [r39] 38 [r40] 112 [r32] 113 [r33] 272 [p16] 273 [p17] ;; Insn is not within a basic block (code_label 48 47 49 11 "" [3 uses]) ;; Insn is not within a basic block (jump_insn 49 48 50 (addr_diff_vec:DI (label_ref:DI 48) [ (label_ref:DI 103) (label_ref:DI 103) (label_ref:DI 103) (label_ref:DI 103) (label_ref:DI 103) ] (const_int 0 [0x0]) (const_int 0 [0x0])) -1 (nil) (nil)) (barrier 50 49 103) And rtl_delete_block (the cfgrtl hook for delete_basic_block) says: /* Include any jump table following the basic block. */ end = BB_END (b); if (tablejump_p (end, NULL, &tmp)) end = tmp; So there we lose. Part of the problem is (should I say now "as always"?) missing REG_LABEL notes: (insn 185 35 186 3 (set (reg/f:DI 14 r14 [386]) (plus:DI (high:DI (label_ref:DI 48)) (reg:DI 1 r1))) 76 {*load_symptr_high} (nil) (nil)) But even with a REG_LABEL note, this label is going to disappear AFAICT because can_delete_label_p will return true for it. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28574 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]