mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
17 lines
214 B
Java
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 ();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|