Re: [PATCH] Fix typo in tail merging (PR tree-optimization/65388)
On March 11, 2015 2:32:18 PM CET, Marek Polacek pola...@redhat.com wrote: 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? Ok Thanks, Richard. 2015-03-11 Marek Polacek pola...@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; }
[PATCH] Fix typo in tail merging (PR tree-optimization/65388)
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 pola...@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; }