This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: irix bootstrap failure (pehaps Target-dependent modes (1.5+2/3) slightly revised, committed?)


Hello Zack,

Zack Weinberg wrote:
> Aaargh.  Please try the appended patch.
> 
> zw
> 
>         * genmodes.c (reset_float_format): Correct type of fourth argument.

 Still with genmodes, we've had an instance of spurious failure on some Linux
 systems, apparently caused by an off-by-one error in the sort-buffer
 allocation in calc_wider_mode. What about:


	* genmodes.c (calc_wider_mode): Allocate enough room for all the
	entries we'll possibly assign in the sort buffer.


*** genmodes.c.ori	Wed Oct 15 11:25:49 2003
--- genmodes.c	Wed Oct 15 11:26:13 2003
*************** calc_wider_mode (void)
*** 587,593 ****
    for (c = 0; c < MAX_MODE_CLASS; c++)
      max_n_modes = MAX (max_n_modes, n_modes[c]);
  
!   sortbuf = alloca (max_n_modes * sizeof (struct mode_data *));
  
    for (c = 0; c < MAX_MODE_CLASS; c++)
      {
--- 587,595 ----
    for (c = 0; c < MAX_MODE_CLASS; c++)
      max_n_modes = MAX (max_n_modes, n_modes[c]);
  
!   /* Allocate max_n_modes + 1 entries to leave room for the extra null
!      pointer assigned after the qsort call below.  */
!   sortbuf = alloca ((max_n_modes + 1) * sizeof (struct mode_data *));
  
    for (c = 0; c < MAX_MODE_CLASS; c++)
      {





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