| 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 *) |
| 3 | module DivNarrow; |
| 4 | import Out; |
| 5 | |
| 6 | proc main*; |
| 7 | var a, b: I16; |
| 8 | begin |
| 9 | a := -32767 - 1; |
| 10 | b := -1; |
| 11 | Out.str("before\n"); |
| 12 | Out.int(I64(a div b)); |
| 13 | Out.ln(); |
| 14 | end; |
| 15 | |
| 16 | end DivNarrow. |