mirror of
https://github.com/Z3Prover/z3
synced 2025-06-24 06:43:40 +00:00
fix #7143: type punning in test
This commit is contained in:
parent
91886dafca
commit
57c20be6eb
1 changed files with 3 additions and 1 deletions
|
@ -103,7 +103,9 @@ static void bug_to_rational() {
|
||||||
|
|
||||||
static void bug_is_int() {
|
static void bug_is_int() {
|
||||||
unsigned raw_val[2] = { 2147483648u, 1077720461u };
|
unsigned raw_val[2] = { 2147483648u, 1077720461u };
|
||||||
double val = *(double*)(raw_val);
|
double val;
|
||||||
|
static_assert(sizeof(raw_val) == sizeof(val));
|
||||||
|
memcpy(&val, raw_val, sizeof(val));
|
||||||
std::cout << val << "\n";
|
std::cout << val << "\n";
|
||||||
hwf_manager m;
|
hwf_manager m;
|
||||||
hwf a;
|
hwf a;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue