Skip to content

Liveness analysis failure #24127

Open
Open
@xtexx

Description

@xtexx

Zig Version

cffa98e (std.fmt.parseFloat: fix hex-float negative inf, 2025-06-08)

Steps to Reproduce and Observed Behavior

Build the repro:

const S = union {
    a: struct { u12 },
    inline fn makeA() S {
        return .{ .a = .{12} };
    }
};

export fn repro() void {
    for (0..3) |_| _ = S.makeA();
}

Then the compiler crashes at liveness analysis.

The un-reduced code is at xtexx@f6e7e08 (bisection confirmed it is the first bad commit).

Expected Behavior

It should compile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions