3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-13 04:28:18 +00:00

fix functions with no block (but single statement, loop, etc.)

This commit is contained in:
Clifford Wolf 2014-06-06 21:29:23 +02:00
parent c82db39935
commit 5c10d2ee36

View file

@ -1883,17 +1883,10 @@ AstNode *AstNode::eval_const_function(AstNode *fcall)
continue; continue;
} }
if (child->type == AST_ASSIGN_EQ) log_assert(block == NULL);
{ delete_temp_block = true;
log_assert(block == NULL); block = new AstNode(AST_BLOCK);
delete_temp_block = true; block->children.push_back(child->clone());
block = new AstNode(AST_BLOCK);
block->children.push_back(child->clone());
continue;
}
child->dumpAst(NULL, "unexpected> ");
log_abort();
} }
log_assert(block != NULL); log_assert(block != NULL);