Skip to content

Commit fa82f94

Browse files
committed
Fix test/intrinsics.jl when Int = Int32
1 parent e2d3cd9 commit fa82f94

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/intrinsics.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ function f32(sign, exp, sig)
290290
return reinterpret(Float32, UInt32(x))
291291
end
292292
function f64(sign, exp, sig)
293-
x = (sign&1)<<31 | (exp&((1<<11)-1))<<52 | sig&((1<<52)-1)
293+
x = Int64(sign&1)<<31 | Int64(exp&((1<<11)-1))<<52 | sig&((Int64(1)<<52)-1)
294294
return reinterpret(Float64, UInt64(x))
295295
end
296296

@@ -327,10 +327,10 @@ end
327327
@test_intrinsic_pred Core.Intrinsics.fptrunc Float16 NaN isnan
328328
# Quiet NaN
329329
@test_intrinsic_pred Core.Intrinsics.fptrunc Float16 f32(0, 0xff, 1<<22 | 1<<13) isnan
330-
@test_intrinsic_pred Core.Intrinsics.fptrunc Float16 f64(0, 0x7ff, 1<<51 | 1<<42) isnan
330+
@test_intrinsic_pred Core.Intrinsics.fptrunc Float16 f64(0, 0x7ff, Int64(1)<<51 | Int64(1)<<42) isnan
331331
# Signalling NaN that can be propagated to Float16
332332
@test_intrinsic_pred Core.Intrinsics.fptrunc Float16 f32(0, 0xff, 1<<13) isnan
333-
@test_intrinsic_pred Core.Intrinsics.fptrunc Float16 f64(0, 0x7ff, 1<<42) isnan
333+
@test_intrinsic_pred Core.Intrinsics.fptrunc Float16 f64(0, 0x7ff, Int64(1)<<42) isnan
334334
# Signalling NaN that cannot be propagated to Float16
335335
@test_intrinsic_pred Core.Intrinsics.fptrunc Float16 f32(0, 0xff, 1) isnan
336336
@test_intrinsic_pred Core.Intrinsics.fptrunc Float16 f64(0, 0x7ff, 1) isnan

0 commit comments

Comments
 (0)