diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ff2e283c057..a4d8d7958d1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-01-16 Richard Henderson + + * unroll.c (precondition_loop_p): Fail if no iteration + variable found. + 2001-01-16 Phil Edwards * gcc.c: When -fsyntax-only is given, do not complain about diff --git a/gcc/unroll.c b/gcc/unroll.c index 9289595d039..ec0a151f3eb 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -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,