Skip to content

Commit ad54423

Browse files
authored
Correct inlinealloc (#484)
1 parent f50a560 commit ad54423

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/irgen.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,16 @@ if VERSION >= v"1.7.0-DEV.204"
412412
function is_inlinealloc(T::Type)
413413
mayinlinealloc = (T.name.flags >> 2) & 1 == true
414414
# FIXME: To simple
415-
return mayinlinealloc
415+
if mayinlinealloc
416+
if !Base.datatype_pointerfree(T)
417+
t_name(dt::DataType)=dt.name
418+
if t_name(T).n_uninitialized != 0
419+
return false
420+
end
421+
end
422+
return true
423+
end
424+
return false
416425
end
417426
else
418427
function is_inlinealloc(T::Type)

0 commit comments

Comments
 (0)