diff options
author | Timotej Kapus <timotej.kapus13@imperial.ac.uk> | 2015-06-22 01:09:32 +0100 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2015-12-17 19:45:03 +0000 |
commit | 901bd2c429ac51dd143a2a4bfc07c382dfb21e72 (patch) | |
tree | 0c895124938a79f67904bd11fdb9f4976b3be298 /test | |
parent | 9298b60d25da080b0c81682afe58d4a8d9e1971b (diff) | |
download | klee-901bd2c429ac51dd143a2a4bfc07c382dfb21e72.tar.gz |
Fixed a bug with how non power 2 values were written to memory, added test for it
Diffstat (limited to 'test')
-rw-r--r-- | test/regression/2015-06-22-struct-write.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/regression/2015-06-22-struct-write.c b/test/regression/2015-06-22-struct-write.c new file mode 100644 index 00000000..6efc4ee6 --- /dev/null +++ b/test/regression/2015-06-22-struct-write.c @@ -0,0 +1,21 @@ +// RUN: %llvmgcc %s -emit-llvm -g -O0 -c -o %t.bc +// RUN: rm -rf %t.klee-out +// RUN: %klee --output-dir=%t.klee-out -exit-on-error %t.bc + +#include <assert.h> +#include <klee/klee.h> + +union U0 { + signed f3 :18; +}; + +static union U0 u = { 0UL }; + +int main(int argc, char **argv) { + u.f3 = 534; + + klee_assert(u.f3 == 534); + + return 0; +} + |