-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
The compiler crashes when trying to compile this code:
proc genArray(): array[100000, int] =
discard
const myarr = genArray()
proc foo(a: int): int =
return myarr[a]
proc main() =
const a = foo(0)
echo a
main()output:
Error: internal error: (filename: "vmgen.nim", line: 179, column: 16)
No stack traceback available
To create a stacktrace, rerun compilation with ./koch temp c <file>
I was actually trying to create a dummy example, where it would crash here [0] but I ended it up making it crash here [1] . It seems like it is the same issue, though.
[0]
Line 162 in 24cae4a
| internalAssert(-0x7fff < diff and diff < 0x7fff) |
[1]
Line 381 in 24cae4a
| internalAssert result < 0x7fff |
timotheecour