This is the mail archive of the gcc-patches@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]

ia64 if-convert crash


We would crash compiling bitmap.c at -O1 because the only
insn in the TEST block was the branch, and then fail to
update the block head/end pointers properly.


r~

        * flow.c (merge_blocks_nomove): Be more careful about
        locating the beginning of block A.

Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.321
diff -c -p -d -r1.321 flow.c
*** flow.c	2000/08/08 19:46:51	1.321
--- flow.c	2000/08/11 07:38:33
*************** merge_blocks_nomove (a, b)
*** 2211,2219 ****
      {
        rtx prev;
  
!       prev = prev_nonnote_insn (a_end);
!       if (!prev) 
! 	prev = a->head;
  
        del_first = a_end;
  
--- 2211,2219 ----
      {
        rtx prev;
  
!       for (prev = PREV_INSN (a_end); ; prev = PREV_INSN (prev))
! 	if (GET_CODE (prev) != NOTE || prev == a->head)
! 	  break;
  
        del_first = a_end;
  

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