https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109267
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2023-03-23 Status|UNCONFIRMED |WAITING --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The only time you get an empty function is for: void f(){__builtin_unreachable();} Which does produce: _Z1fv: .LFB0: .file 1 "/app/example.cpp" .loc 1 1 9 view -0 .cfi_startproc .loc 1 1 10 view .LVU1 .cfi_endproc clang even produces a similar thing for that too: _Z1fv: # @_Z1fv .Lfunc_begin0: .cfi_startproc # %bb.0: .Lfunc_end0: .size _Z1fv, .Lfunc_end0-_Z1fv .cfi_endproc Can you attach the preprocessed source for the lib.cpp?