mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 19:52:31 +00:00 
			
		
		
		
	In line with other tools, this adds an extra wrapping block around such for loops to appropriately scope the variable.
		
			
				
	
	
		
			9 lines
		
	
	
	
		
			220 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
	
		
			220 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| logger -expect error "For loop variable declaration is missing initialization!" 1
 | |
| read_verilog -sv <<EOT
 | |
| module top;
 | |
|     integer z;
 | |
|     initial
 | |
|         for (integer i; i < 10; i = i + 1)
 | |
|             z = i;
 | |
| endmodule
 | |
| EOT
 |