diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2001-08-17 01:27:49 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2001-08-17 01:27:49 +0000 |
commit | d9b6874b0c8f24e6adb785121381c24f87c726c4 (patch) | |
tree | d06379f9caf82cb62fa1d7889ebb1309f38e52b8 /gcc/final.c | |
parent | 4266d0b2722db521925be85f61ca1fa643afe409 (diff) | |
download | gcc-d9b6874b0c8f24e6adb785121381c24f87c726c4.zip gcc-d9b6874b0c8f24e6adb785121381c24f87c726c4.tar.gz gcc-d9b6874b0c8f24e6adb785121381c24f87c726c4.tar.bz2 |
final.c (shorten_branches): Clear the end of the label_align array only if we made it larger.
* final.c (shorten_branches): Clear the end of the label_align
array only if we made it larger. Break up messy expressions
for clarity.
* diagnostic.c (internal_error): Check for error recursion
before doing ICE suppression.
* timevar.c: Timing variables now count in milliseconds.
(init_timevar): Set up ticks_to_msec and clocks_to_msec here.
(get_time): Not here.
(timevar_print): Don't print any timer whose user, cpu, and
wall times are all zero as displayed.
* timevar.h: Update comment aboout units. Make timevar
counters unsigned.
From-SVN: r44948
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gcc/final.c b/gcc/final.c index ad92291..821a814 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -1062,12 +1062,20 @@ shorten_branches (first) if (max_labelno != max_label_num ()) { int old = max_labelno; + int n_labels; + int n_old_labels; + max_labelno = max_label_num (); + + n_labels = max_labelno - min_labelno + 1; + n_old_labels = old - min_labelno + 1; + label_align = (struct label_alignment *) xrealloc - (label_align, - (max_labelno - min_labelno + 1) * sizeof (struct label_alignment)); - memset (label_align + old + 1 - min_labelno, 0, - sizeof (struct label_alignment) * (max_labelno - old)); + (label_align, n_labels * sizeof (struct label_alignment)); + + if (n_old_labels < n_labels) + memset (label_align + n_old_labels, 0, + (n_labels - n_old_labels) * sizeof (struct label_alignment)); } /* Initialize label_align and set up uid_shuid to be strictly |