[Mono-bugs] [Bug 41954][Nor] New - Mini regression.

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Sat, 26 Apr 2003 00:05:05 -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=41954

--- shadow/41954	Sat Apr 26 00:05:05 2003
+++ shadow/41954.tmp.18280	Sat Apr 26 00:05:05 2003
@@ -0,0 +1,81 @@
+Bug#: 41954
+Product: Mono/Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: miguel@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Mini regression.
+
+The following program fails to run on mini, it works on mono and on .NET
+1.0 and 1.1:
+
+// this tests making a pointer to a pointer
+
+using System;
+
+unsafe class Foo
+{
+        public static int Main ()
+        {
+                int a;
+                int *b;
+                int **c;
+
+                a = 42;
+                b = &a;
+                c = &b;
+
+                Console.WriteLine ("*c == b : {0}", *c == b);
+                Console.WriteLine ("**c == a : {0}", **c == a);
+
+                if (*c == b && **c == a)
+                {
+                        Console.WriteLine ("Test passed");
+                        return 0;
+                }
+                else
+                {
+                        Console.WriteLine ("Test failed");
+                        return 1;
+                }
+        }
+}
+
+It complains with:
+** ERROR **: Invalid IL code at IL0011 in 00 .Foo:Main (): IL_0011: ceq       
+
+From:
+    // method line 2
+    .method public static 
+           default int32 Main()  cil managed 
+    {
+        // Method begins at RVA 0x20f4
+        .entrypoint
+        // Code size 91 (0x5b)
+        .maxstack 6
+        .locals init (
+                int32** V_0,
+                int32   V_1,
+                int32*  V_2)
+        IL_0000: ldc.i4.s 0x2a
+        IL_0002: stloc.1 
+        IL_0003: ldloca.s 1
+        IL_0005: stloc.2 
+        IL_0006: ldloca.s 2
+        IL_0008: stloc.0 
+        IL_0009: ldstr "*c == b : {0}"
+        IL_000e: ldloc.0 
+        IL_000f: ldind.ref 
+        IL_0010: ldloc.2 
+        IL_0011: ceq 
+        IL_0013: box [mscorlib]System.Boolean