1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/flow/tests/TestCaseFor.java Wed Apr 27 01:34:52 2016 +0800 1.3 @@ -0,0 +1,27 @@ 1.4 +/* /nodynamiccopyright/ */ 1.5 + 1.6 +public class TestCaseFor { 1.7 + 1.8 + @AliveRange(varName="o", bytecodeStart=10, bytecodeLength=8) 1.9 + @AliveRange(varName="o", bytecodeStart=24, bytecodeLength=1) 1.10 + void m1(String[] args) { 1.11 + Object o; 1.12 + for (int i = 0; i < 5; i++) { 1.13 + o = ""; 1.14 + o.hashCode(); 1.15 + } 1.16 + o = ""; 1.17 + } 1.18 + 1.19 + @AliveRange(varName="o", bytecodeStart=10, bytecodeLength=8) 1.20 + @AliveRange(varName="o", bytecodeStart=24, bytecodeLength=1) 1.21 + void m2(String[] args) { 1.22 + Object o; 1.23 + for (int i = 0; i < 5; i++) { 1.24 + o = ""; 1.25 + o.hashCode(); 1.26 + continue; 1.27 + } 1.28 + o = ""; 1.29 + } 1.30 +}