mcimadamore@253: /* ohair@554: * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. mcimadamore@253: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. mcimadamore@253: * mcimadamore@253: * This code is free software; you can redistribute it and/or modify it mcimadamore@253: * under the terms of the GNU General Public License version 2 only, as mcimadamore@253: * published by the Free Software Foundation. mcimadamore@253: * mcimadamore@253: * This code is distributed in the hope that it will be useful, but WITHOUT mcimadamore@253: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or mcimadamore@253: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License mcimadamore@253: * version 2 for more details (a copy is included in the LICENSE file that mcimadamore@253: * accompanied this code). mcimadamore@253: * mcimadamore@253: * You should have received a copy of the GNU General Public License version mcimadamore@253: * 2 along with this work; if not, write to the Free Software Foundation, mcimadamore@253: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. mcimadamore@253: * ohair@554: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@554: * or visit www.oracle.com if you need additional information or have any ohair@554: * questions. mcimadamore@253: */ mcimadamore@253: mcimadamore@253: /* mcimadamore@253: * @test mcimadamore@253: * @bug 6816548 mcimadamore@253: * @summary Uninitialized register when performing casting + auto(un)boxing mcimadamore@253: * @author mcimadamore mcimadamore@253: */ mcimadamore@253: public class T6816548 { mcimadamore@253: mcimadamore@253: public static void main(String[] args) { mcimadamore@253: testInt(); mcimadamore@253: testShort(); mcimadamore@253: testByte(); mcimadamore@253: testChar(); mcimadamore@253: } mcimadamore@253: mcimadamore@253: public static void testInt() { mcimadamore@253: final int fi = 0; mcimadamore@253: Byte b = fi; mcimadamore@253: Short s = fi; mcimadamore@253: Character c = fi; mcimadamore@253: } mcimadamore@253: mcimadamore@253: public static void testShort() { mcimadamore@253: final short fs = 0; mcimadamore@253: Byte b = fs; mcimadamore@253: Short s = fs; mcimadamore@253: Character c = fs; mcimadamore@253: } mcimadamore@253: mcimadamore@253: public static void testByte() { mcimadamore@253: final byte fb = 0; mcimadamore@253: Byte b = fb; mcimadamore@253: Short s = fb; mcimadamore@253: Character c = fb; mcimadamore@253: } mcimadamore@253: mcimadamore@253: public static void testChar() { mcimadamore@253: final char fc = '0'; mcimadamore@253: Byte b = fc; mcimadamore@253: Short s = fc; mcimadamore@253: Character c = fc; mcimadamore@253: } mcimadamore@253: }