solang
solang copied to clipboard
Solang generates incorrect LLVM IR for multidimensional arrays
This contract works fine for solc, but crashes on Solang (for all targets):
contract Testing {
uint16[2][4][] stor_arr;
function getThis() public returns (uint16) {
uint16[2][4][] memory arr2 = stor_arr;
return arr2[1][2][2];
}
}
This is the error I get:
solang: /home/lucas/Downloads/llvm-project/llvm/include/llvm/IR/Instructions.h:921: llvm::Type* llvm::checkGEPType(llvm::Type*): Assertion `Ty && "Invalid GetElementPtrInst indices for type!"' failed.