[Mono-bugs] [Bug 42850][Nor] New - MCS Incorrectly handles Decimal constants in multi-bound arrays
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Mon, 12 May 2003 18:25:49 -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 bmaurer@users.sf.net.
http://bugzilla.ximian.com/show_bug.cgi?id=42850
--- shadow/42850 Mon May 12 18:25:49 2003
+++ shadow/42850.tmp.28700 Mon May 12 18:25:49 2003
@@ -0,0 +1,47 @@
+Bug#: 42850
+Product: Mono/MCS
+Version: unspecified
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity: Unknown
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: bmaurer@users.sf.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: MCS Incorrectly handles Decimal constants in multi-bound arrays
+
+Description of Problem:
+The following program gives a different value when it is compiled in mcs
+and run on mono than when it is compiled on csc and run on mono.
+
+using System;
+public class DecimalTest {
+ public static void Main () {
+ decimal [,] dtab = {{1.1m, 0m, 0m}, {0m, 0m, 0m}, {0m, 0m, 0m}};
+ decimal [,] dtab2 = {{1.1m, 0m, 0m}, {0m, 0m, 0m}};
+ Console.WriteLine (1.1m);
+ Console.WriteLine (dtab [0, 0]);
+ Console.WriteLine (dtab2 [0, 0]);
+ }
+}
+
+Actual Results:
+1.1
+281474976710656
+1.1
+
+Expected Results:
+1.1
+1.1
+1.1
+
+
+How often does this happen?
+As shown in the example, the occurence of the bug tends to depend on the
+number of constants in the array.