Skip to content

Fix kill set construction for RHSs which can branch #2129

@bbannier

Description

@bbannier

Related to short-circuiting, this shouldn't always kill the previous declarations, since it might be context-dependent on whether it gets updated or not in assignment expressions:

function void f(int<64> i) {
    local x = "bad";
    local x2 = (i == 10) || ((x = "good") == "good");
    hilti::print(x);
}

Depending on i, x may end up as good or bad. It looks like x = "bad" is added to the kill set after x2, which would be wrong. Happy to punt that for later, but just pointing it out

Image

Originally posted by @evantypanski in #2126 (comment)

Metadata

Metadata

Assignees

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions