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]
Other format: [Raw text]

[cfg-branch] fix loop testsuite failure



Wed Mar 27 15:06:09 CET 2002  Jan Hubicka  <jh@suse.cz>
	* cfgloopanal.c (create_preheader): Avoid crash on last BB in function.
Index: cfgloopanal.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Attic/cfgloopanal.c,v
retrieving revision 1.1.2.6
diff -c -3 -p -r1.1.2.6 cfgloopanal.c
*** cfgloopanal.c	2002/03/18 20:44:12	1.1.2.6
--- cfgloopanal.c	2002/03/27 13:59:05
*************** create_preheader (loop, dom, flags)
*** 450,456 ****
  	return NULL;
      }
  
!   insn = PREV_INSN (first_insn_after_basic_block_note (loop->header));
    fallthru = split_block (loop->header, insn);
    dummy = fallthru->src;
    if (loop->latch == loop->header)
--- 450,460 ----
  	return NULL;
      }
  
!   insn = first_insn_after_basic_block_note (loop->header);
!   if (insn)
!     insn = PREV_INSN (insn);
!   else
!     insn = get_last_insn ();
    fallthru = split_block (loop->header, insn);
    dummy = fallthru->src;
    if (loop->latch == loop->header)


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