Skip to content

LLVM backend hits unreachable lowering pointer to comptime field #12963

Description

@omaraaa

Zig Version

0.10.0-dev.4060+61aaef0b0

Steps to Reproduce

const std = @import("std");

test {
    const T = std.meta.Tuple(&.{struct {}});
    var t: T = undefined;
    inline for (std.meta.fields(T)) |f| {
        var ptr = &@field(t, f.name);
        _ = ptr;
    }
}

Expected Behavior

All 1 tests passed.

Actual Behavior

error: TODO (LLVM): implement const of pointer type '[TODO fix internal compiler bug regarding dump]' (value.Value.Tag.comptime_field_ptr)

Activity

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

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

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions