Don't create a cycle when translating IL `break` to IR. (#14980)
[mono-project.git] / mono / tests / bug-gh-9706.il
blob06f37e034620fc30383b56fa9e41e095d01bb892
1 .assembly extern mscorlib { }
3 .assembly test
5   .hash algorithm 0x00008004
6   .ver 0:0:0:0
9 .class private auto ansi beforefieldinit test.Test extends [mscorlib]System.Object
11         .field private static int32 modreq([mscorlib]System.Runtime.CompilerServices.IsVolatile) non_constant
13         .method private hidebysig specialname rtspecialname static void '.cctor' () cil managed
14         {
15                 .maxstack  8
16                 ldc.i4.0
17                 volatile.
18                 stsfld     int32 modreq([mscorlib]System.Runtime.CompilerServices.IsVolatile) test.Test::non_constant
19                 ret
20         }
22         .method public specialname rtspecialname instance default void '.ctor' () cil managed
23         {
24                 .maxstack 8
25                 ldarg.0
26                 call instance void object::'.ctor'()
27                 ret
28         }
30         // If this test succeeds, it should run to completion.
31         // If it fails, mono will hang in an infinite loop while doing DCE.
32         .method public static hidebysig default void Main () cil managed
33         {
34                 .maxstack 8
35                 .entrypoint
36                 volatile.
37                 ldsfld int32 modreq([mscorlib]System.Runtime.CompilerServices.IsVolatile) test.Test::non_constant
38                 ldc.i4.0
39                 cgt
40                 brfalse.s end
41                 break // Should not be executed; merely needs to be present in the instruction stream.
42                 end:
43                 ret
44         }