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

Fatal error in Stack Allocation #878

Open
sarranz opened this issue Aug 15, 2024 · 1 comment
Open

Fatal error in Stack Allocation #878

sarranz opened this issue Aug 15, 2024 · 1 comment
Labels
bug stack-allocation The compiler pass that handles stack & pointers

Comments

@sarranz
Copy link
Collaborator

sarranz commented Aug 15, 2024

This program

export
fn f () -> reg u64 {
  stack u64 s1;
  reg u64 res;

  res = s1;

  return res;
}

gives

Fatal error: exception File "src/intervalGraphColoring.ml", line 43, characters 6-12: Assertion failed

This is compiler/tests/fail/stack_allocation/x86-64/uninit_stack.jazz. I don't think this is the failure we want, and furthermore, I don't think we should be testing this kind of program with no semantics, lest we revive the nosemantics test directory discussion :)

@sarranz sarranz added bug stack-allocation The compiler pass that handles stack & pointers labels Aug 15, 2024
@sarranz
Copy link
Collaborator Author

sarranz commented Aug 15, 2024

An interesting, if irrelevant, remark, is that

export
fn f () -> reg u64 {
  stack u64 s1;
  reg u64 res;

  res = 0;
  res = s1;
  return res;
}

exhibits the same behavior, but

export
fn f () -> reg u64 {
  stack u64 s1;
  reg u64 res;

  res = #MOV(0);
  res = s1;
  return res;
}

compiles just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug stack-allocation The compiler pass that handles stack & pointers
Projects
None yet
Development

No branches or pull requests

1 participant