https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120359

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I should note I noticed this while "improving" match to handle:
`(convert)a == CST` where the convert is used more than once.

Note r7-3163-g973625a04b3d93 has:
        * g++.dg/warn/pr33738.C: XFAIL as optimization now happens in ccp.

This is not true, the optimization happened in EVRP but EVRP did not warn.

Note my change just exposed the failure started in GCC 6 even:
```
extern void link_error (void);

enum Alpha {
 ZERO = 0, ONE, TWO, THREE
};

int m1 = -1;
int GetM1() {
 return m1;
}

int main() {
 Alpha a3 = static_cast<Alpha>(GetM1());
 if (-1 == a3) {        // { dg-warning "always false due" "" { xfail *-*-* } }
*/
    link_error ();
 }
 return 0;
}
```

fails started in GCC 6.

Reply via email to