Skip to content

Commit be72cbd

Browse files
committed
fix
1 parent 00eddde commit be72cbd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/compiler.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5265,7 +5265,9 @@ end
52655265
any(T2 isa Core.TypeofVararg for T2 in jTy.parameters)
52665266
)
52675267
)
5268-
if offset < sizeof(jTy) && isa(sz, LLVM.ConstantInt) && sizeof(jTy) - offset >= convert(Int, sz)
5268+
5269+
size = Base.datatype_layoutsize(jTy)
5270+
if offset < size && isa(sz, LLVM.ConstantInt) && size - offset >= convert(Int, sz)
52695271
lim = convert(Int, sz)
52705272
md = to_fullmd(jTy, offset, lim)
52715273
@assert byref == GPUCompiler.BITS_REF ||

0 commit comments

Comments
 (0)