oridb/mc

Internal compiler error

Closed this issue · 3 comments

use std

extern const __bss_start : void#
   
const main = {

        const fp = __bss_start
        for fp : (&__bss_start)[:1]
        ;;
}

Output:

Building
	6m -I /lib/myr in.myr
CRASH: 6m -I /lib/myr in.myr
Internal error: mbld: exited with status 1

I am playing around some unusual cases :trollface:

oridb commented

Ah, I should have made it clearer. The extern const declaration without initialization is expected, but the crash happens when the fp identifier is reused in the for loop as the iterator. It compiles when I change either one of the two fp identifiers to another name.

oridb commented