OSDN Git Service

* unroll.c (precondition_loop_p): Fail if no iteration
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Jan 2001 11:15:49 +0000 (11:15 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Jan 2001 11:15:49 +0000 (11:15 +0000)
        variable found.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39064 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/unroll.c

index ff2e283..a4d8d79 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-16  Richard Henderson  <rth@redhat.com>
+
+       * unroll.c (precondition_loop_p): Fail if no iteration
+       variable found.
+
 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
 
        * gcc.c:  When -fsyntax-only is given, do not complain about
index 9289595..ec0a151 100644 (file)
@@ -1381,7 +1381,14 @@ precondition_loop_p (loop, initial_value, final_value, increment, mode)
       return 1;
     }
 
-  if (loop_info->initial_value == 0)
+  if (loop_info->iteration_var == 0)
+    {
+      if (loop_dump_stream)
+       fprintf (loop_dump_stream,
+                "Preconditioning: Could not find iteration variable.\n");
+      return 0;
+    }
+  else if (loop_info->initial_value == 0)
     {
       if (loop_dump_stream)
        fprintf (loop_dump_stream,