Fix violation of self-assignment check in GCC source [2/4]

Submitted by Le-Chun Wu on July 22, 2010, 1:31 a.m.

Details

Message ID AANLkTi=E23zMuWvPcgqMV=SijW2vH_QGtMuxEZK6PB0g@mail.gmail.com
State New
Headers show

Commit Message

Le-Chun Wu July 22, 2010, 1:31 a.m.
This patch fix the warning triggered by self-assignment check in
gcc/tree-ssa-ccp.c. Bootstrapped and tested on x86_64-gnu-linux. OK
for trunk?

Thanks,

Le-chun

2010-07-21  Le-Chun Wu  <lcwu@google.com>

       * tree-ssa-ccp.c (ccp_lattice_meet): Remove a self-assign statement
       and an unnecessary assignment.

Comments

Richard Guenther July 22, 2010, 8:28 a.m.
On Thu, Jul 22, 2010 at 3:31 AM, Le-Chun Wu <lcwu@google.com> wrote:
> This patch fix the warning triggered by self-assignment check in
> gcc/tree-ssa-ccp.c. Bootstrapped and tested on x86_64-gnu-linux. OK
> for trunk?

Ok.

Thanks,
Richard.

> Thanks,
>
> Le-chun
>
> 2010-07-21  Le-Chun Wu  <lcwu@google.com>
>
>       * tree-ssa-ccp.c (ccp_lattice_meet): Remove a self-assign statement
>       and an unnecessary assignment.
>
>
>
> Index: gcc/tree-ssa-ccp.c
> ===================================================================
> --- gcc/tree-ssa-ccp.c  (revision 162385)
> +++ gcc/tree-ssa-ccp.c  (working copy)
> @@ -730,9 +730,8 @@ ccp_lattice_meet (prop_value_t *val1, pr
>         Ci M Cj = VARYING      if (i != j)
>
>          If these two values come from memory stores, make sure that
> -        they come from the same memory reference.  */
> -      val1->lattice_val = CONSTANT;
> -      val1->value = val1->value;
> +        they come from the same memory reference.
> +         Nothing to do.  VAL1 already contains the value we want.  */
>     }
>   else
>     {
>

Patch hide | download patch | download mbox

Index: gcc/tree-ssa-ccp.c
===================================================================
--- gcc/tree-ssa-ccp.c  (revision 162385)
+++ gcc/tree-ssa-ccp.c  (working copy)
@@ -730,9 +730,8 @@  ccp_lattice_meet (prop_value_t *val1, pr
         Ci M Cj = VARYING      if (i != j)

          If these two values come from memory stores, make sure that
-        they come from the same memory reference.  */
-      val1->lattice_val = CONSTANT;
-      val1->value = val1->value;
+        they come from the same memory reference.
+         Nothing to do.  VAL1 already contains the value we want.  */
     }
   else
     {