http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48819

           Summary: [4.7 regression] 350 execution failures in 64-bit
                    libjava testsuite on SPARC
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: r...@gcc.gnu.org
                CC: ebotca...@gcc.gnu.org, rgue...@gcc.gnu.org
              Host: sparc-sun-solaris2.*
            Target: sparc-sun-solaris2.*
             Build: sparc-sun-solaris2.*


Between 20110421 and 20110426, 350 execution failures occured in the 64-bit
libjava testsuite on Solaris 2/SPARC: e.g. libjava.lang/ArrayStore.jar:

* regular output:

java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayStoreException
java.lang.ArrayIndexOutOfBoundsException
foobar

* broken output:

Exception in thread "main" java.lang.NullPointerException
   at ArrayStore.main(ArrayStore.exe)

A reghunt revealed that this was introduced by this patch:

2011-04-22  Richard Guenther  <rguent...@suse.de>

       * tree.c (build_int_cst): Properly create canonicalized integer
       constants.
       (build_int_cst_type): Remove scary comments.

The miscompilation happens in ArrayStore.jar itself:

* If I run the new ArrayStore.exe with the old libgcj.so, the test fails.

* If I run the old ArrayStore.exe with the new libgcj.so, the test passes.

Comparing ArrayStore.s, I find

---
/var/gcc/reghunt/108330/sparc-sun-solaris2.11/libjava/testsuite/ArrayStore.s   
2011-04-29 11:22:09.104007700 +0200
+++ ArrayStore.s    2011-04-29 11:22:40.711673900 +0200
@@ -1181,17 +1181,17 @@ _CD_ArrayStore:
     .xword    _Utf15
     .xword    _Utf14
     .byte    0
-    .byte    3
     .byte    0
-    .byte    4
     .byte    0
     .byte    0
     .byte    0
     .byte    0
     .byte    0
-    .byte    2
     .byte    0
-    .byte    5
+    .byte    0
+    .byte    0
+    .byte    0
+    .byte    0
     .byte    0
     .byte    0
     .byte    0

I'm attaching the two versions of ArrayStore.s

  Rainer

Reply via email to