[Bug c/80852] Optimisation fails to recognise sum computed by loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80852 krister.walfridsson at gmail dot com changed: What|Removed |Added CC||krister.walfridsson
[Bug c/80852] Optimisation fails to recognise sum computed by loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80852 --- Comment #2 from Raphael C --- You are quite right. This code shows the same issue: int foo(int num) { int a = 0; for (int x = 0; x < num; x+=2) { a += x; } return a; }