aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/gimple-ssa-store-merging.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ef793e4..0e0257d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2017-09-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gimple-ssa-store-merging.c (sort_by_bitpos): Compare store order
+ when bitposition is the same.
+
2017-09-13 Richard Biener <rguenther@suse.de>
* dwarf2out.c (output_die_symbol): Remove.
diff --git a/gcc/gimple-ssa-store-merging.c b/gcc/gimple-ssa-store-merging.c
index a4a38b1..cb76403 100644
--- a/gcc/gimple-ssa-store-merging.c
+++ b/gcc/gimple-ssa-store-merging.c
@@ -521,7 +521,9 @@ sort_by_bitpos (const void *x, const void *y)
else if ((*tmp)->bitpos > (*tmp2)->bitpos)
return 1;
else
- return 0;
+ /* If they are the same let's use the order which is guaranteed to
+ be different. */
+ return (*tmp)->order - (*tmp2)->order;
}
/* Sorting function for store_immediate_info objects.