This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix a typo in range_entry_cmp (PR tree-optimization/61686)
- From: Marek Polacek <polacek at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 10 Dec 2014 07:57:46 +0100
- Subject: [PATCH] Fix a typo in range_entry_cmp (PR tree-optimization/61686)
- Authentication-results: sourceware.org; auth=none
I don't really know this code, but this typo looks obvious enough.
Using if (p->high != NULL_TREE) ... else if (p->high != NULL_TREE)
couldn't be possibly desired, so use Q in the else branch, as in
the code slightly above.
Bootstrapped/regtested on x86_64-linux and ppc64-linux, ok for trunk?
2014-12-10 Marek Polacek <polacek@redhat.com>
PR tree-optimization/61686
* tree-ssa-reassoc.c (range_entry_cmp): Use q->high instead of
p->high.
diff --git gcc/tree-ssa-reassoc.c gcc/tree-ssa-reassoc.c
index 68a67b6..00bca8b 100644
--- gcc/tree-ssa-reassoc.c
+++ gcc/tree-ssa-reassoc.c
@@ -2069,7 +2069,7 @@ range_entry_cmp (const void *a, const void *b)
else
return -1;
}
- else if (p->high != NULL_TREE)
+ else if (q->high != NULL_TREE)
return 1;
/* If both ranges are the same, sort below by ascending idx. */
}
Marek