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]

Bad patch to loop.c


You checked into this patch into CVS. But loop_continue is not defined
anywhere. I got:

egcs-1.1.2-redhat -c  -DIN_GCC    -g  -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -pipe -mcpu=pentiumpro -march=pentiumpro   -DHAVE_CONFIG_H    -I.  -I/work/gnu/src/gcc-3.0/egcs/gcc -I/work/gnu/src/gcc-3.0/egcs/gcc/config
-I/work/gnu/src/gcc-3.0/egcs/gcc/../include
/work/gnu/src/gcc-3.0/egcs/gcc/combine.c
/work/gnu/src/gcc-3.0/egcs/gcc/loop.c: In function `check_dbra_loop':
/work/gnu/src/gcc-3.0/egcs/gcc/loop.c:7804: `loop_continue' undeclared (first use in this function)
/work/gnu/src/gcc-3.0/egcs/gcc/loop.c:7804: (Each undeclared identifier is reported only once
/work/gnu/src/gcc-3.0/egcs/gcc/loop.c:7804: for each function it appears in.)
/work/gnu/src/gcc-3.0/egcs/gcc/loop.c:7805: parse error before `)'

Did I miss something?


H.J.
----
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.


Index: loop.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/loop.c,v
retrieving revision 1.256
retrieving revision 1.257
diff -u -p -r1.256 -r1.257
--- loop.c	2000/06/14 07:41:57	1.256
+++ loop.c	2000/07/17 18:10:17	1.257
@@ -7795,6 +7795,17 @@ check_dbra_loop (loop, insn_count)
   else
     return 0;
 
+  {
+    /* 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.  */
+
+    rtx jump1;
+    if ((jump1 = prev_nonnote_insn (jump)) != loop_continue)
+      if (GET_CODE (jump1) == JUMP_INSN))
+        return 0;
+  }
+
   /* Check all of the bivs to see if the compare uses one of them.
      Skip biv's set more than once because we can't guarantee that
      it will be zero on the last iteration.  Also skip if the biv is

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