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

Invalid assembly when several globals have the same name #871

Closed
vbgl opened this issue Jul 31, 2024 · 1 comment
Closed

Invalid assembly when several globals have the same name #871

vbgl opened this issue Jul 31, 2024 · 1 comment
Labels
Milestone

Comments

@vbgl
Copy link
Member

vbgl commented Jul 31, 2024

The compiler produces invalid assembly when compiling the following program:

inline fn get(inline u32 i) -> reg u32 {
  reg u32 r;
  global u32 g;
  g = i;
  r = g;
  return r;
}

export
fn main() -> reg u32 {
  reg u32 a b;
  a = get(0xa);
  b = get(0xb);
  b += a;
  return b;
}

Processing the generated assembly yields:

bug_871.s: Assembler messages:
bug_871.s:21: Error: symbol `G$g' is already defined

@vbgl vbgl added the bug label Jul 31, 2024
@vbgl vbgl added this to the 2024.07.1 milestone Sep 4, 2024
@vbgl
Copy link
Member Author

vbgl commented Sep 23, 2024

Fixed by #907.

@vbgl vbgl closed this as completed Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant