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

[Bug-Candidate]: Call IR operation missing when its result is indexed #1925

Closed
kevinclancy opened this issue May 17, 2023 · 1 comment
Closed
Labels
bug-candidate Bugs reports that are not yet confirmed

Comments

@kevinclancy
Copy link
Contributor

kevinclancy commented May 17, 2023

Describe the issue:

When I index the result of an external call, the generated IR does not create a call operation. The TMP that was supposed to be the lvalue for the high level call is indexed without having been initialized.

This only happens if the call takes at least one argument.

Seems similar to this issue.

Code example to reproduce the issue:

pragma solidity ^0.8.19;

interface ISomeInterface {
    function value(uint z) external returns (uint[] memory);
}

contract Test {

    function test(ISomeInterface a) external {
        uint x = a.value(3)[0];
    }
}

Version:

0.9.3

Relevant log output:

INFO:Printers:Contract ISomeInterface
        Function ISomeInterface.value(uint256) (*)
Contract Test
        Function Test.test(ISomeInterface) (*)
                Expression: x = a.value(3)[0]
                IRs:
                        REF_1(None) -> TMP_0[0]
                        x(uint256) := REF_1(None)
@kevinclancy kevinclancy added the bug-candidate Bugs reports that are not yet confirmed label May 17, 2023
@kevinclancy kevinclancy changed the title [Bug-Candidate]: Call operation missing when its result is indexed [Bug-Candidate]: Call IR operation missing when its result is indexed May 17, 2023
@kevinclancy
Copy link
Contributor Author

Duplicate of #1923

@kevinclancy kevinclancy closed this as not planned Won't fix, can't repro, duplicate, stale May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-candidate Bugs reports that are not yet confirmed
Projects
None yet
Development

No branches or pull requests

1 participant