From 9614b9e31f8d7d70e6ee3c82ba1e92087e2b291c Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Sun, 11 Jul 2021 13:47:04 +0200 Subject: [PATCH] Fix incorrect handling of indirect returns in the ABI --- src/compiler/llvm_codegen_type.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/llvm_codegen_type.c b/src/compiler/llvm_codegen_type.c index be30d198f..df747d069 100644 --- a/src/compiler/llvm_codegen_type.c +++ b/src/compiler/llvm_codegen_type.c @@ -270,7 +270,8 @@ LLVMTypeRef llvm_func_type(GenContext *context, Type *type) UNREACHABLE; case ABI_ARG_INDIRECT: vec_add(params, llvm_get_ptr_type(context, real_return_type)); - FALLTHROUGH; + return_type = llvm_get_type(context, type_void); + break; case ABI_ARG_EXPAND_COERCE: { LLVMTypeRef lo = llvm_abi_type(context, ret_arg_info->direct_pair.lo);