https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111577
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I suspect you forgot to count the other functions which get emitted here. And you are just counting the size of main but that is wrong really. Anyways the overall size of the executable's text section is smaller at -Os which is the point.