Check for TYPE_FIELD in load_from_ent

This commit is contained in:
Wolfgang Bumiller 2012-05-01 12:14:07 +02:00
parent 18969b1713
commit ddbd460331

4
ir.c
View file

@ -964,6 +964,10 @@ ir_value* ir_block_create_load_from_ent(ir_block *self, const char *label, ir_va
if (ent->vtype != TYPE_ENTITY)
return NULL;
/* at some point we could redirect for TYPE_POINTER... but that could lead to carelessness */
if (field->vtype != TYPE_FIELD)
return NULL;
switch (outype)
{
case TYPE_FLOAT: op = INSTR_LOAD_F; break;