Code:
__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
Code:
__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:
http://github.com/llvm/llvm-project/commit/4a406d32e97b1748c4eed6674a2c1819b9cf98ea
Of course, I had no memory of doing this until I started digging again.
It would be nice to come up with a more general solution to this problem.