CBMC version: 5.35.0 (cbmc-5.35.0-95-ge6f69702f)
Operating system: macOS Big Sur v11.4
Exact command line resulting in the issue:
Though the example in #6242 was fixed, there are still other examples which don't work. I've created a simpler example attached here:
- Input: test.json
- Command:
symtab2gb test.json --out test.goto; goto-instrument --dump-c test.goto > test.c
- Output: test.c
What behaviour did you expect: A valid C program is produced.
What happened instead: The parameter and local variables have the same name, leading to a compilation error:
int main(int x)
{
unsigned int x;
}
If it helps, this was created from the following Rust file using RMC, with manual edits to simplify:
fn help(x: i32) {
let x: i64;
}
fn main() {
help(1);
}