-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
8
Two JCK tests start failing since jdk8-b103:
lang/STMT/stmt109/stmt10902m15/stmt10902m15.html
lang/STMT/stmt109/stmt10902m20/stmt10902m20.html
Reduced code is:
-------------------
package pack;
import java.io.PrintStream;
public class test {
//-------- Variant: 586 --------------------------------
void break2_inner_sync_block_do (int arg) {
int loc = 0;
label0:
synchronized (new Integer(arg)) {
label1:
{
label2:
do {
break label2;
} while (arg != 0);
}
}
}
//-------- Variant: 578 --------------------------------
void break2_inner_sync_block_block (int arg) {
int loc = 0;
label0:
synchronized (new Integer(arg)) {
label1:
{
label2:
{
break label2;
}
}
}
}
public static void main(String args[]) {
System.exit(run(args, System.out) + 95/*STATUS_TEMP*/);
}
public static int run(String args[],PrintStream out) {
test x = new test();
x.break2_inner_sync_block_do(1);
x.break2_inner_sync_block_block(1);
return 0;/*STATUS_PASSED*/
}
}
-------------------
Generated code (commented is missed compared with b99):
Method break2_inner_sync_block_do:"(I)V"
stack 3 locals 5
{
iconst_0;
istore_2;
new class java/lang/Integer;
dup;
iload_1;
invokespecial Method java/lang/Integer."<init>":"(I)V";
dup;
astore_3;
monitorenter;
// try t0;
aload_3;
monitorexit;
// endtry t0;
// goto L25;
// catch t0 #0;
// catch t1 #0;
// try t1;
// astore 4;
// aload_3;
// monitorexit;
// endtry t1;
// aload 4;
// athrow;
L25: return;
}
lang/STMT/stmt109/stmt10902m15/stmt10902m15.html
lang/STMT/stmt109/stmt10902m20/stmt10902m20.html
Reduced code is:
-------------------
package pack;
import java.io.PrintStream;
public class test {
//-------- Variant: 586 --------------------------------
void break2_inner_sync_block_do (int arg) {
int loc = 0;
label0:
synchronized (new Integer(arg)) {
label1:
{
label2:
do {
break label2;
} while (arg != 0);
}
}
}
//-------- Variant: 578 --------------------------------
void break2_inner_sync_block_block (int arg) {
int loc = 0;
label0:
synchronized (new Integer(arg)) {
label1:
{
label2:
{
break label2;
}
}
}
}
public static void main(String args[]) {
System.exit(run(args, System.out) + 95/*STATUS_TEMP*/);
}
public static int run(String args[],PrintStream out) {
test x = new test();
x.break2_inner_sync_block_do(1);
x.break2_inner_sync_block_block(1);
return 0;/*STATUS_PASSED*/
}
}
-------------------
Generated code (commented is missed compared with b99):
Method break2_inner_sync_block_do:"(I)V"
stack 3 locals 5
{
iconst_0;
istore_2;
new class java/lang/Integer;
dup;
iload_1;
invokespecial Method java/lang/Integer."<init>":"(I)V";
dup;
astore_3;
monitorenter;
// try t0;
aload_3;
monitorexit;
// endtry t0;
// goto L25;
// catch t0 #0;
// catch t1 #0;
// try t1;
// astore 4;
// aload_3;
// monitorexit;
// endtry t1;
// aload 4;
// athrow;
L25: return;
}
- duplicates
-
JDK-8024039 javac, previous solution for JDK-8022186 was incorrect
- Closed
-
JDK-8023538 Two lang/STMT/stmt109 tests fail
- Closed