diff options
| author | Alasdair Armstrong | 2019-03-21 18:54:16 +0000 |
|---|---|---|
| committer | Alasdair Armstrong | 2019-03-21 18:55:42 +0000 |
| commit | 13ad54f450a11a9c4eecdd782036e50ea2a41cd8 (patch) | |
| tree | 78adc8719e550dedb2870e6e9fcf108f206fe741 /test | |
| parent | 52382d4e8fc4edab67bf01080087fb12c88fbed4 (diff) | |
Jib: Add types to Phi functions
Add a test case to ensure variable types in l-expressions remain the
same with flow-sensitive constraints.
Diffstat (limited to 'test')
| -rw-r--r-- | test/c/flow_restrict.expect | 1 | ||||
| -rw-r--r-- | test/c/flow_restrict.sail | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/test/c/flow_restrict.expect b/test/c/flow_restrict.expect new file mode 100644 index 00000000..9766475a --- /dev/null +++ b/test/c/flow_restrict.expect @@ -0,0 +1 @@ +ok diff --git a/test/c/flow_restrict.sail b/test/c/flow_restrict.sail new file mode 100644 index 00000000..ef2ec412 --- /dev/null +++ b/test/c/flow_restrict.sail @@ -0,0 +1,23 @@ +default Order dec + +$include <flow.sail> +$include <exception_basic.sail> + +val "print_endline" : string -> unit + +register R : bool + +function main((): unit) -> unit = { + R = false; + let 'x = 3180327502475943573495720457203572045720485720458724; + y : range(0, 'x) = 1; + if R then { + assert(constraint('x <= 2)); + y = 2; + let z = y; + let x = 2; + () + } else { + print_endline("ok") + } +} |
