< prev index next >

test/compiler/c2/Test6930043.java

Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke


  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 /**
  26  * @test
  27  * @bug 6930043
  28  * @summary C2: SIGSEGV in javasoft.sqe.tests.lang.arr017.arr01702.arr01702.loop_forw(II)I
  29  *
  30  * @run main Test6930043
  31  */
  32 
  33 import java.io.PrintStream;
  34 
  35 public class Test6930043 {
  36     int[] a;
  37     int idx;
  38 
  39     public int loop_back(int i, int i_0_) {
  40         int i_1_ = 0;
  41         int[] is = a;
  42         if (is == null) return 0;
  43         for (int i_2_ = i; i_2_ >= i_0_; i_2_--)
  44             i_1_ += is[idx = i_2_];
  45         return i_1_;
  46     }
  47 
  48     public int loop_forw(int start, int end) {
  49         int result = 0;
  50         int[] is = a;
  51         if (is == null) return 0;
  52         for (int index = start; index < end; index++)
  53             result += is[index];




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 /**
  26  * @test
  27  * @bug 6930043
  28  * @summary C2: SIGSEGV in javasoft.sqe.tests.lang.arr017.arr01702.arr01702.loop_forw(II)I
  29  *
  30  * @run main compiler.c2.Test6930043
  31  */
  32 
  33 package compiler.c2;
  34 
  35 public class Test6930043 {
  36     int[] a;
  37     int idx;
  38 
  39     public int loop_back(int i, int i_0_) {
  40         int i_1_ = 0;
  41         int[] is = a;
  42         if (is == null) return 0;
  43         for (int i_2_ = i; i_2_ >= i_0_; i_2_--)
  44             i_1_ += is[idx = i_2_];
  45         return i_1_;
  46     }
  47 
  48     public int loop_forw(int start, int end) {
  49         int result = 0;
  50         int[] is = a;
  51         if (is == null) return 0;
  52         for (int index = start; index < end; index++)
  53             result += is[index];


< prev index next >