raz
/
test
/
run
/ NilPointer.raz
about
files
log
releases
feed
16 lines · 273 B ·
raw
·
history
· last change
389c4f3a
1
module
NilPointer;
2
(* Following nil stops the program with SIGSEGV, after saying where *)
3
import
Out;
4
5
type
Cell =
record
next: ^Cell; v:
I64
;
end
;
6
7
proc
main*;
8
var
c: Cell;
9
begin
10
c.v :=
1
;
11
Out.int(c.v);
12
Out.flush;
13
Out.int(c.next^.v);
14
end
;
15
16
end
NilPointer.