diff options
| author | 2026-10-14 16:47:08 +0330 | |
|---|---|---|
| committer | 2026-10-14 16:47:08 +0330 | |
| commit | 58c6edb92426852253d5f246e16710b636c93c70 (patch) | |
| tree | 7230ee8829cc2c9de12add23460bbb024bec997f /tests/programs/embed_local_array.zc | |
| parent | globals: an integer constant initializing a float or f32 global converts to f... (diff) | |
| parent | merge work/jit2: x86-64 jit inline enhancements (diff) | |
Merge branch 'main' into work/spec
Diffstat (limited to 'tests/programs/embed_local_array.zc')
| -rw-r--r-- | tests/programs/embed_local_array.zc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/programs/embed_local_array.zc b/tests/programs/embed_local_array.zc new file mode 100644 index 0000000..0e2b7b8 --- /dev/null +++ b/tests/programs/embed_local_array.zc @@ -0,0 +1,11 @@ +include rt; +// embed of an array type inside a function (zc0 used to embed arrays only at the top level) +fn main() { + embed "tests/data/embed/bytes.bin" as u8[] bytes; + embed "tests/data/embed/bytes.bin" as i8[8] signed; + embed "tests/data/embed/shorts.bin" as u16[] shorts; + rt.put_n(bytes[4]); rt.put_c(32); + rt.put_n(signed[4]); rt.put_c(32); rt.put_n(signed[7]); rt.put_c(32); + rt.put_n(shorts[0] + shorts[1] * 10 + shorts[2] * 100); rt.put_c(10); + return 0; +} |
