Commit 0f229b22 by Olivier Hainque Committed by Olivier Hainque

genmodes.c (calc_wider_mode): Allocate enough room for all the entries we'll…

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

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

From-SVN: r72531
parent 8bf06993
2003-10-15 Olivier Hainque <hainque@act-europe.fr>
* genmodes.c (calc_wider_mode): Allocate enough room for all the
entries we'll possibly assign in the sort buffer.
2003-10-15 Ulrich Weigand <uweigand@de.ibm.com>
* config.gcc (s390x-ibm-tpf*): New target.
......
......@@ -587,7 +587,9 @@ calc_wider_mode (void)
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 *));
/* 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++)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment