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

compiler assertion failure on empty union and switch statement #1435

Closed
awwdev opened this issue Jan 19, 2022 · 2 comments
Closed

compiler assertion failure on empty union and switch statement #1435

awwdev opened this issue Jan 19, 2022 · 2 comments
Labels

Comments

@awwdev
Copy link
Member

awwdev commented Jan 19, 2022

Context

Odin: dev-2022-01:2b918ada
The compiler flag check will not produce the compiler assertion. You need to use build (or run).

Current Behavior

u: union {}
switch t in u {
    case: 
}

Odin\src\llvm_backend_general.cpp(1139): Assertion Failure: type_size_of(ut) > 0
Possibly related #1105 (also includes the question if empty unions should be allowed or not)

Expected Behavior

Compilation without problems.

@github-actions
Copy link

Hello!

I am marking this issue as stale as it has not received any engagement from the community or maintainers 120 days. That does not imply that the issue has no merit! If you feel strongly about this issue

  • open a PR referencing and resolving the issue;
  • leave a comment on it and discuss ideas how you could contribute towards resolving it;
  • leave a comment and describe in detail why this issue is critical for your use case;
  • open a new issue with updated details and a plan on resolving the issue.

The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone..

@awwdev
Copy link
Member Author

awwdev commented Sep 17, 2022

Still happens on version dev-2022-09:98420192.

src/llvm_backend_general.cpp(1250): Assertion Failure: type_size_of(ut) > 0

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

2 participants