Locals of type .vector will now also properly generate all 3 locals

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-10 12:44:18 +01:00
parent a27750966f
commit 42b9848375

2
ast.c
View file

@ -966,6 +966,8 @@ bool ast_local_codegen(ast_value *self, ir_function *func, bool param)
v = ir_function_create_local(func, self->name, self->expression.vtype, param); v = ir_function_create_local(func, self->name, self->expression.vtype, param);
if (!v) if (!v)
return false; return false;
if (self->expression.vtype == TYPE_FIELD)
v->fieldtype = self->expression.next->expression.vtype;
v->context = ast_ctx(self); v->context = ast_ctx(self);
/* A constant local... hmmm... /* A constant local... hmmm...