From 9ac4fe7cf821fec51082477698552c46b81e11d9 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Tue, 8 Jun 2021 16:45:01 -0400 Subject: [PATCH] Add missing decay derived (#41126) Fixes #41124, this was forgotten in #40935. --- src/ccall.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ccall.cpp b/src/ccall.cpp index bb035c41d8902..15f51cf9d6897 100644 --- a/src/ccall.cpp +++ b/src/ccall.cpp @@ -1714,7 +1714,7 @@ static jl_cgval_t emit_ccall(jl_codectx_t &ctx, jl_value_t **args, size_t nargs) if (val.typ == (jl_value_t*)jl_symbol_type) { JL_GC_POP(); const int hash_offset = offsetof(jl_sym_t, hash); - Value *ph1 = emit_bitcast(ctx, boxed(ctx, val), T_psize); + Value *ph1 = emit_bitcast(ctx, decay_derived(ctx, boxed(ctx, val)), T_psize); Value *ph2 = ctx.builder.CreateInBoundsGEP(ph1, ConstantInt::get(T_size, hash_offset / sizeof(size_t))); LoadInst *hashval = ctx.builder.CreateAlignedLoad(ph2, Align(sizeof(size_t))); tbaa_decorate(tbaa_const, hashval);