< prev index next >

test/compiler/c2/Test7110586.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 7110586
  28  * @summary C2 generates icorrect results
  29  *
  30  * @run main/othervm -Xbatch Test7110586
  31  */
  32 


  33 public class Test7110586 {
  34   static int test1() {
  35     int i = 0;
  36     for ( ; i < 11; i+=1) {}
  37     return i;
  38   }
  39   static int test2() {
  40     int i = 0;
  41     for ( ; i < 11; i+=2) {}
  42     return i;
  43   }
  44   static int test3() {
  45     int i = 0;
  46     for ( ; i < 11; i+=3) {}
  47     return i;
  48   }
  49   static int test11() {
  50     int i = 0;
  51     for ( ; i < 11; i+=11) {}
  52     return i;




  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 7110586
  28  * @summary C2 generates icorrect results
  29  *
  30  * @run main/othervm -Xbatch compiler.c2.Test7110586
  31  */
  32 
  33 package compiler.c2;
  34 
  35 public class Test7110586 {
  36   static int test1() {
  37     int i = 0;
  38     for ( ; i < 11; i+=1) {}
  39     return i;
  40   }
  41   static int test2() {
  42     int i = 0;
  43     for ( ; i < 11; i+=2) {}
  44     return i;
  45   }
  46   static int test3() {
  47     int i = 0;
  48     for ( ; i < 11; i+=3) {}
  49     return i;
  50   }
  51   static int test11() {
  52     int i = 0;
  53     for ( ; i < 11; i+=11) {}
  54     return i;


< prev index next >