--- /dev/null 2009-06-02 14:00:02.000000000 -0700 +++ new/test/compiler/6860469/Test.java 2009-07-15 08:52:45.000000000 -0700 @@ -0,0 +1,47 @@ +/** + * @test + * @bug 6860469 + * @summary remix_address_expressions reshapes address expression with bad control + * + * @run main/othervm -Xcomp -XX:CompileOnly=Test.C + */ + +class Test { + + private static final int H = 16; + private static final int F = 9; + + static int[] fl = new int[1 << F]; + + static int C(int ll, int f) { + int max = -1; + int min = H + 1; + + if (ll != 0) { + if (ll < min) { + min = ll; + } + if (ll > max) { + max = ll; + } + } + + if (f > max) { + f = max; + } + if (min > f) { + min = f; + } + + for (int mc = 1 >> max - f; mc <= 0; mc++) { + int i = mc << (32 - f); + fl[i] = max; + } + + return min; + } + + public static void main(String argv[]) { + C(0, 10); + } +}