8000 Loop transformations can bring variable references out of scope · Issue #174 · jameysharp/corrode · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Loop transformations can bring variable references out of scope #174

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

Open
UncombedCoconut opened this issue Jan 15, 2018 · 0 comments
Open

Comm 6679 ents

@UncombedCoconut
Copy link

In this example, "return j" is brought outside the scope where "j" is declared.

Input:
int f() { int i = 1; for (;;) { int j = i; if (i == 5) return j; else i++; } }
Output:
[no_mangle] pub unsafe extern fn f() -> i32 { let mut i : i32 = 1i32; 'loop1: loop { let mut j : i32 = i; if i == 5i32 { break; } i = i + 1; } j }

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
0