sbase/tests/0048-dc.sh
Roberto E. Vargas Caballero a2940adeba dc: Don't trash val next pointer
When a value was assigned to a register using the 's'
command we were assigning the full value from execution
stack, overwriting the next pointer of the register
stack with the next pointer of the execution stack.
2026-01-19 18:49:42 +01:00

19 lines
198 B
Bash
Executable File

#!/bin/sh
tmp=$$.tmp
trap 'rm -f $tmp' EXIT
trap 'exit $?' HUP INT TERM
cat <<'EOF' > $tmp
1
EOF
$EXEC ../dc -i <<'EOF' | diff -u - $tmp
[Splp 1+dsps. 0 Lps. 1Q]s<1>
1dsps.
lpl<1>xs.
lpps.
EOF