raz / test / mac / DivNarrow.raz

16 lines · 304 B · raw · history · last change 6d4487fb

1(* The smallest I16 divided by -1 stops the program, as an I64's does:
2 arm64's sdiv wouldn't, so the code checks *)
3module DivNarrow;
4import Out;
5
6proc main*;
7var a, b: I16;
8begin
9 a := -32767 - 1;
10 b := -1;
11 Out.str("before\n");
12 Out.int(I64(a div b));
13 Out.ln();
14end;
15
16end DivNarrow.