[Mono-bugs] [Bug 79956][Nor] New - Exception: Invalid IL code
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri Nov 17 07:46:16 EST 2006
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by hans at hj-ott.de.
http://bugzilla.ximian.com/show_bug.cgi?id=79956
--- shadow/79956 2006-11-17 07:46:16.000000000 -0500
+++ shadow/79956.tmp.30074 2006-11-17 07:46:16.000000000 -0500
@@ -0,0 +1,85 @@
+Bug#: 79956
+Product: Mono: Runtime
+Version: 1.2
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: JIT
+AssignedTo: lupus at ximian.com
+ReportedBy: hans at hj-ott.de
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Exception: Invalid IL code
+
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+Description of Problem:
+
+I have an application compiled with Microsoft .NET 2.0, but it gives an
+"System.InvalidProgramException: Invalid IL code" when run on Mono
+(1.1.15 as well as 1.2)
+
+Steps to reproduce the problem:
+1.
+Compile following program with Microsoft 2.0:
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ConsoleApplication1
+{
+// public enum TestEnum { one, two, three } // (1)
+ class Parent<T, U>
+ {
+ protected enum TestEnum { one, two, three } // (2)
+ protected TestEnum te;
+ }
+ class Child : Parent<int, int>
+ {
+ public void DoIt()
+ {
+ te = TestEnum.one;
+ Console.WriteLine(te.ToString());
+ }
+ }
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ Child C = new Child();
+ C.DoIt();
+ }
+ }
+}
+
+2.
+3.
+
+Actual Results:
+
+Unhandled Exception: System.InvalidProgramException: Invalid IL code in
+ConsoleApplication1.Child:DoIt (): IL_0002: stfld 0x0a000011
+
+
+ at <0x00000> <unknown method>
+ at ConsoleApplication1.Program.Main (System.String[] args) [0x00000]
+
+
+Expected Results:
+
+
+How often does this happen?
+
+Always.
+
+Additional Information:
+
+The program works if you put line (2) in comment and uncomment line (1).
+It might be a problem with Generics, because it works when Parent has no
+generic type parameters.
More information about the mono-bugs
mailing list