3156N/A/*
3156N/A * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
3156N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3156N/A *
3156N/A * This code is free software; you can redistribute it and/or modify it
3156N/A * under the terms of the GNU General Public License version 2 only, as
3156N/A * published by the Free Software Foundation.
3156N/A *
3156N/A * This code is distributed in the hope that it will be useful, but WITHOUT
3156N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3156N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3156N/A * version 2 for more details (a copy is included in the LICENSE file that
3156N/A * accompanied this code).
3156N/A *
3156N/A * You should have received a copy of the GNU General Public License version
3156N/A * 2 along with this work; if not, write to the Free Software Foundation,
3156N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3156N/A *
3156N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3156N/A * or visit www.oracle.com if you need additional information or have any
3156N/A * questions.
3156N/A *
3156N/A */
3156N/A
3156N/A/**
3156N/A * @test
3156N/A * @bug 7090976
3156N/A * @summary Eclipse/CDT causes a JVM crash while indexing C++ code
3156N/A *
3156N/A * @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement Test7090976
3156N/A */
3156N/A
3156N/Apublic class Test7090976 {
3156N/A
3156N/A static interface I1 {
3156N/A public void m1();
3156N/A };
3156N/A
3156N/A static interface I2 {
3156N/A public void m2();
3156N/A };
3156N/A
3156N/A static interface I extends I1,I2 {
3156N/A }
3156N/A
3156N/A static class A implements I1 {
3156N/A int v = 0;
3156N/A int v2;
3156N/A
3156N/A public void m1() {
3156N/A v2 = v;
3156N/A }
3156N/A }
3156N/A
3156N/A static class B implements I2 {
3156N/A Object v = new Object();
3156N/A Object v2;
3156N/A
3156N/A public void m2() {
3156N/A v2 = v;
3156N/A }
3156N/A }
3156N/A
3156N/A private void test(A a)
3156N/A {
3156N/A if (a instanceof I) {
3156N/A I i = (I)a;
3156N/A i.m1();
3156N/A i.m2();
3156N/A }
3156N/A }
3156N/A
3156N/A public static void main(String[] args)
3156N/A {
3156N/A Test7090976 t = new Test7090976();
3156N/A A a = new A();
3156N/A B b = new B();
3156N/A for (int i = 0; i < 10000; i++) {
3156N/A t.test(a);
3156N/A }
3156N/A }
3156N/A}