aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.compile/T20020604.java
blob: fba68c20c487be42c546b1edee37323c808e734c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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;
  }
}