Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying slot causes compilation crash. #1726

Open
Subway2023 opened this issue Feb 8, 2025 · 0 comments
Open

Modifying slot causes compilation crash. #1726

Subway2023 opened this issue Feb 8, 2025 · 0 comments

Comments

@Subway2023
Copy link

Version: v0.3.3: Atlantis

contract C {
    struct S { bool f; }
    S s;
    function f(uint256 a) internal returns (S storage c) {
        assembly {
            switch a
                default { c.slot := s.slot }
        }
    }
}
solang compile --target solana  test.sol

solang: llvm/include/llvm/IR/Instructions.h:2765: 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 (core dumped)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant