[Mono-bugs] [Bug 41196][Nor] New - incorrect code generated with a double == int compare

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Fri, 11 Apr 2003 12:30:15 -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 lupus@ximian.com.

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

--- shadow/41196	Fri Apr 11 12:30:15 2003
+++ shadow/41196.tmp.9116	Fri Apr 11 12:30:15 2003
@@ -0,0 +1,30 @@
+Bug#: 41196
+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 with a double == int compare
+
+The following sample is miscompiled by mcs: the 3 is not converted to double
+before comparing it to a double. There may be other combinations of the bug
+(maybe with float or long).
+class T {
+	static int Main () {
+		double d = 4;
+
+		if (d == 3)
+			return 1;
+		return 0;
+	}
+}