Odin
Odin copied to clipboard
Illegal hardware instruction generated when using labelled breaks and missing return statement
trafficstars
Odin version: dev-2021-12:6ce56080 OS: macOS Monterey 12.0.1 (llvm 13)
Following code compiles (notice missing return statement) but crashes with illegal hardware instruction when run.
package bug
main :: proc() {
s := foo()
}
foo :: proc() -> (result: int) {
loop: for {
break loop
}
}
Adding return at end works, however (even though using named return parameter).
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..