Use wrapping arithmetic for exp in unchecked blocks.

This commit is contained in:
chriseth
2020-12-22 16:49:55 +01:00
parent 6bcae84610
commit 2ab83217e3
7 changed files with 18 additions and 2 deletions
@@ -7,5 +7,7 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f() -> 0x1
@@ -6,5 +6,7 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f() -> 0x1
@@ -7,5 +7,7 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f() -> 0x1
@@ -9,5 +9,7 @@ contract C {
}
}
}
// ====
// compileViaYul: also
// ----
// f() -> 0x00
@@ -7,6 +7,8 @@ contract test {
}
}
}
// ====
// compileViaYul: also
// ----
// f(uint256): 0 -> 1, 1
// f(uint256): 1 -> 2, -2
@@ -10,5 +10,7 @@ contract test {
return r;
}
}
// ====
// compileViaYul: also
// ----
// f() -> 4