Skip to content

Commit 0dacc69

Browse files
author
oscarddssmith
committed
add test
1 parent 7b39898 commit 0dacc69

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/ccall.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1937,7 +1937,10 @@ end
19371937

19381938
# issue #52025
19391939
@test Base.unsafe_convert(Ptr{Ptr{Cchar}}, Base.cconvert(Ptr{Ptr{Cchar}}, map(pointer, ["ab"]))) isa Ptr{Ptr{Cchar}}
1940-
1940+
#issue #54725
1941+
for A in (reinterpret(UInt, [0]), reshape([0, 0], 1, 2))
1942+
@test pointer(A) == Base.unsafe_convert(Ptr{Cvoid}, A) == Base.unsafe_convert(Ptr{Int}, A)
1943+
end
19411944
# Cglobal with non-static symbols doesn't error
19421945
function cglobal_non_static1()
19431946
sym = (:global_var, libccalltest)

0 commit comments

Comments
 (0)