https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94849
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I think it is undefined behavior and just doesn't crash because the pathname is passed to a syscall which will fail then. So IMHO nothing we should support.