https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78685
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2016-12-06 CC| |jakub at gcc dot gnu.org, | |rguenth at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- I think it shows that the call-site-parameter stuff doesn't work across one indirection. In call_debugger we want count at the call site but that's only available at its call site it seems. For main() we're unlucky with the register allocation and as the original args are not spilled we're lost (and libc or the crtstuff doesn't have any call-site param stuff - not sure if that would help in this case). So yes, -Og does optimize. Confirmed (for the testcase).