hotspot/test/compiler/runtime/6859338/Test6859338.java
author rraghavan
Mon, 09 May 2016 01:21:55 -0700
changeset 38285 20b85a0ba796
parent 37268 b2c690909eea
permissions -rw-r--r--
8153655: Make intrinsics flags diagnostic and update intrinsics tests to enable diagnostic options Summary: converted all intrinsics flags to diagnostic and updated related intrinsics tests to enable diagnostic options Reviewed-by: kvn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3265
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
     1
/*
13963
e5b53c306fb5 7197424: update copyright year to match last edit in jdk8 hotspot repository
mikael
parents: 13728
diff changeset
     2
 * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
3265
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
     4
 *
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
     7
 * published by the Free Software Foundation.
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
     8
 *
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    13
 * accompanied this code).
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    14
 *
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 3265
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 3265
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: 3265
diff changeset
    21
 * questions.
3265
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    22
 *
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    23
 */
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    24
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    25
/**
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    26
 * @test
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    27
 * @bug 6859338
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    28
 * @summary Assertion failure in sharedRuntime.cpp
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    29
 *
38285
20b85a0ba796 8153655: Make intrinsics flags diagnostic and update intrinsics tests to enable diagnostic options
rraghavan
parents: 37268
diff changeset
    30
 * @run main/othervm -Xcomp -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-InlineObjectHash -Xbatch -XX:-ProfileInterpreter Test6859338
3265
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    31
 */
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    32
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    33
public class Test6859338 {
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    34
    static Object[] o = new Object[] { new Object(), null };
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    35
    public static void main(String[] args) {
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    36
        int total = 0;
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    37
        try {
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    38
            // Exercise the implicit null check in the unverified entry point
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    39
            for (int i = 0; i < 40000; i++) {
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    40
                int limit = o.length;
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    41
                if (i < 20000) limit = 1;
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    42
                for (int j = 0; j < limit; j++) {
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    43
                    total += o[j].hashCode();
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    44
                }
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    45
            }
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    46
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    47
        } catch (NullPointerException e) {
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    48
            // this is expected.  A true failure causes a crash
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    49
        }
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    50
    }
d57651294166 6859338: amd64 native unverified entry point pushes values before implicit null check
never
parents:
diff changeset
    51
}