fix failure caused by undeclared variable (bug 11783)

This commit is contained in:
Brian
2007-07-31 09:43:57 -06:00
parent 2c0b3d8c4b
commit 8410b3f8f9
+2 -1
View File
@@ -2059,7 +2059,8 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper)
}
/* XXX make copy of this initializer? */
rhs = _slang_gen_operation(A, &oper->children[0]);
assert(rhs);
if (!rhs)
return NULL; /* must have found an error */
init = new_node2(IR_MOVE, var, rhs);
/*assert(rhs->Opcode != IR_SEQ);*/
n = new_seq(varDecl, init);