From 33c15d304174d9f05c7944211be5b560427ae8e5 Mon Sep 17 00:00:00 2001 From: Nathan Daly Date: Thu, 21 Mar 2019 21:54:18 -0400 Subject: [PATCH] More tests: can load/store any 0-sized struct --- test/intrinsics.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/intrinsics.jl b/test/intrinsics.jl index 0e8b2ec98fc23..a5f3308c68639 100644 --- a/test/intrinsics.jl +++ b/test/intrinsics.jl @@ -102,4 +102,7 @@ let f = Core.Intrinsics.ashr_int end # issue #29929 -@test unsafe_store!(Ptr{Nothing}(C_NULL), nothing) == Ptr{Nothing}(0) +@test unsafe_store!(Ptr{Nothing}(C_NULL), nothing) === Ptr{Nothing}(0) +@test unsafe_load(Ptr{Nothing}(0)) === nothing +struct GhostStruct end +@test unsafe_load(Ptr{GhostStruct}(rand(Int))) === GhostStruct()