This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]