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

            Bug ID: 40779
           Summary: clang trunk thinks 1+1 is 9223372036854775810
                    (converting `long double` to `size_t`)
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

Created attachment 21493
  --> https://bugs.llvm.org/attachment.cgi?id=21493&action=edit
testcase

STR:
 1. Compile and run the attached testcase program, the key part of which is
here:
>  long double one = 1;
>  size_t result(one + 1); // This should equal 2.


ACTUAL RESULTS, with locally-built clang version 9.0.0 (trunk 354359):
The program prints:
> Failed (expected 2 and got 9223372036854775810)

EXPECTED RESULTS:
The program should print:
> Success (expected 2 and got 2)


This is causing a startup crash in my locally-built Firefox, compiled with
locally-built Clang (from llvm trunk 354359).

-- 
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