| git.druid.rocks | index | druid520 | nscc | test/ | t49_bighex.nsc |
test/t49_bighex.nsc
/* regression test: a hex literal with the high bit of a 64-bit word
* set (16 hex digits starting 8-f) used to crash the compiler outright
* (perl's own "non-portable" advisory escalated to fatal under
* `use warnings FATAL`, in both jtype3's int_value and jemit8's
* needs_abs), and separately, casting an i64-typed literal to u64 was
* wrongly rejected as if u64 were narrower than i64 (it isn't -- same
* width, non-negative source, never a truncation). */
global i32 main(void) {
u64 magic;
magic = (u64)0x73666d6f6f62616b;
if (magic == (u64)0x73666d6f6f62616b) {
return 42;
}
return 1;
}