ponyc
ponyc copied to clipboard
LLVM IR verification failure from `with_return` runner test
trafficstars
Terminator found in the middle of a basic block!
label %handler
Error:
Module verification failed: Terminator found in the middle of a basic block!
label %handler
Problematic IR:
define dso_local void @Main_Dispatch(ptr %0, ptr nocapture readnone %1, ptr nocapture readonly %2) unnamed_addr !pony.abi !2 {
%4 = getelementptr inbounds { i32, i32, ptr, ptr }, ptr %2, i64 0, i32 3
%5 = load ptr, ptr %4, align 8
tail call void @pony_gc_recv(ptr %0)
tail call void @pony_traceknown(ptr %0, ptr %5, ptr nonnull @15, i32 1)
tail call void @pony_recv_done(ptr %0)
%6 = tail call ptr @pony_ctx()
tail call void @pony_exitcode(i32 10)
ret void
ret void
}
where we are doubling ret void from:
actor Main
new create(env: Env) =>
with d = Disposble do
d.set_exit(10)
return
end