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

login
register
mail settings
Submitter Le-Chun Wu
Date July 22, 2010, 1:28 a.m.
Message ID <AANLkTikjsh2cGeDdWUnrRjQje1_B1bWzG3wWG=1Czqik@mail.gmail.com>
Download mbox | patch
Permalink /patch/59537/
State New
Headers show

Comments

Le-Chun Wu - July 22, 2010, 1:28 a.m.
This patch fix the warning triggered by self-assignment check in
gcc/omega.c. (I only commented it out instead of removing it just in
case if the self-assignment has some meaning in the omega test.)

Bootstrapped and tested on x86_64-gnu-linux. OK for trunk?

Thanks,

Le-chun

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

       * omega.c (omega_eliminate_redundant): Remove a self-assign statement.
Diego Novillo - July 22, 2010, 12:49 p.m.
On 10-07-21 21:28 , Le-Chun Wu wrote:

> Index: gcc/omega.c
> ===================================================================
> --- gcc/omega.c (revision 162385)
> +++ gcc/omega.c (working copy)
> @@ -2213,7 +2213,9 @@ omega_eliminate_redundant (omega_pb pb,
>                            || pb->geqs[e3].color == omega_red)
>                          goto nextE3;
>
> -                     alpha3 = alpha3;
> +                      /* Comment out dubiout self-assignment.  */
> +                     /* alpha3 = alpha3;  */
> +
>                        /* verify alpha1*v1+alpha2*v2 = alpha3*v3 */
>                        for (k = pb->num_vars; k>= 1; k--)
>                          if (alpha3 * pb->geqs[e3].coef[k]

Let's just remove it.  OK with that change.


Diego.
Le-Chun Wu - July 22, 2010, 9:16 p.m.
On Thu, Jul 22, 2010 at 5:49 AM, Diego Novillo <dnovillo@google.com> wrote:
> On 10-07-21 21:28 , Le-Chun Wu wrote:
>
>> Index: gcc/omega.c
>> ===================================================================
>> --- gcc/omega.c (revision 162385)
>> +++ gcc/omega.c (working copy)
>> @@ -2213,7 +2213,9 @@ omega_eliminate_redundant (omega_pb pb,
>>                           || pb->geqs[e3].color == omega_red)
>>                         goto nextE3;
>>
>> -                     alpha3 = alpha3;
>> +                      /* Comment out dubiout self-assignment.  */
>> +                     /* alpha3 = alpha3;  */
>> +
>>                       /* verify alpha1*v1+alpha2*v2 = alpha3*v3 */
>>                       for (k = pb->num_vars; k>= 1; k--)
>>                         if (alpha3 * pb->geqs[e3].coef[k]
>
> Let's just remove it.  OK with that change.

Will do. Thanks,

Le-chun

>
>
> Diego.
>

Patch

Index: gcc/omega.c
===================================================================
--- gcc/omega.c (revision 162385)
+++ gcc/omega.c (working copy)
@@ -2213,7 +2213,9 @@  omega_eliminate_redundant (omega_pb pb,
                          || pb->geqs[e3].color == omega_red)
                        goto nextE3;

-                     alpha3 = alpha3;
+                      /* Comment out dubiout self-assignment.  */
+                     /* alpha3 = alpha3;  */
+
                      /* verify alpha1*v1+alpha2*v2 = alpha3*v3 */
                      for (k = pb->num_vars; k >= 1; k--)
                        if (alpha3 * pb->geqs[e3].coef[k]