summary refs log tree commit diff stats
path: root/tests/ccgbugs/tprogmem.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ccgbugs/tprogmem.nim')
-rw-r--r--tests/ccgbugs/tprogmem.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ccgbugs/tprogmem.nim b/tests/ccgbugs/tprogmem.nim
new file mode 100644
index 000000000..58a20583a
--- /dev/null
+++ b/tests/ccgbugs/tprogmem.nim
@@ -0,0 +1,11 @@
+discard """
+  output: "5"
+  cmd: r"nim c --hints:on $options -d:release $file"
+  ccodecheck: "'/*PROGMEM*/ myLetVariable = {'"
+  targets: "c"
+"""
+
+var myLetVariable {.exportc, codegenDecl: "$# /*PROGMEM*/ $#".} = [1, 2, 3]
+
+myLetVariable[0] = 5
+echo myLetVariable[0]