summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ccgbugs/t16027.nim13
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