Goto instruction optimization breaks Cascade and Clepsydra
Status: Inactive
Brought to you by:
vocaro
The javac compiler eliminates the goto instruction in certain circumstances when it isn't necessary. In other cases, the jump target of the goto instruction is not in the expected place due to compiler optimizations. Neither Cascade nor Clepsydra account for these optimizations and produce the wrong output when they are present.
Logged In: YES
user_id=720008
Originator: YES
Here's a test case demonstrating the problem.
if (val > 10)
{
if (val > 15)
val += 43;
else
val += 89;
}
else
{
val += 9;
}
Logged In: YES
user_id=720008
Originator: YES
Here's another test case:
if (val > 10)
{
if (val > 20)
val += 30;
else
{
if (val > 30)
val += 35;
else
val += 36;
}
}
else
{
val += 50;
}
Logged In: YES
user_id=720008
Originator: YES
Here's another test case:
while (val > 10)
{
if (val > 20)
val += 30;
else
val += 35;
}