https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85669
--- Comment #50 from Segher Boessenkool <segher at gcc dot gnu.org> --- The generic code rounded up the allocation size twice, and that isn't needed. The problem has been solved for other targets before; a patch for Darwin is at https://gcc.gnu.org/ml/gcc-testresults/2017-01/msg02971.html , patch 0001.