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-07-01 12:17:27 +00:00
|
|
|
// gas irOptimized: 110144
|
2021-05-18 13:39:08 +00:00
|
|
|
// gas legacy: 110627
|
|
|
|
// gas legacyOptimized: 109706
|