diff options
author | Alan Modra <amodra@bigpond.net.au> | 2001-11-26 00:46:40 +0000 |
---|---|---|
committer | Alan Modra <amodra@gcc.gnu.org> | 2001-11-26 11:16:40 +1030 |
commit | addd7df6048d7bc543fe975e31becbd7e11dfc49 (patch) | |
tree | d249d09b85bcb733e53e9bc475aa068ae0896a5c /gcc/final.c | |
parent | fa88ce26e5dd893a1cedc174a9aaf1006e2fa301 (diff) | |
download | gcc-addd7df6048d7bc543fe975e31becbd7e11dfc49.zip gcc-addd7df6048d7bc543fe975e31becbd7e11dfc49.tar.gz gcc-addd7df6048d7bc543fe975e31becbd7e11dfc49.tar.bz2 |
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
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/final.c b/gcc/final.c index 761bd71..c7ad5e6 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -603,7 +603,7 @@ dbr_sequence_length () /* Arrays for insn lengths, and addresses. The latter is referenced by `insn_current_length'. */ -static short *insn_lengths; +static int *insn_lengths; #ifdef HAVE_ATTR_length varray_type insn_addresses_; @@ -1186,7 +1186,7 @@ shorten_branches (first) #ifdef HAVE_ATTR_length /* 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; /* Syntax errors can lead to labels being outside of the main insn stream. Initialize insn_addresses, so that we get reproducible results. */ |