Bug in kjc
Patrick Tullmann
tullmann at cs.utah.edu
Thu Feb 10 13:46:55 PST 2000
I sent this in to the KOPI folks, but I haven't heard a peep from
them. As an FYI to other Kaffer's, I present the do-while bug in kjc.
(If you look at the generated bytecode, the 'continue' is jumping to
the top of the loop and not down to the test at the bottom.)
I haven't tried upgrading to the latest KJC.
-Pat
----- ----- ---- --- --- -- - - - - -
Pat Tullmann tullmann at cs.utah.edu
Mean people suck.
public class DoWhileCompilerBug
{
public static String[] getArgs()
{
return null;
}
public static void main(String[] ignoredArgs)
{
int loopct = 0;
String[] args;
System.out.println("Starting...");
do
{
loopct++;
args = getArgs();
if (loopct == 10)
{
System.out.println("BAD NEWS,
BUDDY.");
System.exit(0);
}
if (args == null)
continue;
}
while (args != null);
System.out.println("Done.");
}
}
More information about the kaffe
mailing list