dead_storage_off.sol 416 B

1234567891011121314
  1. // RUN: --no-dead-storage --emit cfg --target substrate
  2. contract nodeadstorage {
  3. int a;
  4. // simple test. Two references to "a" must result in loadstorage twice with --no-dead-storage flag
  5. // BEGIN-CHECK: nodeadstorage::function::test1
  6. function test1() public view returns (int) {
  7. return a + a;
  8. }
  9. // CHECK: load storage slot(uint256 0) ty:int256
  10. // CHECK: load storage slot(uint256 0) ty:int256
  11. }