[llvm-dev] For mingw64 target, crash on cast int128 to double

Алексей Полушин via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 28 22:43:31 PDT 2020


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




More information about the llvm-dev mailing list