This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix typo in tail merging (PR tree-optimization/65388)
- From: Marek Polacek <polacek at redhat dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 11 Mar 2015 14:32:18 +0100
- Subject: [PATCH] Fix typo in tail merging (PR tree-optimization/65388)
- Authentication-results: sourceware.org; auth=none
This patch fixes a pretty obvious typo: we couldn't possibly want to test
whether a variable equals itself. PR c/54979 is an RFE for a warning that
would detect such cases.
Bootstrapped/regtested on x86_64-linux, ok for active branches?
2015-03-11 Marek Polacek <polacek@redhat.com>
PR tree-optimization/65388
* tree-ssa-tail-merge.c (same_succ_def::equal): Fix typo in comparison.
--- gcc/tree-ssa-tail-merge.c
+++ gcc/tree-ssa-tail-merge.c
@@ -587,7 +587,7 @@ same_succ_def::equal (const value_type *e1, const compare_type *e2)
if (!inverse_flags (e1, e2))
{
for (i = 0; i < e1->succ_flags.length (); ++i)
- if (e1->succ_flags[i] != e1->succ_flags[i])
+ if (e1->succ_flags[i] != e2->succ_flags[i])
return 0;
}