github.com/iotexproject/iotex-core@v1.14.1-rc1/action/protocol/execution/testdata/maxtime2.sol (about) 1 pragma solidity >=0.4.24; 2 3 contract SimpleStorage { 4 uint[32] storedData; 5 6 event Set(uint256 indexed); 7 event Get(address, uint256); 8 event Deadlock(); 9 10 function set(uint x) public { 11 for (uint i = 0; i < 32; i++) { 12 storedData[i] = x; 13 } 14 emit Set(x); 15 } 16 17 function test1() public returns (uint) { 18 uint x = 0; 19 for (uint j = 0; j < 2; j++) { 20 for (uint i = 0; i < 32; i++) { 21 x += storedData[i]; 22 x = x >> 8; 23 x = x * 301; 24 x = x * 12; 25 } 26 } 27 emit Set(x); 28 return x; 29 } 30 function test2() public returns (uint) { 31 uint x = 0; 32 for (uint j = 0; j < 1; j++) { 33 for (uint i = 0; i < 16; i++) { 34 x += storedData[i]; 35 x = x >> 8; 36 x = x << 12; 37 } 38 } 39 emit Set(x); 40 return x; 41 } 42 }