public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix typo in tail merging (PR tree-optimization/65388)
@ 2015-03-11 13:32 Marek Polacek
  2015-03-11 19:20 ` Richard Biener
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Polacek @ 2015-03-11 13:32 UTC (permalink / raw)
  To: GCC Patches

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix typo in tail merging (PR tree-optimization/65388)
  2015-03-11 13:32 [PATCH] Fix typo in tail merging (PR tree-optimization/65388) Marek Polacek
@ 2015-03-11 19:20 ` Richard Biener
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2015-03-11 19:20 UTC (permalink / raw)
  To: Marek Polacek, GCC Patches

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-11 19:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-11 13:32 [PATCH] Fix typo in tail merging (PR tree-optimization/65388) Marek Polacek
2015-03-11 19:20 ` Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).