mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Member access on a struct returned by the assignment expression, cause crash #2947
This commit is contained in:
@@ -216,7 +216,14 @@ BEValue llvm_emit_assign_expr(GenContext *c, BEValue *ref, Expr *ref_expr, Expr
|
||||
if (ref_expr && c->current_block) llvm_emit_expr(c, ref, ref_expr);
|
||||
}
|
||||
if (!c->current_block) goto AFTER_STORE;
|
||||
if (value.type != type_void) llvm_store(c, ref, &value);
|
||||
if (value.type == type_void)
|
||||
{
|
||||
value = *ref;
|
||||
}
|
||||
else
|
||||
{
|
||||
llvm_store(c, ref, &value);
|
||||
}
|
||||
}
|
||||
|
||||
if (optional)
|
||||
|
||||
Reference in New Issue
Block a user