https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117033
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Davide Italiano from comment #6) > I noticed you linked the LLVM bug I found. > As part of my search/analysis, I found out there are cases that sometimes > clang gets but GCC doesn't (unsurprisingly, FWIW). > > Here's a simple one. > https://godbolt.org/z/fjjzf9xds here is a slightly modified example which shows the opposite way, GCC figures it at -Os but LLVM does not: ``` long patatino() { long x = 0; for (int i = 0; i < 5; ++i) { if (x < 10) while (x < 10) { x += 1; } } return x; } ```