[Mono-bugs] [Bug 383993] New: invalid IL generated for comparison of enum with null
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Apr 25 18:37:04 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=383993
Summary: invalid IL generated for comparison of enum with null
Product: Mono: Compilers
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: mhabersack at novell.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=210621)
--> (https://bugzilla.novell.com/attachment.cgi?id=210621)
enum_null_comparison_bad_il.diff
After applying the attached diff to the trunk corlib, the test case (svn)
gert/standalone/bug323430 fails with the following message:
Unhandled Exception: System.InvalidProgramException: Invalid IL code in
System.IO.MonoIO:SetFileTime
(string,int,long,long,long,System.DateTime,System.IO.MonoIOError&): IL_0094:
ceq
The IL generated for the method is:
// method line 7783
.method public static hidebysig
default bool SetFileTime (string path, int32 'type', int64
creation_time, int64 last_access_time, int64 last_write_time, valuetype
System.DateTime dateTime, [out
] valuetype System.IO.MonoIOError& 'error') cil managed
{
// Method begins at RVA 0x6f71c
// Code size 202 (0xca)
.maxstack 24
.locals init (
native int V_0,
bool V_1,
valuetype System.IO.MonoIOError V_2,
int32 V_3)
IL_0000: ldstr "MonoIO.SetFileTime (\"{0}\")"
IL_0005: ldarg.0
IL_0006: call void class System.Console::WriteLine(string, object)
IL_000b: ldarg.0
IL_000c: ldc.i4.3
IL_000d: ldc.i4.3
IL_000e: ldc.i4.3
IL_000f: ldc.i4.0
IL_0010: ldarg.s 6
IL_0012: call native int class System.IO.MonoIO::Open(string,
valuetype System.IO.FileMode, valuetype System.IO.FileAccess, valuetype
System.IO.FileShare, valuetype System.IO.FileOptions, [out] valuetype
System.IO.MonoIOError&)
IL_0017: stloc.0
IL_0018: ldloc.0
IL_0019: ldsfld native int System.IO.MonoIO::InvalidHandle
IL_001e: call bool native int::op_Equality(native int, native int)
IL_0023: brfalse IL_0034
IL_0028: ldstr "\topen failed"
IL_002d: call void class System.Console::WriteLine(string)
IL_0032: ldc.i4.0
IL_0033: ret
IL_0034: ldarg.1
IL_0035: stloc.3
IL_0036: ldloc.3
IL_0037: ldc.i4.1
IL_0038: sub
IL_0039: switch (
IL_004f,
IL_005d,
IL_006b)
IL_004a: br IL_0079
IL_004f: ldarga.s 5
IL_0051: call instance int64 valuetype System.DateTime::ToFileTime()
IL_0056: starg.s 2
IL_0058: br IL_0079
IL_005d: ldarga.s 5
IL_005f: call instance int64 valuetype System.DateTime::ToFileTime()
IL_0064: starg.s 3
IL_0066: br IL_0079
IL_006b: ldarga.s 5
IL_006d: call instance int64 valuetype System.DateTime::ToFileTime()
IL_0072: starg.s 4
IL_0074: br IL_0079
IL_0079: ldloc.0
IL_007a: ldarg.2
IL_007b: ldarg.3
IL_007c: ldarg.s 4
IL_007e: ldarg.s 6
IL_0080: call bool class System.IO.MonoIO::SetFileTime(native int,
int64, int64, int64, [out] valuetype System.IO.MonoIOError&)
IL_0085: stloc.1
IL_0086: ldstr "\tafter SetFileTime (error == {0})"
IL_008b: ldarg.s 6
IL_008d: ldind.i4
IL_008e: ldarg.s 6
IL_0090: ldind.i4
IL_0091: bne.un.s IL_0098
IL_0093: ldc.i4.0
IL_0094: ceq
IL_0096: br.s IL_0099
IL_0098: ldc.i4.1
IL_0099: brfalse IL_00b5
IL_009e: ldarg.s 6
IL_00a0: ldind.i4
IL_00a1: box System.IO.MonoIOError
IL_00a6: call instance class System.Type object::GetType()
IL_00ab: callvirt instance string class System.Type::ToString()
IL_00b0: br IL_00ba
IL_00b5: ldstr "[null]"
IL_00ba: call void class System.Console::WriteLine(string, object)
IL_00bf: ldloc.0
IL_00c0: ldloca.s 2
IL_00c2: call bool class System.IO.MonoIO::Close(native int, [out]
valuetype System.IO.MonoIOError&)
IL_00c7: pop
IL_00c8: ldloc.1
IL_00c9: ret
} // end of method MonoIO::SetFileTime
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list