New test.
[mono.git] / mono / tests / verifier / invalid_backward_branch.il
1 // Invalid CIL which breaks the ECMA-335,III,1.7.5 rule "Backward branch 
2 // constraints". This CIL should be rejected by a conforming CLI verifier 
3 // or runtime without being run.
4
5 .method public static int32 Main() cil managed
6 {
7         .entrypoint
8         .maxstack 1
9         br end
10         branch_target: // Follows unconditional branch, stack empty.
11         ldc.i4.0
12         br branch_target // Stack not empty, invalid.
13         end:
14         ldc.i4.0
15         ret
16 }