https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117176
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2024-10-16
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Better reduced testcase without any undefined behavior in it:
```
struct ColorSpace {
int componentCt;
};
struct Psnr {
double psnr[3];
};
int f(struct Psnr psnr, struct ColorSpace colorSpace) {
int i, hitsTarget = 1;
for (i = 1; i < colorSpace.componentCt && hitsTarget; ++i)
hitsTarget = !(psnr.psnr[i] < 1);
return hitsTarget;
}
```
Either early out or boolean improvements (or combo of the 2).