Closed rurban closed 1 year ago
Yeah, we just haven't gotten to this yet, which is why we left trunk.rn failing, to remind us. There are intrinsics in LLVM IR for catching overflows, and it isn't a huge task to upgrade genllvm.c to use them. We just haven't, yet.
We finally fixed this, so I'll close this issue.
errortests/trunc.rn fails with a var (and also a constant)
variable should add a runtime truncation check:
constant may throw directly at compile-time:
See also: https://cwe.mitre.org/data/definitions/197.html