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

Bitcast to values represented with LLVM structs cause a compiler crash #116

Open
vdka opened this issue Feb 23, 2018 · 0 comments
Open

Bitcast to values represented with LLVM structs cause a compiler crash #116

vdka opened this issue Feb 23, 2018 · 0 comments
Assignees
Milestone

Comments

@vdka
Copy link
Contributor

vdka commented Feb 23, 2018

Bitcast code needs a re-write. Perhaps casting can be unified in the LLVM backend.
The only difference between cast and bitcast is that bitcast requires equally sized types & Floating Pointer <-> Integer conversions are handled differently.
Note bad IR gen in the following case also:

A :: struct {
    a: rawptr
}
main :: fn() -> void {
    x : rawptr = nil
    a := bitcast(A) x
}
@vdka vdka added this to the BugHunt milestone Feb 23, 2018
@vdka vdka self-assigned this Feb 23, 2018
vdka added a commit that referenced this issue Mar 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant