diff options
| author | Alasdair Armstrong | 2018-08-21 19:12:38 +0100 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-08-21 19:12:38 +0100 |
| commit | 581b72df349055c6bfdfb906b070984043e45840 (patch) | |
| tree | f0c8696da4d16c0b1236fe5c36af7990f59a1b37 /test | |
| parent | 7542e0d88b914fd949ad023284db773e61ce6b5a (diff) | |
C: Correctly handle the kinds of patterns generated by mappings
This change allows the RISC-V spec to compile to C, but more testing
is needed to ensure it works correctly.
Diffstat (limited to 'test')
| -rw-r--r-- | test/c/single_arg.expect | 1 | ||||
| -rw-r--r-- | test/c/single_arg.sail | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/c/single_arg.expect b/test/c/single_arg.expect new file mode 100644 index 00000000..7ed6ff82 --- /dev/null +++ b/test/c/single_arg.expect @@ -0,0 +1 @@ +5 diff --git a/test/c/single_arg.sail b/test/c/single_arg.sail new file mode 100644 index 00000000..6b746d11 --- /dev/null +++ b/test/c/single_arg.sail @@ -0,0 +1,15 @@ +default Order dec + +$include <prelude.sail> + +val f : (int, int) -> int + +function f(x) = { + match x { + (y, z) => y + z + } +} + +function main() : unit -> unit = { + print_int("", f(2, 3)); +}
\ No newline at end of file |
