[Bug tree-optimization/107833] wrong code at -Os and above on x86_64-linux-gnu since r12-5138-ge82c382971664d6f
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 23 14:17:49 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107833
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
> Isn't there an uninitialized read from "i" here?
Yes ...
> At least on the second
> time through the outer loop, if (a < h) is true since 1 < 0.
>
> > c = *f;
> > }
> > for (h = 0; h < 3; h++) {
> > if (d)
> > break;
>
> d is nonzero so h will always be 0 in this function.
... but as you correctly said, it's never executed as 'a < h' is always false.
>
> > i--;
> > printf("0");
> > }
> > }
> > return 0;
> > }
>
> Unless I'm missing something....
More information about the Gcc-bugs
mailing list