diff options
| author | Alasdair Armstrong | 2019-04-15 14:35:02 +0100 |
|---|---|---|
| committer | Alasdair Armstrong | 2019-04-15 14:35:02 +0100 |
| commit | 4529e0acc377bed4d1bab4230f4023e4bee3ae85 (patch) | |
| tree | 76f6e8666c2cf12e2eeb95719162362a1b255e31 /test/c/zero_length_bv.sail | |
| parent | 1f421b865a87a161a82550443a0cf39aa2642d9c (diff) | |
Fix: Allow zero-length vector literals
Diffstat (limited to 'test/c/zero_length_bv.sail')
| -rw-r--r-- | test/c/zero_length_bv.sail | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/c/zero_length_bv.sail b/test/c/zero_length_bv.sail new file mode 100644 index 00000000..332b8aae --- /dev/null +++ b/test/c/zero_length_bv.sail @@ -0,0 +1,14 @@ +default Order dec + +$include <prelude.sail> + +val "print_endline" : string -> unit + +function main((): unit) -> unit = { + let x: bits(0) = []; + if x == sail_zeros(0) then { + print_endline("ok") + }; + let x: vector(0, dec, string) = []; + () +}
\ No newline at end of file |
