* fix #6497

* add testcase for #16027
This commit is contained in:
flywind
2020-11-18 15:56:31 +08:00
committed by GitHub
parent e6e1e9574d
commit 581bcfe290
2 changed files with 14 additions and 0 deletions

13
tests/ccgbugs/t16027.nim Normal file
View File

@@ -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