diff options
| author | gingerBill <bill@gingerbill.org> | 2020-05-13 22:42:15 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-05-13 22:42:15 +0100 |
| commit | 482c687462f21d80b2f026cdb870dafcb06bfb88 (patch) | |
| tree | 9745fc8ba1cf4f1956c7a4e612551cbadac5a891 /src | |
| parent | de8c1165c264439eb2375b4edd0653f60230c95f (diff) | |
Fix procedure references in global compound literals in old backend
Diffstat (limited to 'src')
| -rw-r--r-- | src/ir.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |