From: Alexander Monakov Date: Thu, 20 Jul 2017 15:13:56 +0000 (+0300) Subject: gimple-ssa-store-merging.c: fix sort_by_bitpos X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=109cca3b53eaf9883143a095ce277de26fc7da4f;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d489138e2c2..9eb61fe62de 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,8 @@ -2017-07-18 Jan Hubicka +2017-07-20 Alexander Monakov + + * gimple-ssa-store-merging.c (sort_by_bitpos): Return 0 on equal bitpos. + +2017-07-20 Jan Hubicka * 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 5e9227314b8..ea7dc846c43 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.