Add regression test for bug #10392.
[mono.git] / mono / tests / verifier / valid_stind_ref_with_boxed_value.il
1
2 // valid CIL which breaks the ECMA-335 rules. 
3 // this CIL should fail verification by a conforming CLI verifier.
4
5 .assembly 'valid_bin_cgt_un_null_value_generated'
6 {
7   .hash algorithm 0x00008004
8   .ver  0:0:0:0
9 }
10
11 .class private sequential ansi sealed beforefieldinit MyVT
12         extends [mscorlib]System.Object
13 {
14         .field public valuetype [mscorlib]System.Decimal Value
15 }
16
17
18 .method public static void Test (object &res) cil managed
19 {
20         .maxstack 8
21         ldarg.0
22         ldc.i4.0
23         box [mscorlib]System.Int32
24         stind.ref
25         ret
26 }
27
28 .method public static int32 Main() cil managed
29 {
30         .entrypoint
31         .maxstack 8
32         .locals init (object res)
33         ldloca 0
34         call void Test(object&)
35
36
37         ldc.i4.0
38         ret
39 }