* src/vm/jit/arm/codegen.c: removed unused ICMD_GETSTATIC branch
[cacao.git] / tests / regression / jasmin / test_verify_unspecced_ok_backward_with_new_in_local.j
1 .class public test_verify_unspecced_ok_backward_with_new_in_local
2 .super java/lang/Object
3
4 ; The check against backward branches with uninitialized objects is unnecessary
5 ; Reference:
6 ;     Alessandro Coglio
7 ;     Improving the official specification of Java bytecode verification
8 ;     Proceedings of the 3rd ECOOP Workshop on Formal Techniques for Java Programs
9 ;     June 2001
10 ;     citeseer.ist.psu.edu/article/coglio03improving.html
11
12 ; ======================================================================
13
14 .method public <init>()V
15    aload_0
16    invokenonvirtual java/lang/Object/<init>()V
17    return
18 .end method
19
20 ; ======================================================================
21
22 .method public toString()Ljava/lang/String;
23         .limit stack 1
24         .limit locals 1
25
26         ldc "it's me"
27         areturn
28
29 .end method
30
31 ; ======================================================================
32
33 .method public static main([Ljava/lang/String;)V
34         .limit stack 2
35         .limit locals 3
36
37         ldc 1
38         istore 1
39
40 backward:
41         new test_verify_unspecced_ok_backward_with_new_in_local
42         astore 2
43
44         iload 1
45         ifeq backward
46         ; this is ok
47
48         aload 2
49         dup
50         invokespecial test_verify_unspecced_ok_backward_with_new_in_local/<init>()V
51
52         getstatic java/lang/System/out Ljava/io/PrintStream;
53         swap
54         invokevirtual java/io/PrintStream/println(Ljava/lang/Object;)V
55         ; OUTPUT: it's me
56
57         return
58 .end method