diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2020-09-28 13:51:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-28 13:51:39 +0200 |
commit | 50b6f6996ab604931d8ee7ca2a26bfdce5559933 (patch) | |
tree | 2c17276e270016cad4fb002d80758fbfa9b272bb /tests/ccgbugs | |
parent | 453167a41e4d3b75e14d9102779dc2311672d13f (diff) | |
download | Nim-50b6f6996ab604931d8ee7ca2a26bfdce5559933.tar.gz |
.noalias annotation; frontend support (#15419)
* .noalias annotation; frontend support * added .noalias support to Nim; implements https://github.com/nim-lang/RFCs/issues/204
Diffstat (limited to 'tests/ccgbugs')
-rw-r--r-- | tests/ccgbugs/tnoalias.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ccgbugs/tnoalias.nim b/tests/ccgbugs/tnoalias.nim new file mode 100644 index 000000000..5ddfac5bb --- /dev/null +++ b/tests/ccgbugs/tnoalias.nim @@ -0,0 +1,8 @@ +discard """ + ccodecheck: "\\i@'NIM_CHAR* NIM_NOALIAS x,' @'void* NIM_NOALIAS q'" +""" + +proc p(x {.noalias.}: openArray[char]) = + var q {.noalias.}: pointer = unsafeAddr(x[0]) + +p "abc" |