* roottypes.cs: Rename from tree.cs.
[mono.git] / mono / tests / locallocTest.il
1 //tests localloc by allocating 4 bytes, storing a value, and loading it
2 .assembly extern mscorlib{}
3 .assembly someTest{}
4 .module someTest
5
6 .class private auto ansi someTest
7        extends [mscorlib]System.Object {
8
9   .method public static void  go() cil managed {
10     .entrypoint
11
12         .locals init (native int)
13
14 //allocate
15 ldc.i4.4
16 localloc
17 stloc.0
18
19 //store number
20 ldloc.0
21 ldc.i4 7777777
22 stind.i4
23
24 //load number
25 ldloc.0
26 ldind.i4
27
28 //compare
29 ldc.i4 7777777
30 beq PASS
31
32 FAIL:   ldstr "FAIL"
33         call void [mscorlib]System.Console::WriteLine(string)
34         br END
35
36 PASS:   ldstr "PASS"
37         call void [mscorlib]System.Console::WriteLine(string)
38
39 END:    ret
40   }
41
42
43