hotspot/test/runtime/LocalLong/LocalLongTest.java
author alanb
Thu, 01 Dec 2016 08:56:41 +0000
changeset 42307 cefc81dc1d52
parent 41082 a0ed7f3b6205
permissions -rw-r--r--
8169069: Module system implementation refresh (11/2016) Reviewed-by: lfoltan, acorn, ctornqvi, mchung Contributed-by: lois.foltan@oracle.com, harold.seigel@oracle.com, alan.bateman@oracle.com, mandy.chung@oracle.com, serguei.spitsyn@oracle.com, george.triantafillou@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
41082
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
     1
/*
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
     2
 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
     4
 *
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
     7
 * published by the Free Software Foundation.
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
     8
 *
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    13
 * accompanied this code).
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    14
 *
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    18
 *
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    21
 * questions.
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    22
 */
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    23
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    24
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    25
/*
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    26
 * @test LocalLongTest
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    27
 * @bug 8163014
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    28
 * @modules java.base/jdk.internal.misc
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    29
 * @library /test/lib
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    30
 * @compile LocalLongHelper.java
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    31
 * @run driver LocalLongTest
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    32
 */
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    33
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    34
import jdk.test.lib.Platform;
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    35
import jdk.test.lib.process.ProcessTools;
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    36
import jdk.test.lib.process.OutputAnalyzer;
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    37
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    38
public class LocalLongTest {
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    39
    public static void main(String... args) throws Exception {
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    40
        if (Platform.is64bit()) {
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    41
            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xint",
42307
cefc81dc1d52 8169069: Module system implementation refresh (11/2016)
alanb
parents: 41082
diff changeset
    42
                                                                      "--add-opens",
cefc81dc1d52 8169069: Module system implementation refresh (11/2016)
alanb
parents: 41082
diff changeset
    43
                                                                      "java.base/java.lang=ALL-UNNAMED",
cefc81dc1d52 8169069: Module system implementation refresh (11/2016)
alanb
parents: 41082
diff changeset
    44
                                                                      "--add-opens",
cefc81dc1d52 8169069: Module system implementation refresh (11/2016)
alanb
parents: 41082
diff changeset
    45
                                                                      "java.base/java.lang.invoke=ALL-UNNAMED",
41082
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    46
                                                                      "LocalLongHelper");
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    47
            OutputAnalyzer o = new OutputAnalyzer(pb.start());
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    48
            o.shouldHaveExitValue(0);
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    49
        }
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    50
    };
a0ed7f3b6205 8163014: Mysterious/wrong value for "long" frame local variable on 64-bit
mockner
parents:
diff changeset
    51
}