diff options
author | Dan Liew <daniel.liew@imperial.ac.uk> | 2013-11-07 15:50:30 +0000 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2014-02-14 18:29:35 +0000 |
commit | b6e9a1f1d3d1d1ddd9b5843c47b372352d259a16 (patch) | |
tree | 7554f5927a063cf38af32e15d22fa08f6d3374ff /test | |
parent | 7759c90744bae5c531f765b2faa2475e13f464fd (diff) | |
download | klee-b6e9a1f1d3d1d1ddd9b5843c47b372352d259a16.tar.gz |
Fixed overshift of arithmetic right shift by constant so that it
overshifts to zero. Test case is included.
Diffstat (limited to 'test')
-rw-r--r-- | test/Solver/overshift-aright-by-constant.kquery | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Solver/overshift-aright-by-constant.kquery b/test/Solver/overshift-aright-by-constant.kquery new file mode 100644 index 00000000..c21889e2 --- /dev/null +++ b/test/Solver/overshift-aright-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 → ( ((signed int) 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 + (AShr w32 + (ReadLSB w32 (w32 0) x) + (w32 32) + ) + (w32 0) + ) [ ] [x] ) |