[Mono-bugs] [Bug 36251][Nor] New - Incorrect code generated for infinite for loop

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
3 Jan 2003 10:04:44 -0000


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

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

--- shadow/36251	Fri Jan  3 05:04:44 2003
+++ shadow/36251.tmp.16156	Fri Jan  3 05:04:44 2003
@@ -0,0 +1,35 @@
+Bug#: 36251
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lupus@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Incorrect code generated for infinite for loop
+
+The following sample is compiled wrong by mcs:
+using System;
+
+struct Tester {
+   public static void Main ()
+   {
+       for (int i = 0; true; i++)
+           Console.Out.WriteLine (i);
+   }
+}
+The end of the method is:
+	IL_0018: ldc.i4.1 
+	IL_0019: brtrue IL_0007
+
+    } // end of method default void Main() 
+
+Note that there is no code for the false path of the brtrue.