hotspot/test/compiler/6756768/Test6756768.java
author jgish
Thu, 18 Apr 2013 16:33:11 -0400
changeset 17159 bb566a21b661
parent 5547 f4b087cbb361
permissions -rw-r--r--
8012005: LogManager needs test to ensure stack trace is not being done to find bundle Reviewed-by: mchung
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1612
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
     1
/*
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1612
diff changeset
     2
 * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
1612
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
     4
 *
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
     7
 * published by the Free Software Foundation.
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
     8
 *
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    13
 * accompanied this code).
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    14
 *
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1612
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1612
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1612
diff changeset
    21
 * questions.
1612
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    22
 */
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    23
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    24
/**
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    25
 * @test
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    26
 * @bug 6756768
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    27
 * @summary C1 generates invalid code
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    28
 *
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    29
 * @run main/othervm -Xcomp Test6756768
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    30
 */
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    31
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    32
class Test6756768a
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    33
{
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    34
    static boolean var_1 = true;
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    35
}
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    36
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    37
final class Test6756768b
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    38
{
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    39
    static boolean var_24 = false;
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    40
    static int var_25 = 0;
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    41
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    42
    static boolean var_temp1 = Test6756768a.var_1 = false;
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    43
}
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    44
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    45
public final class Test6756768 extends Test6756768a
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    46
{
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    47
    final static int var = var_1 ^ (Test6756768b.var_24 ? var_1 : var_1) ? Test6756768b.var_25 : 1;
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    48
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    49
    static public void main(String[] args) {
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    50
        if (var != 0) {
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    51
            throw new InternalError("var = " + var);
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    52
        }
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    53
    }
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    54
2488b45ded37 6756768: C1 generates invalid code
never
parents:
diff changeset
    55
}