https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111165
--- Comment #9 from Thorsten Glaser <tg at mirbsd dot org> --- > Does providing your own (trivially correct) strlen implementation in a > separate CU also fix the issue? Even providing one that just calls dietlibc’s (in a separate CU) fixes the issue, so I’m very sure it’s not that, but probably some codegen surrounding the call.