shithub: mc

ref: 9bf446ab7795f7397bc4fb7ae9e46ce14c3f679c
dir: /lib/std/test/sjlj.myr/

View raw version
use std

var st

const main = {
	var jb

	st = 1
	if std.setjmp(&jb)
		std.put("nonlocal return\n")
		std.exit(st)
	;;
	st = 0
	std.put("doing jmp\n")
	dolongjmp(&jb)
	std.fatal("unreachable\n")
}

const dolongjmp = {jb
	std.longjmp(jb)
}