@@ -111,6 +111,7 @@ Base.show(io::IO, x::Int24) = print(io, "Int24(", Core.Intrinsics.zext_int(Int,
111111# # Fields
112112
113113@noinline function _test_field_operators (r)
114+ GC. gc (false )
114115 r = r[]
115116 TT = fieldtype (typeof (r), :x )
116117 T = typeof (getfield (r, :x ))
@@ -147,6 +148,7 @@ test_field_operators(ARefxy{Float64}(123_10, 123_20))
147148
148149@noinline function _test_field_orderings (r, x, y)
149150 @nospecialize x y
151+ GC. gc (false )
150152 r = r[]
151153 TT = fieldtype (typeof (r), :x )
152154
@@ -328,8 +330,9 @@ test_field_orderings(ARefxy{Any}(true, false), true, false)
328330test_field_orderings (ARefxy {Union{Nothing,Missing}} (nothing , missing ), nothing , missing )
329331test_field_orderings (ARefxy {Union{Nothing,Int}} (nothing , 123_1 ), nothing , 123_1 )
330332test_field_orderings (Complex {Int128} (10 , 30 ), Complex {Int128} (20 , 40 ))
331- test_field_orderings (Complex {Real} (10 , 30 ), Complex {Real} (20 , 40 ))
333+ test_field_orderings (Complex {Real} (10.5 , 30.5 ), Complex {Real} (20.5 , 40.5 ))
332334test_field_orderings (Complex {Rational{Integer}} (10 , 30 ), Complex {Rational{Integer}} (20 , 40 ))
335+ test_field_orderings (Pair {NTuple{3,Float64},NTuple{3,Real}} ((10.5 ,11.5 ,12.5 ), (30.5 ,40.5 ,50.5 )), Pair {NTuple{3,Float64},NTuple{3,Real}} ((110.5 ,111.5 ,112.5 ), (130.5 ,140.5 ,150.5 )))
333336test_field_orderings (10.0 , 20.0 )
334337test_field_orderings (NaN , Inf )
335338
@@ -705,7 +708,7 @@ test_global_orderings(Any, true, false)
705708test_global_orderings (Union{Nothing,Missing}, nothing , missing )
706709test_global_orderings (Union{Nothing,Int}, nothing , 123_1 )
707710test_global_orderings (Complex{Int128}, Complex {Int128} (10 , 30 ), Complex {Int128} (20 , 40 ))
708- test_global_orderings (Complex{Real}, Complex {Real} (10 , 30 ), Complex {Real} (20 , 40 ))
711+ test_global_orderings (Complex{Real}, Complex {Real} (10.5 , 30.5 ), Complex {Real} (20.5 , 40.5 ))
709712test_global_orderings (Float64, 10.0 , 20.0 )
710713test_global_orderings (Float64, NaN , Inf )
711714
@@ -1024,15 +1027,17 @@ test_memory_operators(Float64)
10241027end
10251028@noinline function test_memory_orderings (T:: Type , x, y)
10261029 @nospecialize
1027- xr = GenericMemoryRef (AtomicMemory {T} (undef, 1 ) )
1028- memoryrefset! (xr, x, :unordered , true ) # @atomic xr[] = x
1029- yr = GenericMemoryRef (Memory {T} (undef, 1 ) )
1030+ xr = GenericMemoryRef (AtomicMemory {T} (undef, 2 ), 2 )
1031+ memoryrefset! (xr, x, :unordered , true ) # @atomic xr[2 ] = x
1032+ yr = GenericMemoryRef (Memory {T} (undef, 2 ), 2 )
10301033 yr[] = y
1034+ GC. gc (false )
10311035 _test_memory_orderings (Ref (xr), Ref (yr), x, y)
1032- xr = GenericMemoryRef (AtomicMemory {T} (undef, 1 ) )
1033- memoryrefset! (xr, x, :unordered , true ) # @atomic xr[] = x
1034- yr = GenericMemoryRef (Memory {T} (undef, 1 ) )
1036+ xr = GenericMemoryRef (AtomicMemory {T} (undef, 2 ), 2 )
1037+ memoryrefset! (xr, x, :unordered , true ) # @atomic xr[2 ] = x
1038+ yr = GenericMemoryRef (Memory {T} (undef, 2 ), 2 )
10351039 yr[] = y
1040+ GC. gc (false )
10361041 _test_memory_orderings (Ref {Any} (xr), Ref {Any} (yr), x, y)
10371042 nothing
10381043end
@@ -1047,7 +1052,8 @@ test_memory_orderings(Any, true, false)
10471052test_memory_orderings (Union{Nothing,Missing}, nothing , missing )
10481053test_memory_orderings (Union{Nothing,Int}, nothing , 123_1 )
10491054test_memory_orderings (Complex {Int128} (10 , 30 ), Complex {Int128} (20 , 40 ))
1050- test_memory_orderings (Complex {Real} (10 , 30 ), Complex {Real} (20 , 40 ))
1055+ test_memory_orderings (Complex {Real} (10.5 , 30.5 ), Complex {Real} (20.5 , 40.5 ))
1056+ test_memory_orderings (Pair {NTuple{3,Float64},NTuple{3,Real}} ((10.5 ,11.5 ,12.5 ), (30.5 ,40.5 ,50.5 )), Pair {NTuple{3,Float64},NTuple{3,Real}} ((110.5 ,111.5 ,112.5 ), (130.5 ,140.5 ,150.5 )))
10511057test_memory_orderings (10.0 , 20.0 )
10521058test_memory_orderings (NaN , Inf )
10531059
0 commit comments