2020-03-09 21:14:07 +00:00
|
|
|
contract c {
|
|
|
|
struct Struct {
|
|
|
|
uint256 a;
|
|
|
|
uint256 b;
|
|
|
|
}
|
2020-07-30 09:33:34 +00:00
|
|
|
uint[75] r;
|
2020-03-09 21:14:07 +00:00
|
|
|
Struct data1;
|
|
|
|
Struct data2;
|
|
|
|
|
|
|
|
function test() public returns (bool) {
|
|
|
|
data1.a = 1;
|
|
|
|
data1.b = 2;
|
|
|
|
Struct memory x = data1;
|
|
|
|
data2 = x;
|
|
|
|
return data2.a == data1.a && data2.b == data1.b;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-30 09:33:34 +00:00
|
|
|
// ====
|
2020-11-21 13:54:16 +00:00
|
|
|
// compileToEwasm: also
|
2021-02-12 12:45:15 +00:00
|
|
|
// compileViaYul: also
|
2020-03-09 21:14:07 +00:00
|
|
|
// ----
|
|
|
|
// test() -> true
|
2021-04-08 12:57:18 +00:00
|
|
|
// gas irOptimized: 104623
|
2021-02-12 12:45:15 +00:00
|
|
|
// gas legacy: 106427
|
|
|
|
// gas legacyOptimized: 101306
|