Retro68/gcc/libjava/testsuite/libjava.lang/Overflow.java
Wolfgang Thaller aaf905ce07 add gcc 4.70
2012-03-28 01:13:14 +02:00

17 lines
214 B
Java

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 ();
}
}