From 482c687462f21d80b2f026cdb870dafcb06bfb88 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 13 May 2020 22:42:15 +0100 Subject: [PATCH] Fix procedure references in global compound literals in old backend --- src/ir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ir.cpp b/src/ir.cpp index 531f3a62c..65e565bc5 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -7908,7 +7908,7 @@ bool ir_is_elem_const(irModule *m, Ast *elem, Type *elem_type) { } TypeAndValue tav = type_and_value_of_expr(elem); GB_ASSERT_MSG(tav.mode != Addressing_Invalid, "%s %s", expr_to_string(elem), type_to_string(tav.type)); - return tav.value.kind != ExactValue_Invalid; + return tav.value.kind != ExactValue_Invalid && tav.value.kind != ExactValue_Procedure; } irAddr ir_build_addr_from_entity(irProcedure *proc, Entity *e, Ast *expr) {