[Mono-bugs] [Bug 51805][Wis] New - MCS produces invaled IL code

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 6 Dec 2003 08:29:37 -0500 (EST)


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 pedroabelleira@yahoo.es.

http://bugzilla.ximian.com/show_bug.cgi?id=51805

--- shadow/51805	2003-12-06 08:29:37.000000000 -0500
+++ shadow/51805.tmp.29143	2003-12-06 08:29:37.000000000 -0500
@@ -0,0 +1,40 @@
+Bug#: 51805
+Product: Mono/MCS
+Version: unspecified
+OS: Fedora 1.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: pedroabelleira@yahoo.es               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: MCS produces invaled IL code
+
+When a unconditional return is encountered in code mcs generates a invalid
+IL and the jit is unable to run it. This happens with mono-0.29, I don't
+know about previous versions.
+
+A small testcase is autoexplicative:
+
+
+public class BugReturn {
+        public static void Main() {
+                System.Console.WriteLine("Before return");
+                return;
+                System.Console.WriteLine("After return");
+        }
+}
+
+
+It compiles right, despite of the unconditional return, but when run it
+results in
+
+$ mono bug.exe
+
+** ERROR **: Invalid IL code at IL0015 in .BugReturn:Main (): IL_0015: nop