Skip to content

Commit

Permalink
Add missing decay derived (JuliaLang#41126)
Browse files Browse the repository at this point in the history
Fixes JuliaLang#41124, this was forgotten in JuliaLang#40935.
  • Loading branch information
Keno committed Jun 8, 2021
1 parent 47c7f91 commit 9ac4fe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ccall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9ac4fe7

Please sign in to comment.