This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/11640] [3.4 Regression]: bootstrap ICE in rtl_verify_flow_info, at cfgrtl.c:2151


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


zlomek at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2003-09-08 15:59:16         |2003-09-09 12:35:17
               date|                            |


------- Additional Comments From zlomek at gcc dot gnu dot org  2003-09-09 12:35 -------
The bug occurs on 3.3 branch with checking enabled too.

I was analyzing the bug, the problem is that when try_redirect_by_replacing_jump 
changes the tablejump to a simple jump the label is not completelly deleted
because it is still used in code. When merging blocks the return is copied to
place where the tablejump was, the barrier is not directly after the (return)
jump and it causes the ICE. I hope this description helps to fix the bug (by
someone else).

(insn 110 69 49 2 (set (reg:DI 66 ctr [136])
        (reg:DI 0 r0)) 326 {*movdi_internal64} (insn_list 69 (nil))
    (expr_list:REG_DEAD (reg:DI 0 r0)
        (nil)))

(note 49 110 53 2 ("/suse/zlomekj/a.c") 18)

(insn 53 49 112 2 /suse/zlomekj/a.c:18 (set (reg:DI 3 r3 [orig:118 <result> ] [118])
        (const_int 8 [0x8])) 326 {*movdi_internal64} (nil)
    (nil))

(jump_insn 112 53 132 2 (return) -1 (nil)
    (nil))

(note/s 71 132 73 "" NOTE_INSN_DELETED_LABEL 10)

(barrier 73 71 17)

(note 17 73 25 13 ("/suse/zlomekj/a.c") 10)


Although the following patch fixes the testcase it does NOT bootstrap.

Index: cfgrtl.c
===================================================================
RCS file: /cvs/gcc-cvs/gcc/gcc/cfgrtl.c,v
retrieving revision 1.97
diff -c -3 -p -r1.97 cfgrtl.c
*** cfgrtl.c    22 Aug 2003 06:45:12 -0000      1.97
--- cfgrtl.c    9 Sep 2003 05:56:33 -0000
*************** try_redirect_by_replacing_jump (edge e, 
*** 790,796 ****
        if (tablejump_p (insn, &label, &table))
        delete_insn_chain (label, table);

!       barrier = next_nonnote_insn (src->end);
        if (!barrier || GET_CODE (barrier) != BARRIER)
        emit_barrier_after (src->end);
      }
--- 790,796 ----
        if (tablejump_p (insn, &label, &table))
        delete_insn_chain (label, table);

!       barrier = NEXT_INSN (src->end);
        if (!barrier || GET_CODE (barrier) != BARRIER)
        emit_barrier_after (src->end);
      }


It causes the barrier to be emmitted but leaves the other one there:


(insn 53 49 112 2 /suse/zlomekj/a.c:18 (set (reg:DI 3 r3 [orig:118 <result> ] [118])
        (const_int 8 [0x8])) 326 {*movdi_internal64} (nil)
    (nil))

(jump_insn 112 53 132 2 (return) -1 (nil)
    (nil))

(barrier 132 112 71)

(note/s 71 132 73 "" NOTE_INSN_DELETED_LABEL 10)

(barrier 73 71 17)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]