test/tools/javac/T8049305/WrongStackframeGenerationTest2.java

Mon, 26 Oct 2015 13:23:30 -0700

author
asaha
date
Mon, 26 Oct 2015 13:23:30 -0700
changeset 2999
683b3e7e05a7
parent 2541
77e510138519
permissions
-rw-r--r--

Added tag jdk8u76-b00 for changeset 10ffafaf5340

vromero@2541 1 /*
vromero@2541 2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
vromero@2541 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
vromero@2541 4 *
vromero@2541 5 * This code is free software; you can redistribute it and/or modify it
vromero@2541 6 * under the terms of the GNU General Public License version 2 only, as
vromero@2541 7 * published by the Free Software Foundation.
vromero@2541 8 *
vromero@2541 9 * This code is distributed in the hope that it will be useful, but WITHOUT
vromero@2541 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
vromero@2541 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
vromero@2541 12 * version 2 for more details (a copy is included in the LICENSE file that
vromero@2541 13 * accompanied this code).
vromero@2541 14 *
vromero@2541 15 * You should have received a copy of the GNU General Public License version
vromero@2541 16 * 2 along with this work; if not, write to the Free Software Foundation,
vromero@2541 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
vromero@2541 18 *
vromero@2541 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
vromero@2541 20 * or visit www.oracle.com if you need additional information or have any
vromero@2541 21 * questions.
vromero@2541 22 */
vromero@2541 23
vromero@2541 24 /*
vromero@2541 25 * @test
vromero@2541 26 * @bug 8049305
vromero@2541 27 * @summary Verification error due to a bad stackmap frame generated by javac
vromero@2541 28 */
vromero@2541 29
vromero@2541 30 public class WrongStackframeGenerationTest2 {
vromero@2541 31 public static void main(String[] args) {}
vromero@2541 32
vromero@2541 33 static void foo() {
vromero@2541 34 int len;
vromero@2541 35 for (;;) {
vromero@2541 36 try {
vromero@2541 37 len = 1;
vromero@2541 38 break;
vromero@2541 39 } catch (Exception e) {
vromero@2541 40 }
vromero@2541 41 }
vromero@2541 42
vromero@2541 43 try {
vromero@2541 44 if (len == -1) {
vromero@2541 45 len = 0;
vromero@2541 46 }
vromero@2541 47 } finally {
vromero@2541 48 }
vromero@2541 49 }
vromero@2541 50 }

mercurial