https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82402
--- Comment #3 from Bernd Edlinger <edlinger at gcc dot gnu.org> --- The leaf attribute seems to make a difference, before my patch the compiler assumed returns_twice + leaf, but that may be unsafe for free standing environment. the crash goes away if the header file adds leaf attribute. I asked glibc-people to add that to their header file, but nothing happened so far.