diff options
author | Dan Liew <daniel.liew@imperial.ac.uk> | 2013-11-07 14:59:37 +0000 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2014-02-14 18:29:35 +0000 |
commit | 3be107cbf55f69f063795182690a5f9689e1d805 (patch) | |
tree | 1e46e72e496286a5504b5ea08f3803503f361665 /test/Solver | |
parent | 71048bea167794f109b2f0b715b6cc1ba8b6eab9 (diff) | |
download | klee-3be107cbf55f69f063795182690a5f9689e1d805.tar.gz |
Fixed overshift of logical right shift by constant so that it
overshifts to zero. Test case is included.
Diffstat (limited to 'test/Solver')
-rw-r--r-- | test/Solver/overshift-lright-by-constant.kquery | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Solver/overshift-lright-by-constant.kquery b/test/Solver/overshift-lright-by-constant.kquery new file mode 100644 index 00000000..cb223dd5 --- /dev/null +++ b/test/Solver/overshift-lright-by-constant.kquery @@ -0,0 +1,14 @@ +# RUN: %kleaver %s > %t +# RUN: not grep INVALID %t +array x[4] : w32 -> w8 = symbolic +# ∀ x. x > 0 → ( x >> 32 = 0 ) +# Check we overshift to zero for when shifting for all 32-bit values >0 + +(query [ (Ult (w32 0) (ReadLSB w32 (w32 0) x)) ] + (Eq + (LShr w32 + (ReadLSB w32 (w32 0) x) + (w32 32) + ) + (w32 0) + ) [ ] [x] ) |