[Mono-bugs] [Bug 40670][Maj] Changed - mcs generates out of method branch

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Wed, 2 Apr 2003 22:40:56 -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 miguel@ximian.com.

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

--- shadow/40670	Wed Apr  2 11:52:50 2003
+++ shadow/40670.tmp.22550	Wed Apr  2 22:40:56 2003
@@ -10,13 +10,12 @@
 Component: Misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: t7@pobox.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
-Cc: 
 Summary: mcs generates out of method branch
 
 Please fill in this template when reporting a bug, unless you know what you
 are doing.
 Description of Problem:
 
@@ -47,6 +46,37 @@
 (would provide the Accept.exe assembly, but don't know how to attach a file
 to this bug)
 
 ------- Additional Comments From lupus@ximian.com  2003-04-02 11:52 -------
 This is a mcs bug compiling the Lex.Gen:packAccept()
 method in file src/Gen.cs.
+
+------- Additional Comments From miguel@ximian.com  2003-04-02 22:40 -------
+Ok, this is a new breed of bug.  This is a flow analysis bug, here is
+a small test to reproduce it:
+
+using System;
+
+class X {
+
+	static void Main ()
+	{
+		bool x=true;
+		bool y=true;
+		
+		while (true){
+			if (x)
+				break;
+
+			while (y)
+				return;
+		}
+		Console.WriteLine ("Hello");
+	}
+}
+
+That code should print "Hello" on the console, and no warnings should
+be generated.  Currently we generate a warning.
+
+I am CCing Martin.
+
+Miguel.