[llvm-bugs] [Bug 50198] New: [X86] long double to float128 conversion not working properly

via llvm-bugs llvm-bugs at lists.llvm.org
Sun May 2 05:29:38 PDT 2021


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: unassignedbugs at nondot.org
          Reporter: harald at gigawatt.nl
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, pengfei.wang at intel.com,
                    spatel+llvm at rotateright.com

$ 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210502/9a1de54a/attachment.html>


More information about the llvm-bugs mailing list