diff options
author | Richard Sandiford <richard@codesourcery.com> | 2006-01-20 12:12:24 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2006-01-20 12:12:24 +0000 |
commit | 0174997a11503d665901689e11d2e88b5f27d552 (patch) | |
tree | c6941e9a720173d312f0a78a7d99f9ea725ce8ec /gcc/stmt.c | |
parent | c11fd0b2064f7a896ed5e958712092ff83232086 (diff) | |
download | gcc-0174997a11503d665901689e11d2e88b5f27d552.zip gcc-0174997a11503d665901689e11d2e88b5f27d552.tar.gz gcc-0174997a11503d665901689e11d2e88b5f27d552.tar.bz2 |
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
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |