| 1 |
// This is .NET Intermediate Language |
| 2 |
// Licensed to the .NET Foundation under one or more agreements. |
| 3 |
// The .NET Foundation licenses this file to you under the MIT license. |
| 4 |
|
| 5 |
.assembly extern System.Console |
| 6 |
{ |
| 7 |
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) |
| 8 |
.ver 4:0:0:0 |
| 9 |
} |
| 10 |
.assembly extern mscorlib { } |
| 11 |
.assembly 'devdiv_815942_' {} |
| 12 |
.assembly extern xunit.core {} |
| 13 |
|
| 14 |
.class public Repro |
| 15 |
{ |
| 16 |
.method public static int32 Main() cil managed |
| 17 |
{ |
| 18 |
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( |
| 19 |
01 00 00 00 |
| 20 |
) |
| 21 |
// This testcase ensures that we correctly compare a double local |
| 22 |
// against a float const by converting the float const to double |
| 23 |
// instead of converting the local to float and losing precision |
| 24 |
|
| 25 |
.entrypoint |
| 26 |
.locals init (float64 V_1) |
| 27 |
ldc.i4.1 |
| 28 |
conv.i8 |
| 29 |
call float64 [mscorlib]System.BitConverter::Int64BitsToDouble(int64) |
| 30 |
conv.r8 |
| 31 |
stloc.0 |
| 32 |
ldloc.0 |
| 33 |
ldc.r4 0.0 |
| 34 |
bne.un.s PASS |
| 35 |
ldstr "FAIL!" |
| 36 |
call void [System.Console]System.Console::WriteLine(string) |
| 37 |
ldloc.0 |
| 38 |
call void [System.Console]System.Console::WriteLine(float64) |
| 39 |
ldc.i4.s 101 |
| 40 |
ret |
| 41 |
PASS: |
| 42 |
ldstr "PASS!" |
| 43 |
call void [System.Console]System.Console::WriteLine(string) |
| 44 |
ldc.i4.s 100 |
| 45 |
ret |
| 46 |
} |
| 47 |
} |