diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-12-05 13:45:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-05 13:45:16 +0100 |
commit | 0e7338d65c1bd6c4e2211fa531982a4c0a0e478c (patch) | |
tree | 2ba01a8ec07d8d0321477cc9240430394c3087ff /tests/ccgbugs | |
parent | 267fed53ee6ce6be70ff9f410e82b5847ddfa734 (diff) | |
download | Nim-0e7338d65c1bd6c4e2211fa531982a4c0a0e478c.tar.gz |
better support for PROGMEM like annotations for lets/vars; fixes #12216 (#12799)
Diffstat (limited to 'tests/ccgbugs')
-rw-r--r-- | tests/ccgbugs/tprogmem.nim | 11 |
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..884ca158a --- /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 = {'" + target: "C" +""" + +var myLetVariable {.exportc, codegenDecl: "$# /*PROGMEM*/ $#".} = [1, 2, 3] + +myLetVariable[0] = 5 +echo myLetVariable[0] |