File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -458,6 +458,6 @@ macro ccall(exprs...)
458458 return ccall_macro_lower ((:ccall ), ccall_macro_parse (exprs)... )
459459end
460460
461- macro ccall_effects (effects:: UInt16 , expr )
462- return ccall_macro_lower ((:ccall , effects), ccall_macro_parse (expr )... )
461+ macro ccall_effects (effects:: UInt16 , exprs ... )
462+ return ccall_macro_lower ((:ccall , effects), ccall_macro_parse (exprs )... )
463463end
Original file line number Diff line number Diff line change @@ -1970,14 +1970,15 @@ end
19701970
19711971function gc_safe_ccall ()
19721972 # jl_rand is marked as JL_NOTSAFEPOINT
1973- @ccall gc_safe= true jl_rand ():: UInt64
1973+ Base . @assume_effects :nothrow @ccall gc_safe= true jl_rand ():: UInt64
19741974end
19751975
19761976let llvm = sprint (code_llvm, gc_safe_ccall, ())
19771977 # check that the call works
19781978 @test gc_safe_ccall () isa UInt64
19791979 # check for the gc_safe store
19801980 @test occursin (" store atomic i8 2" , llvm)
1981+ @test Base. infer_effects (gc_safe_ccall, Tuple{}). nothrow == true
19811982end
19821983
19831984@testset " jl_dlfind and dlsym" begin
You can’t perform that action at this time.
0 commit comments