Potential bug found.

Hello,
I've been playing around with the language a bit. While playing with it I wrote this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import libc {...}

func fib(a: int): int {
    if (a <= 1) {
        return 1;
    } else {
        return fib(a-1)+fib(a-2);
    }
}
func main(argc: int, argv: char**): int {
    printf("FIB: %d\n", fib(30));
    return 0;
}


Resulting in a SEGMENT Fault.
GDB tells this: a=<error reading variable: Cannot access memory at address 0x7fffff7fefec>)


Edited by Murii on