[EGCS 2.96, 2000/01/17 snapshot] Internal compiler error in loop_iterations

Clinton Popetz cpopetz@cygnus.com
Tue Jan 18 09:50:00 GMT 2000


Marco Goetze <gomar@mindless.com> writes:

> --huq684BweRXVnRxX
> Content-Type: text/plain; charset=us-ascii
> 
> Compiling part of Mutt 1.1.2i via
> 
>   gcc -c -O2 query.c
> 
> results in:
> 
>   query.c: In function `query_menu':
>   query.c:466: Internal compiler error in `loop_iterations', at unroll.c:3709
>   Please submit a full bug report.

This seems to be lossage due to Michael's loop cleanup, which had this
(a cvs diff, as the original patch didn't have this change):

*************** loop_iterations (loop_start, loop_end, l
*** 3704,3713 ****
      }

!   /* This can happen due to optimization in load_mems.  */
    if ((unsigned) REGNO (iteration_var) >= reg_iv_type->num_elements)
!     return 0;

    iteration_info (iteration_var, &initial_value, &increment,
!                 loop_start, loop_end);
    if (initial_value == 0)
      /* iteration_info already printed a message.  */
--- 3703,3714 ----
      }

!   /* The only new registers that care created before loop iterations are
!      givs made from biv increments, so this should never occur.  */
! 
    if ((unsigned) REGNO (iteration_var) >= reg_iv_type->num_elements)
!     abort ();
 
    iteration_info (iteration_var, &initial_value, &increment,
!                 loop->start, loop->end);
    if (initial_value == 0)
      /* iteration_info already printed a message.  */


which (accidently, I believe) reverts Bernd's patch from 1999-11-29.
Re-applying this patch fixes things.  Ok?


2000-01-18  Clinton Popetz  <cpopetz@cygnus.com>

	* unroll.c (loop_iterations): Don't abort if iteration variable
	was made by loop. [Reapply lost patch from 1999-11-29.]

Index: unroll.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/unroll.c,v
retrieving revision 1.87
diff -c -2 -p -r1.87 unroll.c
*** unroll.c	2000/01/17 15:55:18	1.87
--- unroll.c	2000/01/18 17:24:24
*************** loop_iterations (loop)
*** 3703,3711 ****
      }
  
!   /* The only new registers that care created before loop iterations are
!      givs made from biv increments, so this should never occur.  */
! 
    if ((unsigned) REGNO (iteration_var) >= reg_iv_type->num_elements)
!     abort ();
  
    iteration_info (iteration_var, &initial_value, &increment,
--- 3703,3709 ----
      }
  
!   /* This can happen due to optimization in load_mems.  */
    if ((unsigned) REGNO (iteration_var) >= reg_iv_type->num_elements)
!     return 0;
  
    iteration_info (iteration_var, &initial_value, &increment,


More information about the Gcc-patches mailing list