https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123037
--- Comment #9 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to Eric Botcazou from comment #6)
> What about x86_64-w64-mingw32? There should not be any difference.
That target works!
Looking at a diff of
cross-i686-w64-mingw32/gcc-15.3.9999/work/build/gcc/ada/rts/rtinit.i vs
cross-x86_64-w64-mingw32/gcc-15.3.9999/work/build/gcc/ada/rts/rtinit.i, both
with -ggdb3 for macros, it looks like x86_64-w64-mingw32 gets stdlib.h via
intrinsics use use, which i686-w64-mingw32 doesn't.
I think it comes from mingw-w64-headers/include/winnt.h then:
```
#ifdef _AMD64_
#if defined(__x86_64) && !defined(__arm64ec__) && !defined(RC_INVOKED)
#ifdef __cplusplus
extern "C" {
#endif
...
#if !defined(RC_INVOKED)
# if defined(__cplusplus)
extern "C" {
# endif
# include <x86intrin.h>
# if defined(__cplusplus)
}
# endif
#include <emmintrin.h>
#endif /* !defined(RC_INVOKED) */
...
```
then the various *intrins -> gmm_malloc.h -> stdilb.h, and _AMD64_ is only set
for the x86_64 build.