diff options
author | flywind <43030857+xflywind@users.noreply.github.com> | 2020-11-18 15:56:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-18 07:56:31 +0000 |
commit | 581bcfe29094f525d2ab4e27455bed18a3eac811 (patch) | |
tree | 7842cb4a996eb426ab62d36630ac270364a7fa81 /tests/ccgbugs | |
parent | e6e1e9574de8c090cb9de7a809064037e2af39f7 (diff) | |
download | Nim-581bcfe29094f525d2ab4e27455bed18a3eac811.tar.gz |
fix #6497 (#16027)
* fix #6497 * add testcase for #16027
Diffstat (limited to 'tests/ccgbugs')
-rw-r--r-- | tests/ccgbugs/t16027.nim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ccgbugs/t16027.nim b/tests/ccgbugs/t16027.nim new file mode 100644 index 000000000..58f15eb6e --- /dev/null +++ b/tests/ccgbugs/t16027.nim @@ -0,0 +1,13 @@ +discard """ + ccodecheck: "__restrict__" + action: compile + joinable: false +""" + +# see bug #16027 +iterator myitems(s: seq[int]): int = + var data {.codegenDecl: "$# __restrict__ $#".} : ptr int = nil + yield 1 + +for i in @[1].myitems: + discard |