stmt.c (case_bit_test_cmp): Stabilize the sort using code label numbers.

* stmt.c (case_bit_test_cmp): Stabilize the sort using code
	label numbers.

From-SVN: r110021
This commit is contained in:
Richard Sandiford 2006-01-20 12:12:24 +00:00 committed by Richard Sandiford
parent c11fd0b206
commit 0174997a11
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2006-01-20 Richard Sandiford <richard@codesourcery.com>
* stmt.c (case_bit_test_cmp): Stabilize the sort using code
label numbers.
2006-01-20 Richard Guenther <rguenther@suse.de>
Steven Bosscher <stevenb.gcc@gmail.com>

View File

@ -2170,7 +2170,11 @@ case_bit_test_cmp (const void *p1, const void *p2)
const struct case_bit_test *d1 = p1;
const struct case_bit_test *d2 = p2;
return d2->bits - d1->bits;
if (d2->bits != d1->bits)
return d2->bits - d1->bits;
/* Stabilize the sort. */
return CODE_LABEL_NUMBER (d2->label) - CODE_LABEL_NUMBER (d1->label);
}
/* Expand a switch statement by a short sequence of bit-wise