This code prints 80 at -O2/3 and 0 at -O0/1:
int printf(const char *, ...);
int a, b;
void c(char d) { a = d; }
int main() {
int e = 82, f = 20;
for (; 85 + 20 + e - 187 + f; f = 65535 + 20 + e - 65637)
if (b)
e++;
c(e >> 24);
printf("%X\n", a);
}
Compiler Explorer: https://godbolt.org/z/6WP1aT6ba
Bisected to 04cd069, which was committed by @preames