| Issue |
63881
|
| Summary |
_BitInt(192) conversion to double produces wrong value
|
| Labels |
clang:codegen
|
| Assignees |
|
| Reporter |
tbaederr
|
This seems to be a problem in codegen, since evaluation at compile time works: https://godbolt.org/z/T7r9voe6c
```c++
constexpr _BitInt(192) a = 11488350477184223;
constexpr double d = a;
static_assert(d == 11488350477184224.0);
int main () {
unsigned _BitInt(192) u = 11488350477184223;
__builtin_printf ("%.1f\n", (double) u);
if ((double) u != 11488350477184224.0)
__builtin_abort ();
}
```
The printed value is instead `9007199254740992.0`.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs