https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117128
Bug ID: 117128
Summary: [15 regression] GCC trunk generates larger code than
GCC 14 at -Os/OZ
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: dccitaliano at gmail dot com
Target Milestone: ---
int f(int a) {
int result = 0;
for (int i = 0; i < a && (i % 2 == 0 || a > 10); i++) {
result += i * (a - i);
for (int j = i; j < a / 2 && (j % 3 != 0 || i < 5); j++) {
result -= j * (i + j);
}
}
return result;
}
Godbolt: https://godbolt.org/z/qWKWWYb99