https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98896
--- Comment #4 from Stas Sergeev <stsp at users dot sourceforge.net> --- I can achieve similar results with this: --- void cont(void) asm("_cont"); asm volatile ( "push %0\n" "ret\n" "_cont:\n" ::"r"(cont)); --- But this doesn't work if the optimizer inlines the function, as you then get multiple definitions of "_cont".