[TypeChecker] ICE in memoryMemberTypes()
- Dominant language
- C++
- Stars
- 25.7k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 21
Description
## Description
```
pragma solidity >= 0.0.0;
contract C0 {
struct St0 {
uint40 el0;
mapping(uint224 => int64) el1;
}
type T0 is uint40;
function f0(C0.T0 i0,bytes12 i1) external returns(bool o0,bool o1) {
}
fallback() external virtual
{
(bool l0, C0.St0[8] memory l1, C0.St0 memory l2) = abi.decode(abi.encodeCall(this.f0, (C0.T0.wrap(uint40(1099511627775)), bytes12(bytes29(0x0000000000000000000000000000000000000000000000000000000000)))), (bool, C0.St0[8], C0.St0));
}
}
```
throws
https://github.com/ethereum/solidity/blob/4577aebfd24a8dec47f7ce085d4e8887f5b8b3af/libsolidity/ast/Types.cpp#L2553
## Environment
- Compiler version: 4edbaf1e1
- Target EVM version (as per compiler settings): shanghai
## Steps to Reproduce
```
solc test.sol
```
Contributor guide
Research direction
Reproduce the ICE with the provided contract saved as test.sol and run solc test.sol. Then inspect memoryMemberTypes() around libsolidity/ast/Types.cpp#L2553 to trace the failing type combination. Done means the compiler no longer throws an internal error for this input and the regression is covered by the project's tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, solidity
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100