https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117047
--- Comment #40 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 60610 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60610&action=edit gcc15-pr117047.patch So what about this patch? Tries to use alias attribute at least for the host==build cases if the host/build compiler supports alias attribute, and then either uses aliases to make one alias without ATTRIBUTE_MALLOC or wrapper around it. Only build tested so far.