mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	These were marked IR-only, but they do pass on the old codegen too. Also add old codegen version of semantictests/revertStrings/function_entry_checks.
		
			
				
	
	
		
			17 lines
		
	
	
		
			426 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			426 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
| contract C {
 | |
|     uint256[] storageArray;
 | |
|     function pushEmpty(uint256 len) public {
 | |
|         while(storageArray.length < len)
 | |
|             storageArray.push();
 | |
| 
 | |
|         for (uint i = 0; i < len; i++)
 | |
|             require(storageArray[i] == 0);
 | |
|     }
 | |
| }
 | |
| // ====
 | |
| // compileViaYul: also
 | |
| // EVMVersion: >=petersburg
 | |
| // ----
 | |
| // pushEmpty(uint256): 128
 | |
| // pushEmpty(uint256): 256
 | |
| // pushEmpty(uint256): 32768 -> FAILURE # out-of-gas # |