mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	fix functions with no block (but single statement, loop, etc.)
This commit is contained in:
		
							parent
							
								
									c82db39935
								
							
						
					
					
						commit
						5c10d2ee36
					
				
					 1 changed files with 4 additions and 11 deletions
				
			
		| 
						 | 
					@ -1883,17 +1883,10 @@ AstNode *AstNode::eval_const_function(AstNode *fcall)
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (child->type == AST_ASSIGN_EQ)
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		log_assert(block == NULL);
 | 
							log_assert(block == NULL);
 | 
				
			||||||
		delete_temp_block = true;
 | 
							delete_temp_block = true;
 | 
				
			||||||
		block = new AstNode(AST_BLOCK);
 | 
							block = new AstNode(AST_BLOCK);
 | 
				
			||||||
		block->children.push_back(child->clone());
 | 
							block->children.push_back(child->clone());
 | 
				
			||||||
			continue;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		child->dumpAst(NULL, "unexpected> ");
 | 
					 | 
				
			||||||
		log_abort();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	log_assert(block != NULL);
 | 
						log_assert(block != NULL);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue