diff options
author | Tom Tromey <tromey@gcc.gnu.org> | 2004-11-25 03:47:08 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2004-11-25 03:47:08 +0000 |
commit | 367390404d26b7bfc400d77893579e83e2a19fb9 (patch) | |
tree | 477abdf83653e20b0e74447d6ca47eb67b0511b8 /libjava/testsuite | |
parent | ec0641f612862498e829fdaf040a201c0ba68762 (diff) | |
download | gcc-367390404d26b7bfc400d77893579e83e2a19fb9.zip gcc-367390404d26b7bfc400d77893579e83e2a19fb9.tar.gz gcc-367390404d26b7bfc400d77893579e83e2a19fb9.tar.bz2 |
* Merged gcj-abi-2-dev-branch to trunk.
(Actual changes too large to list in the commit message;
see ChangeLog.)
From-SVN: r91270
Diffstat (limited to 'libjava/testsuite')
-rw-r--r-- | libjava/testsuite/Makefile.in | 1 | ||||
-rw-r--r-- | libjava/testsuite/libjava.lang/assign2.java | 21 | ||||
-rw-r--r-- | libjava/testsuite/libjava.lang/assign2.out | 1 | ||||
-rw-r--r-- | libjava/testsuite/libjava.loader/loader.exp | 18 |
4 files changed, 37 insertions, 4 deletions
diff --git a/libjava/testsuite/Makefile.in b/libjava/testsuite/Makefile.in index 2e51cd9..2fe07c8 100644 --- a/libjava/testsuite/Makefile.in +++ b/libjava/testsuite/Makefile.in @@ -134,6 +134,7 @@ LIBGCJTESTSPEC = @LIBGCJTESTSPEC@ LIBGCJ_CFLAGS = @LIBGCJ_CFLAGS@ LIBGCJ_CXXFLAGS = @LIBGCJ_CXXFLAGS@ LIBGCJ_JAVAFLAGS = @LIBGCJ_JAVAFLAGS@ +LIBGCJ_LD_SYMBOLIC = @LIBGCJ_LD_SYMBOLIC@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ diff --git a/libjava/testsuite/libjava.lang/assign2.java b/libjava/testsuite/libjava.lang/assign2.java new file mode 100644 index 0000000..41fdcb5 --- /dev/null +++ b/libjava/testsuite/libjava.lang/assign2.java @@ -0,0 +1,21 @@ +// Test for an array assignment bug we've had. + +public class assign2 +{ + public static Object[][] c () { return new Long[5][5]; } + + public static Object[] d () { return new Integer[3]; } + + public static void main(String[] args) + { + try + { + Object[][] x = c(); + x[0] = d(); + } + catch (ArrayStoreException _) + { + System.out.println("good"); + } + } +} diff --git a/libjava/testsuite/libjava.lang/assign2.out b/libjava/testsuite/libjava.lang/assign2.out new file mode 100644 index 0000000..12799cc --- /dev/null +++ b/libjava/testsuite/libjava.lang/assign2.out @@ -0,0 +1 @@ +good diff --git a/libjava/testsuite/libjava.loader/loader.exp b/libjava/testsuite/libjava.loader/loader.exp index e306a31..86e5181 100644 --- a/libjava/testsuite/libjava.loader/loader.exp +++ b/libjava/testsuite/libjava.loader/loader.exp @@ -1,5 +1,15 @@ # Tests for ClassLoader and native library loader code. +# Compute the correct name for an object file. +# This is an awful hack. +proc gcj_object_file_name {compiler base} { + verbose "OBJECT: compiler = $compiler" + if {[string match *libtool* $compiler]} { + return $base.lo + } + return $base.o +} + # Do all the work for a single JNI test. Return 0 on failure. proc gcj_loader_test_one {srcfile} { global objdir srcdir subdir @@ -9,9 +19,9 @@ proc gcj_loader_test_one {srcfile} { regsub "^.*/(\[^/.\]+)\[.\]\[^/]*$" "$srcfile" "\\1" out set executable "${objdir}/$out.exe" - set errname [file rootname [file tail $srcfile]] - set args [libjava_arguments link] - lappend args "additional_flags=--main=[file rootname [file tail $srcfile]] $srcdir/$subdir/MyLoader.java $objdir/dummy.o" + set errname [file rootname [file tail $srcfile]] + set args [libjava_arguments link] + lappend args "additional_flags=--main=[file rootname [file tail $srcfile]] $srcdir/$subdir/MyLoader.java $objdir/[gcj_object_file_name $args dummy]" set x [libjava_prune_warnings \ [libjava_tcompile $srcfile "$executable" executable $args]] @@ -47,7 +57,7 @@ proc gcj_loader_run {} { set args [libjava_arguments compile] lappend args "additional_flags=--resource $objdir/dummy.class" set x [libjava_prune_warnings \ - [libjava_tcompile "$objdir/dummy.class" "$objdir/dummy.o" object $args]] + [libjava_tcompile "$objdir/dummy.class" "$objdir/[gcj_object_file_name $args dummy]" object $args]] if { $x != "" } { verbose "resource compilation failed: $x" 2 |