solang icon indicating copy to clipboard operation
solang copied to clipboard

The result of converting true to uint does not match the behavior in solc.

Open Subway2023 opened this issue 11 months ago • 0 comments

Version: v0.3.3: Atlantis

contract C {
    function f() public returns (uint x) {
        assembly {
            x := true
        }
    }
}

Reproduction: I set up a Solang compilation and execution environment to test the program.

solang/target/debug/vmRunNoPara test.sol C f

The execution result from solang+svm:

0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

The execution result from solc+evm(remix):

0x0000000000000000000000000000000000000000000000000000000000000001

Subway2023 avatar Feb 11 '25 03:02 Subway2023