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: a variable is assigned twice successively. #4628

Closed
ustchcs-bugfinder opened this issue Aug 12, 2020 · 0 comments
Closed

Bug: a variable is assigned twice successively. #4628

ustchcs-bugfinder opened this issue Aug 12, 2020 · 0 comments

Comments

@ustchcs-bugfinder
Copy link

v = m_uf2.mk_var();

unsigned hoist_rewriter::mk_var(expr* e) {
    unsigned v = 0;
    if (m_expr2var.find(e, v)) {
        return v;
    }
    v = m_uf1.mk_var();                       // v is assigned fore the first time here.
    v = m_uf2.mk_var();                       // v is assigned fore the second time here.
    SASSERT(v == m_var2expr.size());
    m_expr2var.insert(e, v);
    m_var2expr.push_back(e);
    return v;
}

Reported by: USTCHCS Analysis Toolsuite Bugfinder
(bugfinder-2.7: A variable should not be assigned values twice successively.)

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