1pragma abicoder v2; 2contract C { 3 struct S { int8 x; int8 y; } 4 function f() internal pure returns(S calldata s) { 5 assembly { 6 s := 0x24 7 } 8 } 9 function g() public pure returns(int8, int8) { 10 S calldata s = f(); 11 return (s.x, s.y); 12 } 13 function h() public pure returns(uint256) { f(); return 0x42; } 14 function i() public pure returns(uint256) { abi.decode(msg.data[4:], (S)); return 0x42; } 15} 16// ==== 17// compileViaYul: also 18// ---- 19// g(): 0xCAFFEE, 0x42, 0x21 -> 0x42, 0x21 20// g(): 0xCAFFEE, 0x4242, 0x2121 -> FAILURE 21// g(): 0xCAFFEE, 0x42 -> 0x42, 0 22// h() -> 0x42 23// i() -> FAILURE 24