changeset 2514:37e4df3c8952

7042070: Typo in Test6796786.java Summary: The test should compare with -0.0f. Reviewed-by: never, iveresov
author kvn
date Wed, 04 May 2011 22:41:17 -0700
parents dcfb3dede009
children f879eafd5835
files test/compiler/6796786/Test6796786.java
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/test/compiler/6796786/Test6796786.java	Wed May 04 22:31:18 2011 -0700
+++ b/test/compiler/6796786/Test6796786.java	Wed May 04 22:41:17 2011 -0700
@@ -27,18 +27,17 @@
  * @bug 6796786
  * @summary invalid FP identity transform - (a - b) -> b - a
  *
- * @run main Test6796786
+ * @run main/othervm -Xbatch Test6796786
  */
 
 public class Test6796786 {
     static volatile float d1;
     static volatile float d2;
-    static float zero;
 
     public static void main(String[] args) {
         int total = 0;
         for (int i = 0; i < 100000; i++) {
-            if (Float.floatToRawIntBits(- (d1 - d1)) == Float.floatToRawIntBits(0.0f)) {
+            if (Float.floatToRawIntBits(- (d1 - d2)) == Float.floatToRawIntBits(-0.0f)) {
                 total++;
             }
         }