mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-27 05:22:07 +00:00
Test that OPT r fails immediately if the recursion depth is already exceeded
Fixes #1034
This commit is contained in:
11
test/asm/opt-r-decrease.asm
Normal file
11
test/asm/opt-r-decrease.asm
Normal file
@@ -0,0 +1,11 @@
|
||||
MACRO m
|
||||
DEF depth += 1
|
||||
IF depth == 10
|
||||
OPT r9
|
||||
ENDC
|
||||
println "at depth {d:depth}"
|
||||
m
|
||||
ENDM
|
||||
|
||||
DEF depth = 0
|
||||
m
|
||||
2
test/asm/opt-r-decrease.err
Normal file
2
test/asm/opt-r-decrease.err
Normal file
@@ -0,0 +1,2 @@
|
||||
FATAL: opt-r-decrease.asm(11) -> opt-r-decrease.asm::m(7) -> opt-r-decrease.asm::m(7) -> opt-r-decrease.asm::m(7) -> opt-r-decrease.asm::m(7) -> opt-r-decrease.asm::m(7) -> opt-r-decrease.asm::m(7) -> opt-r-decrease.asm::m(7) -> opt-r-decrease.asm::m(7) -> opt-r-decrease.asm::m(7) -> opt-r-decrease.asm::m(4):
|
||||
Recursion limit (9) exceeded
|
||||
9
test/asm/opt-r-decrease.out
Normal file
9
test/asm/opt-r-decrease.out
Normal file
@@ -0,0 +1,9 @@
|
||||
at depth 1
|
||||
at depth 2
|
||||
at depth 3
|
||||
at depth 4
|
||||
at depth 5
|
||||
at depth 6
|
||||
at depth 7
|
||||
at depth 8
|
||||
at depth 9
|
||||
Reference in New Issue
Block a user