mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 19:52:31 +00:00 
			
		
		
		
	This would previously complain about an undefined internal macro if the unapplied macro had not already been used. If it had, it would incorrectly use the arguments from the previous invocation.
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			426 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			426 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| logger -expect-no-warnings
 | |
| read_verilog -sv <<EOT
 | |
| `define MACRO(a = 1, b = 2) initial $display("MACRO(a = %d, b = %d)", a, b)
 | |
| module top;
 | |
|     `MACRO();
 | |
| endmodule
 | |
| EOT
 | |
| 
 | |
| design -reset
 | |
| 
 | |
| logger -expect error "Expected to find '\(' to begin macro arguments for 'MACRO', but instead found ';'" 1
 | |
| read_verilog -sv <<EOT
 | |
| `define MACRO(a = 1, b = 2) initial $display("MACRO(a = %d, b = %d)", a, b)
 | |
| module top;
 | |
|     `MACRO;
 | |
| endmodule
 | |
| EOT
 |