Closed richardmembarth closed 6 years ago
The following code segfaults when generating LLVM code due to unreachable code (llvm.cpp:321):
extern "C" { fn sqrtf(f32) -> f32; } extern fn thorin_test() -> () { let check: [float * 1]; let X = ~[12:float]; let sval = sqrtf(X(0)); if check(0) > 0f { } }
The variable check needs an initializer. If you provide one, this now works on master. I tested the program with these initializers:
check
undef[[float * 1]]()
[1.0f]
[-1.0f]
I am therefore closing this issue.
The following code segfaults when generating LLVM code due to unreachable code (llvm.cpp:321):