Skip to content

Stage2 specific union segfaults test runner when used in error union or optional #11857

@Vexu

Description

@Vexu
test {
    const U = extern union {
        in6: extern struct {
            family: u16,
            port: u16,
            flowinfo: u32,
            addr: [20]u8,
        },
        un: [110]u8,

        fn foo() !@This() {
            return undefined;
        }
    };
    var a: ?U = .{ .un = [_]u8{0} ** 110 };
    _ = a.?;
}

Metadata

Metadata

Assignees

Labels

backend-llvmThe LLVM backend outputs an LLVM IR Module.bugObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.miscompilationThe compiler reports success but produces semantically incorrect code.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions