2010-04-09 Rodrigo Kumpera <rkumpera@novell.com>
authorRodrigo Kumpera <kumpera@gmail.com>
Sat, 10 Apr 2010 01:41:16 +0000 (01:41 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Sat, 10 Apr 2010 01:41:16 +0000 (01:41 -0000)
* valid_switch_with_value_on_stack.il: New test.

svn path=/trunk/mono/; revision=155188

mono/tests/verifier/ChangeLog
mono/tests/verifier/valid_switch_with_value_on_stack.il [new file with mode: 0644]

index 57f7b32e02baf95362cfd9525cd4f6cb3b82db9d..f24213abffd027a7458c454dc748528a44c7e9a8 100644 (file)
@@ -1,3 +1,7 @@
+2010-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * valid_switch_with_value_on_stack.il: New test.
+
 2010-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
 
        valid_call_to_virtual_method_on_sealed_class.il: New test.
diff --git a/mono/tests/verifier/valid_switch_with_value_on_stack.il b/mono/tests/verifier/valid_switch_with_value_on_stack.il
new file mode 100644 (file)
index 0000000..9b03152
--- /dev/null
@@ -0,0 +1,47 @@
+.assembly extern mscorlib
+{
+  .ver 2:0:0:0
+  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
+}
+.assembly 'cast'
+{
+  .hash algorithm 0x00008004
+  .ver  0:0:0:0
+}
+.module cast.exe
+
+.class private auto ansi beforefieldinit Driver
+{
+       .method static default void Test ()  cil managed 
+       {
+               ret
+       }
+
+
+       .method private static hidebysig default void Main ()  cil managed 
+       {
+               .entrypoint
+
+               ldc.i4.1
+               ldc.i4.1
+               switch (LB_1)
+
+               ldc.i4.1
+               nop
+               br.s LB_2
+
+LB_1:
+               ldc.i4.2
+               nop
+
+LB_2:
+               pop
+               pop
+               nop
+
+               ret
+       }
+
+
+}
+