[Mono-bugs] [Bug 74877][Nor] New - mcs generates invalid IL in presence of unreachable code

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 8 May 2005 22:55:10 -0400 (EDT)


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 gonzalo@ximian.com.

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

--- shadow/74877	2005-05-08 22:55:09.000000000 -0400
+++ shadow/74877.tmp.937	2005-05-08 22:55:09.000000000 -0400
@@ -0,0 +1,30 @@
+Bug#: 74877
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gonzalo@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs generates invalid IL in presence of unreachable code
+
+Compile as mcs -r:System.Web.Services.dll foo2.cs
+foo2.cs(11) warning CS0162: Unreachable code detected
+foo2.cs(15) warning CS0162: Unreachable code detected
+Compilation succeeded - 2 warning(s)
+
+and run.
+
+Actual results:
+** ERROR **: Invalid IL code at IL0041 in X:Main (): IL_0041: nop
+
+Additional information:
+The culprit is the return at the beginning of Main.