mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-19 18:59:50 +08:00
18 lines
305 B
Java
18 lines
305 B
Java
|
// Regression test for gcj crash, when compiled with -O2 on
|
||
|
// i686-pc-linux-gnu.
|
||
|
public class T20020604
|
||
|
{
|
||
|
static double d2 = 0.0;
|
||
|
|
||
|
static Object lockObject = new Object();
|
||
|
|
||
|
public static double f(double d1) {
|
||
|
|
||
|
synchronized (lockObject){
|
||
|
d2 = Math.max(d1, d2);
|
||
|
}
|
||
|
|
||
|
return d2;
|
||
|
}
|
||
|
}
|