diff options
author | Alexander Monakov <amonakov@gcc.gnu.org> | 2017-07-20 18:13:56 +0300 |
---|---|---|
committer | Alexander Monakov <amonakov@gcc.gnu.org> | 2017-07-20 18:13:56 +0300 |
commit | 109cca3b53eaf9883143a095ce277de26fc7da4f (patch) | |
tree | e7bbf7746a189d7185c82f3faebc0285206c34f5 /gcc | |
parent | 584bafb66df106ddbc5ef6749462ca2375fa0086 (diff) | |
download | gcc-109cca3b53eaf9883143a095ce277de26fc7da4f.zip gcc-109cca3b53eaf9883143a095ce277de26fc7da4f.tar.gz gcc-109cca3b53eaf9883143a095ce277de26fc7da4f.tar.bz2 |
gimple-ssa-store-merging.c: fix sort_by_bitpos
* gimple-ssa-store-merging.c (sort_by_bitpos): Return 0 on equal bitpos.
From-SVN: r250394
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/gimple-ssa-store-merging.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d489138..9eb61fe 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,8 @@ -2017-07-18 Jan Hubicka <hubicka@ucw.cz> +2017-07-20 Alexander Monakov <amonakov@ispras.ru> + + * gimple-ssa-store-merging.c (sort_by_bitpos): Return 0 on equal bitpos. + +2017-07-20 Jan Hubicka <hubicka@ucw.cz> * bb-reorder.c (connect_traces): Allow copying of blocks within single partition. diff --git a/gcc/gimple-ssa-store-merging.c b/gcc/gimple-ssa-store-merging.c index 5e92273..ea7dc84 100644 --- a/gcc/gimple-ssa-store-merging.c +++ b/gcc/gimple-ssa-store-merging.c @@ -516,12 +516,12 @@ sort_by_bitpos (const void *x, const void *y) store_immediate_info *const *tmp = (store_immediate_info * const *) x; store_immediate_info *const *tmp2 = (store_immediate_info * const *) y; - if ((*tmp)->bitpos <= (*tmp2)->bitpos) + if ((*tmp)->bitpos < (*tmp2)->bitpos) return -1; else if ((*tmp)->bitpos > (*tmp2)->bitpos) return 1; - - gcc_unreachable (); + else + return 0; } /* Sorting function for store_immediate_info objects. |