diff options
Diffstat (limited to 'tests/conformance/3-expressions/assign_target_address_first.zc')
| -rw-r--r-- | tests/conformance/3-expressions/assign_target_address_first.zc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/conformance/3-expressions/assign_target_address_first.zc b/tests/conformance/3-expressions/assign_target_address_first.zc new file mode 100644 index 0000000..5fe6093 --- /dev/null +++ b/tests/conformance/3-expressions/assign_target_address_first.zc @@ -0,0 +1,11 @@ +// expect: 2/0/ +include rt; +void pn(int x) { rt.put_n(x); rt.put_c(10); } +fn main() { + int i = 0; + int[3] a = {0, 0, 0}; + a[i] = i = 2; + pn(a[0]); pn(a[2]); + return 0; +} +// zc0: skip |
