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

Issue with variable renaming in macro expansion #803

Closed
marcoeilers opened this issue Jun 12, 2024 · 1 comment
Closed

Issue with variable renaming in macro expansion #803

marcoeilers opened this issue Jun 12, 2024 · 1 comment

Comments

@marcoeilers
Copy link
Contributor

Found by Paul Eibensteiner, the following program should verify, but Viper complains about an undeclared identifier 'var_m2', even though that variable is visible at the call site.

define m1(res) {
  res := var_m2
}

define m2(res) {
  var var_m2: Int

  var v0_1: Int
  {
    m1(v0_1)
  }

  res := var_m2
}

method caller() returns (value: Int)
{
  var res: Int
  {
    m2(res)
  }
  var value2: Int
  {
    m2(res)
  }
  value := res
}
marcoeilers added a commit that referenced this issue Jun 12, 2024
marcoeilers added a commit that referenced this issue Jun 25, 2024
@marcoeilers
Copy link
Contributor Author

Fixed in PR #804

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