https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126637
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |needs-bisection, wrong-code
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2026-08-04
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Testcase w/o -fwhole-program, fails with -O2, works with -O2 -fno-tree-vrp:
static double *a;
static void b(int c) {
int d = 1;
double e = 1.0;
a = &e;
while (1) {
if (!(e ? e : 4.0 < -c))
break;
e = d - 1;
*a = -e;
d = 2;
}
}
int main() { b(0); }