loop.c does not compile

Zack Weinberg zack@wolery.cumb.org
Mon Jul 17 13:22:00 GMT 2000


On Mon, Jul 17, 2000 at 10:16:23PM +0200, Martin v. Loewis wrote:
> When compiling the current CVS, I get
> 
> /usr/src/egcs/gcc/loop.c: In function `check_dbra_loop':
> /usr/src/egcs/gcc/loop.c:7804: `loop_continue' undeclared (first use in this function)
> 
> I believe this was caused by 
> 
> 2000-07-17  Chandrakala Chavva   <cchavva@cygnus.com>
> 
> 	* loop.c (check_dbra_loop) : Return if more than one condition is 
> 	present to control the loop.

I've been meaning to try this patch, but people are flooding me with
cpp bugreports so I haven't got to do a bootstrap yet.  It does cause
loop.c to compile again.

zw

===================================================================
Index: loop.c
--- loop.c	2000/07/17 18:10:17	1.257
+++ loop.c	2000/07/17 20:20:59
@@ -7797,13 +7797,13 @@ check_dbra_loop (loop, insn_count)
 
   {
     /* If more than one condition is present to control the loop, then
-       do not procceed as this function does not know how to rewrite loop 
-       tests with more than one condition.  */
+       do not proceed, as this function does not know how to rewrite
+       loop tests with more than one condition.  */
 
     rtx jump1;
-    if ((jump1 = prev_nonnote_insn (jump)) != loop_continue)
-      if (GET_CODE (jump1) == JUMP_INSN))
-        return 0;
+    if ((jump1 = prev_nonnote_insn (jump)) != loop->cont
+	&& GET_CODE (jump1) == JUMP_INSN)
+      return 0;
   }
 
   /* Check all of the bivs to see if the compare uses one of them.


More information about the Gcc-bugs mailing list