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

getAlignmentInfo segfault on union(enum) #713

tiehuis opened this Issue Jan 22, 2018 · 1 comment


None yet
2 participants

tiehuis commented Jan 22, 2018

Latest Zig master, using LLVM-5.0.1.

const PartialInst = union(enum) {

test "a" {
    var r: PartialInst = undefined;


#0  0x00007ffff4bca568 in llvm::DataLayout::getAlignmentInfo(llvm::AlignTypeEnum, unsigned int, bool, llvm::Type*) const () from /usr/lib/
#1  0x0000000000000000 in ?? ()

@tiehuis tiehuis added the bug label Jan 22, 2018

@andrewrk andrewrk added this to the 0.2.0 milestone Jan 22, 2018


This comment has been minimized.


andrewrk commented Jan 22, 2018

Workaround: add a 2nd field to the union.

@andrewrk andrewrk closed this in cacba6f Jan 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment