Skip to content

[ICE]: Accessing the array after push causes error #185

@Subway2023

Description

@Subway2023

sold version: sold 0.77.0+commit.32833737.Linux.g++

contract C {
    struct S {
        uint[] x;
    }
    S s;
	constructor() {
		s.x.push();
		s.x.push();
		s.x.push();
		s.x.push();
	}
    function f(bool b) public {
        if (b)
            s.x[2] &= 0;
    }
}
Instruction .FRAGMENT at :123:1: 
  Instruction PUSHCONT at :125:2:     Instruction MODPOW2 at :140:3: Operation parameter arg 0 has the following problem: Parameter value is out of range

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions