Retro68/gcc/libjava/testsuite/libjava.lang/Overflow.java

17 lines
214 B
Java
Raw Normal View History

2012-03-27 23:13:14 +00:00
class Overflow
{
static int test(int x)
{
return (2*x)/2;
}
public static void main(String argv[])
{
int x = Integer.MAX_VALUE;
if (test(x) == x)
throw new RuntimeException ();
}
}