[Mono-bugs] [Bug 27977][Wis] New - Comparisons of unsigned integers are not valid
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
18 Jul 2002 20:42:48 -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 sylvain_pasche@yahoo.fr.
http://bugzilla.ximian.com/show_bug.cgi?id=27977
--- shadow/27977 Thu Jul 18 16:42:48 2002
+++ shadow/27977.tmp.5307 Thu Jul 18 16:42:48 2002
@@ -0,0 +1,50 @@
+Bug#: 27977
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: sylvain_pasche@yahoo.fr
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Comparisons of unsigned integers are not valid
+
+Running the following:
+
+using System;
+
+class UnsignedTest {
+ public static void Main() {
+ uint low = 1;
+ uint high = 4294967295;
+ if (low < high)
+ Console.WriteLine("This is Ok");
+ else
+ Console.WriteLine("This is wrong !");
+ }
+
+}
+
+Returns "This is Wrong"
+
+In fact, the assemly produced should use bge.un instead of bge when dealing
+with unsigned integers
+
+The disassembly:
+
+ ldloc.0
+ ldloc.1
+ bge ?L211a
+ ldstr "This is Ok"
+ call void [mscorlib]System.Console::WriteLine(class
+System.String)
+ br ?L2124
+
+What The right output should use bge.un instead of bge (what csc gives)