[Mono-bugs] [Bug 74978][Maj] New - Flow analysis bug in switch statement -- code wrongly marked "unreachable"

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue May 17 13:10:36 EDT 2005


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 rharinath at novell.com.

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

--- shadow/74978	2005-05-17 13:10:36.000000000 -0400
+++ shadow/74978.tmp.18222	2005-05-17 13:10:36.000000000 -0400
@@ -0,0 +1,38 @@
+Bug#: 74978
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: C#
+AssignedTo: martin at ximian.com                            
+ReportedBy: rharinath at novell.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Summary: Flow analysis bug in switch statement -- code wrongly marked "unreachable"
+
+The following testcase illustrates a bug in the flow analysis code.  The
+"WriteLine" line is considered unreachable and eliminated from the
+generated code.
+
+class Test {
+        static void Main ()
+        {
+                int i = 5;
+                switch (i) {
+                case 5:
+                        if (i == 5)
+                                break;
+                        return;
+                default:
+                        return;
+                }
+                System.Console.WriteLine (i);
+        }
+}
+
+(based on a bug report from Brion Vibber)


More information about the mono-bugs mailing list