https://bugs.llvm.org/show_bug.cgi?id=50198

            Bug ID: 50198
           Summary: [X86] long double to float128 conversion not working
                    properly
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

$ cat test.c
int main(void) {
  long double ld = 0;
  __float128 f128 = ld;
  int i = f128;
  return i;
}
$ clang -m64 test.c && ./a.out && echo ok
ok
$ clang -mx32 test.c && ./a.out && echo ok
ok
$ clang -m32 test.c && ./a.out && echo ok
Segmentation fault (core dumped)

This is with clang 12.0.0. It does not seem to be a regression, godbolt.org
shows this to segfault as far back as clang 7 (and also with current trunk).
Before clang 7, the conversion was not supported and resulted in a compiler
error.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to