1.1 --- a/src/share/classes/com/sun/tools/javac/jvm/Gen.java Tue Aug 26 11:15:28 2014 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/Gen.java Wed Jul 16 10:47:56 2014 -0400 1.3 @@ -1194,7 +1194,7 @@ 1.4 boolean testFirst) { 1.5 Env<GenContext> loopEnv = env.dup(loop, new GenContext()); 1.6 int startpc = code.entryPoint(); 1.7 - if (testFirst) { 1.8 + if (testFirst) { //while or for loop 1.9 CondItem c; 1.10 if (cond != null) { 1.11 code.statBegin(cond.pos); 1.12 @@ -1240,6 +1240,9 @@ 1.13 code.resolve(c.falseJumps); 1.14 } 1.15 code.resolve(loopEnv.info.exit); 1.16 + if (loopEnv.info.exit != null) { 1.17 + loopEnv.info.exit.state.defined.excludeFrom(code.nextreg); 1.18 + } 1.19 } 1.20 1.21 private enum LoopLocalVarRangeEndingPoint {