This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: irix bootstrap failure (pehaps Target-dependent modes (1.5+2/3) slightly revised, committed?)
- From: Olivier Hainque <hainque at act-europe dot fr>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, hainque at act-europe dot fr
- Date: Wed, 15 Oct 2003 11:40:36 +0200
- Subject: Re: irix bootstrap failure (pehaps Target-dependent modes (1.5+2/3) slightly revised, committed?)
- References: <FAC87D7C874EAB46A847604DA4FD5A64DA179D@crtsmail.corp.riotinto.org> <87oewj153s.fsf@egil.codesourcery.com>
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++)
{