https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115354
--- Comment #2 from Angus Gratton <gus at projectgus dot com> --- Thanks Richard, that's very helpful context (I don't quite have my head around SRA to be honest!) For non-LTO MicroPython builds (mostly C, no C++), building with -Os -fno-tree-sra has almost no impact (for GCC versions before this change), and undoes the code size increase for GCC versions after this change. For LTO MicroPython builds, -Os -fno-tree-sra consistently results in a big code size increase. (And there is also a code size increase when building with the GCC version after this change vs before.) I'll experiment with the function and see if I can find what is causing later optimisations to not shrink the code size back down.