https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71480
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- It most likely affects powerpc* too. Anyway, patch LGTM, preapproved for trunk with proper ChangeLog and if possible some reduced testcase (e.g. remove all headers, replace mkstemp/unlink/fstat functions with (differently named) noinline/noclone functions that just return/fill in what you need, without any fs access etc., and define your own struct stat (again, rename it).