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

Checksafety imprecise on constant operations #386

Closed
vbgl opened this issue Mar 13, 2023 · 0 comments · Fixed by #387
Closed

Checksafety imprecise on constant operations #386

vbgl opened this issue Mar 13, 2023 · 0 comments · Fixed by #387
Assignees

Comments

@vbgl
Copy link
Member

vbgl commented Mar 13, 2023

The safety checker fails on the following example, whereas it succeeds when the multiplication is replaced by its result.

export fn main(){
  stack u16[3 * 4] a;
  reg u64 i;
  i = 0;
  while (i < 3 * 3) {
    inline int k;
    for k = 0 to 4 {
      a[(int) i] = 0;
      i += 1;
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant