Skip to content

Commit

Permalink
add a test for #44501
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed May 4, 2022
1 parent 12e3279 commit 444179b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/compiler/codegen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -734,3 +734,23 @@ f_donotdelete_input(x) = Base.donotdelete(x+1)
f_donotdelete_const() = Base.donotdelete(1+1)
@test occursin("call void (...) @jl_f_donotdelete(i64", get_llvm(f_donotdelete_input, Tuple{Int64}, true, false, false))
@test occursin("call void (...) @jl_f_donotdelete()", get_llvm(f_donotdelete_const, Tuple{}, true, false, false))


str_44501 = """
struct a_44501
end
struct b_44501{c}
ch::c
end
children(d) = (d,)
e(i) = children(i)
f = a_44501
g = b_44501(f)
h = g, nothing
[e(d) for d in h if isnothing(d)]
"""

mktemp() do f_44501, _
write(f_44501, str_44501)
@test success(`$(Base.julia_cmd()) --startup-file=no -O0 $f_44501`)
end

0 comments on commit 444179b

Please sign in to comment.