error when trying to pass a TYPE_NOEXPR value to ir_instr_op

This commit is contained in:
Wolfgang Bumiller 2013-08-26 10:23:20 +02:00
parent 69cecb74df
commit 5958687795

5
ir.c
View file

@ -1032,6 +1032,11 @@ static void ir_instr_delete(ir_instr *self)
static bool ir_instr_op(ir_instr *self, int op, ir_value *v, bool writing)
{
if (v && v->vtype == TYPE_NOEXPR) {
irerror(self->context, "tried to use a NOEXPR value");
return false;
}
if (self->_ops[op]) {
size_t idx;
if (writing && vec_ir_instr_find(self->_ops[op]->writes, self, &idx))