https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53806
--- Comment #9 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Drea Pinski from comment #8)
> Ok, things are getting odd here.
> Reading PR 53805 is getting me confused when we can remove traps and when we
> can't.
>
> Because it said this:
> ```
>
> int f(double a,double b){
> if(a>b) if(a<b) return 1;
> return 0;
> }
> ```
> Should still cause a trap but starting in GCC 13, it is back to optimizing
> to 0 at -O2 with evrp doing it.
Though it is not evrp that is causing the issue but rather is cleanupcfg.
Take:
```
int f(double a,double b){
if(a>b) if(0) return 1;
return 0;
}
```
If we go by the theory -ftrapping-math should not remove trapping instructions,
then the above should leave around the comparison still. But we don't. And has
not even before tree ssa.