From 276281c3f989c19faee681adf11910cc43480ff4 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Thu, 6 Jul 2023 21:33:27 +0200 Subject: [PATCH] Fix of "INLINE" function. --- src/compiler/llvm_codegen_expr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/llvm_codegen_expr.c b/src/compiler/llvm_codegen_expr.c index b249b11f6..3a46f5101 100644 --- a/src/compiler/llvm_codegen_expr.c +++ b/src/compiler/llvm_codegen_expr.c @@ -3511,10 +3511,13 @@ static void llvm_emit_subarray_comp(GenContext *c, BEValue *be_value, BEValue *l INLINE bool should_inline_array_comp(ArraySize len, Type *base_type_lowered) { + RETRY: switch (base_type_lowered->type_kind) { case TYPE_ARRAY: - return should_inline_array_comp(base_type_lowered->array.len * len, type_lowering(base_type_lowered->array.base)); + len *= base_type_lowered->array.len; + base_type_lowered = type_lowering(base_type_lowered->array.base); + goto RETRY; case TYPE_SUBARRAY: return len <= 4; default: