diff --git a/src/cgutils.cpp b/src/cgutils.cpp index 998a8421c79f08..9fd7a368faf397 100644 --- a/src/cgutils.cpp +++ b/src/cgutils.cpp @@ -2740,7 +2740,7 @@ static jl_cgval_t emit_getfield_knownidx(jl_codectx_t &ctx, const jl_cgval_t &st else { ptindex = emit_struct_gep(ctx, cast(lt), staddr, byte_offset + fsz1); } - auto val = emit_unionload(ctx, addr, ptindex, jfty, fsz, al, tbaa, !jl_field_isconst(jt, idx), union_max, ctx.tbaa().tbaa_unionselbyte); + auto val = emit_unionload(ctx, addr, ptindex, jfty, fsz, al, tbaa, !jl_field_isconst(jt, idx), union_max, strct.tbaa); if (val.V && val.V != addr) { setNameWithField(ctx.emission_context, val.V, get_objname, jt, idx, Twine()); } diff --git a/test/compiler/codegen.jl b/test/compiler/codegen.jl index a95ef3225c3f33..19321cf9f21a73 100644 --- a/test/compiler/codegen.jl +++ b/test/compiler/codegen.jl @@ -887,3 +887,12 @@ end ex54166 = Union{Missing, Int64}[missing -2; missing -2]; dims54166 = (1,2) @test (minimum(ex54166; dims=dims54166)[1] === missing) + +function foo54599() + pkgid = Base.identify_package("Test") + println(devnull,pkgid) + println(devnull, pkgid.uuid) + pkgid.uuid +end + +@test foo54599() !== nothing