1302N/A/*
1472N/A * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
1302N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1302N/A *
1302N/A * This code is free software; you can redistribute it and/or modify it
1302N/A * under the terms of the GNU General Public License version 2 only, as
1302N/A * published by the Free Software Foundation.
1302N/A *
1302N/A * This code is distributed in the hope that it will be useful, but WITHOUT
1302N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1302N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1302N/A * version 2 for more details (a copy is included in the LICENSE file that
1302N/A * accompanied this code).
1302N/A *
1302N/A * You should have received a copy of the GNU General Public License version
1302N/A * 2 along with this work; if not, write to the Free Software Foundation,
1302N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1302N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A * or visit www.oracle.com if you need additional information or have any
1472N/A * questions.
1302N/A */
1302N/A
1302N/A/**
1302N/A * @test
1302N/A * @bug 6935535
1302N/A * @summary String.indexOf() returns incorrect result on x86 with SSE4.2
1302N/A *
1302N/A * @run main/othervm -Xcomp Test
1302N/A */
1302N/A
1302N/Apublic class Test {
1302N/A
1302N/A static int IndexOfTest(String str) {
1302N/A return str.indexOf("1111111111111xx1x");
1302N/A }
1302N/A
1302N/A public static void main(String args[]) {
1302N/A String str = "1111111111111xx1111111111111xx1x";
1302N/A str = str.substring(0, 31);
1302N/A int idx = IndexOfTest(str);
1302N/A System.out.println("IndexOf(" + "1111111111111xx1x" + ") = " + idx + " in " + str);
1302N/A if (idx != -1) {
1302N/A System.exit(97);
1302N/A }
1302N/A }
1302N/A}
1302N/A