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

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|steven at gcc dot gnu.org   |abel at gcc dot gnu.org

--- Comment #8 from Steven Bosscher <steven at gcc dot gnu.org> 2012-09-02 
15:14:58 UTC ---
(In reply to comment #7)
But actually the problem is only visible if you print non-slim rtl. Before
sched1:

(jump_insn 13 12 15 3 (parallel [
            (asm_operands/v ("") ("") 0 [
                    (reg:SI 62)
                    (reg:SI 63)
                ]   
                 [
                    (asm_input:SI ("r") (null):0)
                    (asm_input:SI ("r") (null):0)
                ] 
                 [
                    (label_ref:DI 17)
                ] t.c:11)
            (clobber (reg:QI 18 fpsr))
            (clobber (reg:QI 17 flags))
            (clobber (mem:BLK (scratch) [0 A8]))
        ]) t.c:3 -1
     (nil)      
 -> 17)
(note 15 13 17 ("lab") NOTE_INSN_DELETED_LABEL 3)
(code_label 17 15 18 4 1 "" [1 uses])
(note 18 17 0 4 [bb 4] NOTE_INSN_BASIC_BLOCK)

After sched1:

(jump_insn 13 12 15 3 (parallel [
            (asm_operands/v ("") ("") 0 [
                    (reg:SI 62)
                    (reg:SI 63) 
                ]
                 [   
                    (asm_input:SI ("r") (null):0)
                    (asm_input:SI ("r") (null):0)
                ]
                 [   
                    (label_ref:DI 17)     <--- ref to code_label 17
                ] t.c:11)
            (clobber (reg:QI 18 fpsr))
            (clobber (reg:QI 17 flags))
            (clobber (mem:BLK (scratch) [0 A8]))
        ]) t.c:3 -1
     (expr_list:REG_DEAD (reg:SI 63)
        (expr_list:REG_DEAD (reg:SI 62) 
            (expr_list:REG_UNUSED (reg:QI 18 fpsr)
                (expr_list:REG_UNUSED (reg:QI 17 flags)
                    (nil)))))
 -> 17)
(note 15 13 21 ("lab") NOTE_INSN_DELETED_LABEL 3)
...but code_label 17 has disappeared...
(note 21 15 0 NOTE_INSN_DELETED)

Note that the jump_insn now jumps to a non-existing label.

There are two problems here:

1. verify_flow_info should detect that a jump references a non-existing label,
and abort if that happens

2. The code_label 17 shouldn't be removed by the selective scheduler because
it's still referenced.

Reply via email to