Commit addd7df6 by Alan Modra Committed by Alan Modra

final.c: (insn_lengths): Make it an int *, so that large jump tables don't overflow.

	* final.c: (insn_lengths): Make it an int *, so that large jump
	tables don't overflow.

From-SVN: r47331
parent fa88ce26
2001-11-26 Alan Modra <amodra@bigpond.net.au>
* final.c: (insn_lengths): Make it an int *, so that large jump
tables don't overflow.
2001-11-25 Joseph S. Myers <jsm28@cam.ac.uk> 2001-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
* c-format.c (FMT_FLAG_DOLLAR_GAP_POINTER_OK): New. * c-format.c (FMT_FLAG_DOLLAR_GAP_POINTER_OK): New.
......
...@@ -603,7 +603,7 @@ dbr_sequence_length () ...@@ -603,7 +603,7 @@ dbr_sequence_length ()
/* Arrays for insn lengths, and addresses. The latter is referenced by /* Arrays for insn lengths, and addresses. The latter is referenced by
`insn_current_length'. */ `insn_current_length'. */
static short *insn_lengths; static int *insn_lengths;
#ifdef HAVE_ATTR_length #ifdef HAVE_ATTR_length
varray_type insn_addresses_; varray_type insn_addresses_;
...@@ -1186,7 +1186,7 @@ shorten_branches (first) ...@@ -1186,7 +1186,7 @@ shorten_branches (first)
#ifdef HAVE_ATTR_length #ifdef HAVE_ATTR_length
/* Allocate the rest of the arrays. */ /* Allocate the rest of the arrays. */
insn_lengths = (short *) xmalloc (max_uid * sizeof (short)); insn_lengths = (int *) xmalloc (max_uid * sizeof (*insn_lengths));
insn_lengths_max_uid = max_uid; insn_lengths_max_uid = max_uid;
/* Syntax errors can lead to labels being outside of the main insn stream. /* Syntax errors can lead to labels being outside of the main insn stream.
Initialize insn_addresses, so that we get reproducible results. */ Initialize insn_addresses, so that we get reproducible results. */
......
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