From: Clifford Wolf Date: Fri, 6 Jun 2014 19:29:23 +0000 (+0200) Subject: fix functions with no block (but single statement, loop, etc.) X-Git-Tag: yosys-0.3.0~9 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5c10d2ee364c8807d10069ba7be3d1da3d252fa1;p=yosys.git fix functions with no block (but single statement, loop, etc.) --- diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index 5f40b60a8..47ea880c6 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -1883,17 +1883,10 @@ AstNode *AstNode::eval_const_function(AstNode *fcall) continue; } - if (child->type == AST_ASSIGN_EQ) - { - log_assert(block == NULL); - delete_temp_block = true; - block = new AstNode(AST_BLOCK); - block->children.push_back(child->clone()); - continue; - } - - child->dumpAst(NULL, "unexpected> "); - log_abort(); + log_assert(block == NULL); + delete_temp_block = true; + block = new AstNode(AST_BLOCK); + block->children.push_back(child->clone()); } log_assert(block != NULL);