Index: clang/lib/Headers/mm_malloc.h =================================================================== --- clang/lib/Headers/mm_malloc.h +++ clang/lib/Headers/mm_malloc.h @@ -54,7 +54,13 @@ static __inline__ void __attribute__((__always_inline__, __nodebug__)) _mm_free(void *__p) { +#if defined(__MINGW32__) + __mingw_aligned_free(__p); +#elif defined(_WIN32) + _aligned_free(__p); +#else free(__p); +#endif } #endif