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
Open
@UncombedCoconut

Description

@UncombedCoconut

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 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0