From 5dc3163d0e7d97c3b0c25c5a6161c5bb52a7fe16 Mon Sep 17 00:00:00 2001 From: Yury Gribov Date: Mon, 17 Jul 2017 14:58:00 +0000 Subject: [PATCH] tree-vrp.c (compare_assert_loc): Fix comparison function to return predictable results. 2017-07-17 Yury Gribov gcc/ * tree-vrp.c (compare_assert_loc): Fix comparison function to return predictable results. From-SVN: r250278 --- gcc/ChangeLog | 5 +++++ gcc/tree-vrp.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5e28c1acd43..e99f156e3b6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-07-17 Yury Gribov + + * tree-vrp.c (compare_assert_loc): Fix comparison function + to return predictable results. + 2017-07-17 Claudiu Zissulescu * config/arc/arc.md (adddi3): Remove support for mexpand-adddi diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 28205f19751..1f0b6880c45 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -6459,7 +6459,7 @@ compare_assert_loc (const void *pa, const void *pb) return (a->e != NULL ? a->e->src->index - b->e->src->index : a->bb->index - b->bb->index); - return ha - hb; + return ha > hb ? 1 : -1; } /* Process all the insertions registered for every name N_i registered -- 2.30.2