solang
solang copied to clipboard
[ICE]: Assigning a value to the struct variable's slot causes an error.
Solang version: v0.3.3-70-g32a45ea1 Description: c.slot := add(c.slot, 1) causes a compilation error.
contract C {
struct S { bool f; }
S s;
function f() internal pure returns (S storage c) {
assembly {
for { c.slot := s.slot } iszero(eq(c.slot, 0)) { c.slot := add(c.slot, 1) } {}
}
}
}
solang_v0.3.3-70-g32a45ea1: /home/runner/work/solang-llvm/solang-llvm/llvm-project/llvm/include/llvm/IR/Instructions.h:2799: void llvm::PHINode::setIncomingValue(unsigned int, llvm::Value*): Assertion `getType() == V->getType() && "All operands to PHI node must be the same type as the PHI node!"' failed.
Aborted