test/compiler/6700047/Test6700047.java

Thu, 23 Oct 2008 10:13:01 -0700

author
xdono
date
Thu, 23 Oct 2008 10:13:01 -0700
changeset 774
69e855d955f5
parent 686
020a0b730379
child 836
ee8f06bfb27c
permissions
-rw-r--r--

Added tag jdk7-b38 for changeset d9bc824aa078

never@686 1 /*
never@686 2 * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
never@686 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
never@686 4 *
never@686 5 * This code is free software; you can redistribute it and/or modify it
never@686 6 * under the terms of the GNU General Public License version 2 only, as
never@686 7 * published by the Free Software Foundation.
never@686 8 *
never@686 9 * This code is distributed in the hope that it will be useful, but WITHOUT
never@686 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
never@686 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
never@686 12 * version 2 for more details (a copy is included in the LICENSE file that
never@686 13 * accompanied this code).
never@686 14 *
never@686 15 * You should have received a copy of the GNU General Public License version
never@686 16 * 2 along with this work; if not, write to the Free Software Foundation,
never@686 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
never@686 18 *
never@686 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
never@686 20 * CA 95054 USA or visit www.sun.com if you need additional information or
never@686 21 * have any questions.
never@686 22 */
never@686 23
never@686 24 /**
never@686 25 * @test
never@686 26 * @bug 6700047
never@686 27 * @summary C2 failed in idom_no_update
never@686 28 * @run main Test6700047
never@686 29 */
never@686 30
never@686 31 public class Test6700047 {
never@686 32 public static void main(String[] args) {
never@686 33 for (int i = 0; i < 100000; i++) {
never@686 34 intToLeftPaddedAsciiBytes();
never@686 35 }
never@686 36 }
never@686 37
never@686 38 public static int intToLeftPaddedAsciiBytes() {
never@686 39 int offset = 40;
never@686 40 int q;
never@686 41 int r;
never@686 42 int i = 100;
never@686 43 int result = 1;
never@686 44 while (offset > 0) {
never@686 45 q = (i * 52429);
never@686 46 r = i;
never@686 47 offset--;
never@686 48 i = q;
never@686 49 if (i == 0) {
never@686 50 break;
never@686 51 }
never@686 52 }
never@686 53 if (offset > 0) {
never@686 54 for(int j = 0; j < offset; j++) {
never@686 55 result++;
never@686 56 }
never@686 57 }
never@686 58 return result;
never@686 59 }
never@686 60 }

mercurial