test/hotspot/jtreg/compiler/exceptions/TestC1ExceptionHandlersSameBCI.java
author iignatyev
Mon, 18 Feb 2019 09:31:07 -0800
changeset 53791 bec6c8739833
parent 47700 c6d2381c6932
permissions -rw-r--r--
8219157: vm/mlvm/mixed/stress/java/findDeadlock should be problem-listed only on mac Reviewed-by: thartmann
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
47700
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
     1
/*
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
     2
 * Copyright (c) 2017, Red Hat, Inc. All rights reserved.
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
     4
 *
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
     7
 * published by the Free Software Foundation.
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
     8
 *
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    13
 * accompanied this code).
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    14
 *
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    18
 *
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    21
 * questions.
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    22
 */
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    23
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    24
/**
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    25
 * @test
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    26
 * @bug 8188151
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    27
 * @summary assert failure with 2 handlers at same bci
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    28
 * @run main/othervm -XX:-BackgroundCompilation -XX:CompileOnly=TestC1ExceptionHandlersSameBCI::test1 -XX:CompileOnly=TestC1ExceptionHandlersSameBCI::test2 -XX:CompileCommand=dontinline,TestC1ExceptionHandlersSameBCI::not_inline1 -XX:CompileCommand=dontinline,TestC1ExceptionHandlersSameBCI::not_inline2 TestC1ExceptionHandlersSameBCI
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    29
 *
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    30
 */
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    31
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    32
public class TestC1ExceptionHandlersSameBCI {
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    33
    static class Ex1 extends Exception {
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    34
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    35
    }
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    36
    static class Ex2 extends Exception {
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    37
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    38
    }
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    39
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    40
    static void not_inline1() throws Ex1, Ex2 {
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    41
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    42
    }
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    43
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    44
    static void not_inline2(int v) {
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    45
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    46
    }
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    47
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    48
    static void test1() throws Ex1, Ex2 {
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    49
        int i = 0;
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    50
        try {
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    51
            not_inline1();
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    52
            i = 1;
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    53
            not_inline1();
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    54
        } catch (Ex1|Ex2 ex) {
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    55
            not_inline2(i);
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    56
        }
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    57
    }
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    58
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    59
    static void test2() {
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    60
        int i = 0;
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    61
        try {
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    62
            test1();
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    63
            i = 1;
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    64
            test1();
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    65
        } catch (Ex1|Ex2 ex) {
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    66
            not_inline2(i);
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    67
        }
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    68
    }
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    69
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    70
    static public void main(String[] args) {
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    71
        for (int i = 0; i < 5000; i++) {
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    72
            test2();
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    73
        }
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    74
    }
c6d2381c6932 8188151: "assert(entry_for(catch_pco, handler_bcis->at(i), scope_depth)->pco() == handler_pcos->at(i))" failure with C1
roland
parents:
diff changeset
    75
}