[Mono-bugs] [Bug 44291][Nor] New - arithmetic problem with --optimize=intrins

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Sat, 7 Jun 2003 13:53:14 -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 vargaz@freemail.hu.

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

--- shadow/44291	Sat Jun  7 13:53:14 2003
+++ shadow/44291.tmp.26626	Sat Jun  7 13:53:14 2003
@@ -0,0 +1,39 @@
+Bug#: 44291
+Product: Mono/Runtime
+Version: unspecified
+OS: Debian Potato
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: vargaz@freemail.hu               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: arithmetic problem with --optimize=intrins
+
+Hi,
+
+ The following code produces incorrect results with latest Mono CVS:
+
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+using System;
+
+class Proba {
+
+	public static long foo (int a, int b, int c) {
+		return (long) a * (long) b + (long) c;
+	}
+
+	public static void Main () {
+		Console.WriteLine (foo (1, -3, 5));
+	}
+}
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+When running it with --optimize=-intrins, it runs fine.