[Mono-bugs] [Bug 41607][Nor] Changed - MCS miss-compiles switch statements.

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Tue, 22 Apr 2003 12:13:13 -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 miguel@ximian.com.

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

--- shadow/41607	Tue Apr 22 12:01:21 2003
+++ shadow/41607.tmp.12619	Tue Apr 22 12:13:12 2003
@@ -1,22 +1,22 @@
 Bug#: 41607
-Product: Mono/Runtime
+Product: Mono/MCS
 Version: unspecified
 OS: Red Hat 8.0
 OS Details: 
 Status: REOPENED   
 Resolution: 
 Severity: Unknown
-Priority: Critical
-Component: misc
+Priority: Normal
+Component: Misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: ramon_garcia_f@terra.es               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
-Summary: Mini can't compile corlib.dll
+Summary: MCS miss-compiles switch statements.
 
 Mini is not able to compile (that is, ahead of time compile) corlib.dll
 
 Running mini /usr/local/lib/corlib.dll
 
 
@@ -73,6 +73,32 @@
   IL_00a0:  beq        IL_00aa
 /* this jump is wrong! */
   IL_00a5:  br         IL_00ac
   IL_00aa:  ldnull
   IL_00ab:  ret
 } // end of method X501::GetAttributeFromOID
+
+------- Additional Comments From miguel@ximian.com  2003-04-22 12:13 -------
+The folllowing switch statement:
+
+using System;
+class A {
+	static private object GetAttributeFromOID (string attributeType)
+	{
+		switch (attributeType) {
+		case "ST":      // RFC2253
+			return null;
+		case "UID":
+
+		default:
+			return null;
+		}
+	}
+	
+	static void Main ()
+	{
+	}
+}
+
+mini --compile 'A:GetAttributeFromOID' a.exe
+
+This is the "case" falling through to the default case.