https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96798
--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> --- Sorry about the failures. I attempted to reproduce this via building a cross-compiler with build==host==x86_64-pc-linux-gnu and --target=x86_64-apple-darwin19.6; I think this comes down to the tests in question using the system's <string.h>. What does the declaration of memset look like in your headers? (including attributes)