For mingw64 target, crash on cast int128 to double


__int128 v = 12345;
int main() {
printf("%g", (double)v);

Compile: clang --target=x86_64-w64-mingw32 ...

Segfault in libgcc function __floattidf

gcc pass to __floattidf address of value in rdx, and clang pass value itself in rdx:r8

Apparently I applied a fix for a similar issue back in 2014:
Of course, I had no memory of doing this until I started digging again. :slight_smile:
It would be nice to come up with a more general solution to this problem.