diff options
Diffstat (limited to 'tests/manyloc/standalone2')
-rw-r--r-- | tests/manyloc/standalone2/panicoverride.nim | 14 | ||||
-rw-r--r-- | tests/manyloc/standalone2/tavr.nim | 7 | ||||
-rw-r--r-- | tests/manyloc/standalone2/tavr.nim.cfg | 5 |
3 files changed, 26 insertions, 0 deletions
diff --git a/tests/manyloc/standalone2/panicoverride.nim b/tests/manyloc/standalone2/panicoverride.nim new file mode 100644 index 000000000..c0b8bb030 --- /dev/null +++ b/tests/manyloc/standalone2/panicoverride.nim @@ -0,0 +1,14 @@ + +proc printf(frmt: cstring) {.varargs, importc, header: "<stdio.h>", cdecl.} +proc exit(code: int) {.importc, header: "<stdlib.h>", cdecl.} + +{.push stack_trace: off, profiler:off.} + +proc rawoutput(s: string) = + printf("%s\n", s) + +proc panic(s: string) {.noreturn.} = + rawoutput(s) + exit(1) + +{.pop.} diff --git a/tests/manyloc/standalone2/tavr.nim b/tests/manyloc/standalone2/tavr.nim new file mode 100644 index 000000000..6cbc5c699 --- /dev/null +++ b/tests/manyloc/standalone2/tavr.nim @@ -0,0 +1,7 @@ +# bug #16404 + +proc printf(frmt: cstring) {.varargs, header: "<stdio.h>", cdecl.} + +var x = 0 +inc x +printf("hi %ld\n", x+4777) diff --git a/tests/manyloc/standalone2/tavr.nim.cfg b/tests/manyloc/standalone2/tavr.nim.cfg new file mode 100644 index 000000000..2a31618d0 --- /dev/null +++ b/tests/manyloc/standalone2/tavr.nim.cfg @@ -0,0 +1,5 @@ +--gc:arc +--cpu:avr +--os:standalone +--compileOnly +--threads:off |