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]

flow.c patch



This patch fixes many gcj segfaults in the libgcj testsuite.  The
`for' loop is set up to iterate forwards through insns but it was
actually stepping backwards.  This patch also includes a couple of
minor clean-ups.

Ok to check in?

-- 
Anthony Green                                               Cygnus Solutions
                                                       Sunnyvale, California

Sat Oct  2 10:54:13 1999  Anthony Green  <green@cygnus.com>

        * flow.c (make_edges): Fix insn iteration.
        (find_basic_blocks): Assign NULL_RTX, not 0, to rtx.
        (find_basic_blocks_1): Fix spelling mistake.

Index: flow.c
===================================================================
RCS file: /cvs/egcs/egcs/gcc/flow.c,v
retrieving revision 1.161
diff -u -r1.161 flow.c
--- flow.c	1999/09/23 15:07:25	1.161
+++ flow.c	1999/10/03 08:54:48
@@ -435,7 +435,7 @@
   calculate_loop_depth (f);
 
   /* Kill the data we won't maintain.  */
-  label_value_list = 0;
+  label_value_list = NULL_RTX;
 
 #ifdef ENABLE_CHECKING
   verify_flow_info ();
@@ -633,7 +633,7 @@
 	  else
 	    {
 	      /* ??? Make a special check for table jumps.  The way this 
-		 happens is truely and amazingly gross.  We are about to
+		 happens is truly and amazingly gross.  We are about to
 		 create a basic block that contains just a code label and
 		 an addr*vec jump insn.  Worse, an addr_diff_vec creates
 		 its own natural loop.
@@ -985,7 +985,7 @@
 	      if (bb->eh_beg >= 0)
 		make_eh_edge (eh_nest_info, bb, NULL_RTX, bb->eh_beg);
 
-	      for (x = bb->head; x != bb->end; x = PREV_INSN (x))
+	      for (x = bb->head; x != bb->end; x = NEXT_INSN (x))
 		if (GET_CODE (x) == NOTE
 		    && (NOTE_LINE_NUMBER (x) == NOTE_INSN_EH_REGION_BEG
 		        || NOTE_LINE_NUMBER (x) == NOTE_INSN_EH_REGION_END))


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