diff mbox

Fix typo in tail merging (PR tree-optimization/65388)

Message ID 20150311133218.GP26802@redhat.com
State New
Headers show

Commit Message

Marek Polacek March 11, 2015, 1:32 p.m. UTC
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.

Comments

Richard Biener March 11, 2015, 7:20 p.m. UTC | #1
On March 11, 2015 2:32:18 PM CET, Marek Polacek <polacek@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  <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;
>     }
>
diff mbox

Patch

--- 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;
     }