2005-04-21 Anthony Green <green@redhat.com>
authorgreen <green@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Apr 2005 16:22:33 +0000 (16:22 +0000)
committergreen <green@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Apr 2005 16:22:33 +0000 (16:22 +0000)
        PR libgcj/21115
        * testsuite/libjava.special/special.exp,
        testsuite/libjava.special/pr21115I.java,
        testsuite/libjava.special/pr21115.java,
        testsuite/libjava.special/pr21115.out: New files.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98511 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/testsuite/libjava.special/pr21115.java [new file with mode: 0644]
libjava/testsuite/libjava.special/pr21115.out [new file with mode: 0644]
libjava/testsuite/libjava.special/pr21115I.java [new file with mode: 0644]
libjava/testsuite/libjava.special/special.exp [new file with mode: 0644]

index d031f2b..d861153 100644 (file)
@@ -1,3 +1,11 @@
+2005-04-21  Anthony Green  <green@redhat.com>
+
+       PR libgcj/21115
+       * testsuite/libjava.special/special.exp,
+       testsuite/libjava.special/pr21115I.java,
+       testsuite/libjava.special/pr21115.java,
+       testsuite/libjava.special/pr21115.out: New files.
+
 2005-04-21  Chris Burdess  <dog@gnu.org>
 
        * gnu/java/net/CRLFInputStream.java: Rewrite to return
diff --git a/libjava/testsuite/libjava.special/pr21115.java b/libjava/testsuite/libjava.special/pr21115.java
new file mode 100644 (file)
index 0000000..2e23f27
--- /dev/null
@@ -0,0 +1,34 @@
+public abstract class pr21115
+{
+  public static void main(String[] args) throws Exception
+  {
+    Class c = Class.forName("pr21115I");
+    Object o = c.newInstance();
+    pr21115 t = (pr21115) o;
+    // Try to fill the stack with 0xff.
+    t.test (0xffffffff, 0xffffffff,
+           0xffffffff, 0xffffffff,
+           0xffffffff, 0xffffffff,
+           0xffffffff, 0xffffffff,
+           0xffffffff, 0xffffffff);
+    // Pass a bunch of false (0) values.
+    if (t.test (false, false,
+               false, false,
+               false, false,
+               false, false,
+               false, false))
+      System.out.println ("FAILED - expecting false return value.");
+  }
+
+  public abstract boolean test(boolean a, boolean b,
+                              boolean c, boolean d,
+                              boolean e, boolean f,
+                              boolean g, boolean h,
+                              boolean i, boolean j);
+  
+  public abstract boolean test(int a, int b,
+                              int c, int d,
+                              int e, int f,
+                              int g, int h,
+                              int i, int j);
+}
diff --git a/libjava/testsuite/libjava.special/pr21115.out b/libjava/testsuite/libjava.special/pr21115.out
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/libjava/testsuite/libjava.special/pr21115I.java b/libjava/testsuite/libjava.special/pr21115I.java
new file mode 100644 (file)
index 0000000..17701ac
--- /dev/null
@@ -0,0 +1,20 @@
+public class pr21115I extends pr21115
+{
+  public boolean test(boolean a, boolean b,
+                     boolean c, boolean d,
+                     boolean e, boolean f,
+                     boolean g, boolean h,
+                     boolean i, boolean j)
+  {
+    return a && b && c && d && e && f && g && h && i;
+  }
+  
+  public boolean test(int a, int b,
+                     int c, int d,
+                     int e, int f,
+                     int g, int h,
+                     int i, int j)
+  {
+    return true;
+  }
+}
diff --git a/libjava/testsuite/libjava.special/special.exp b/libjava/testsuite/libjava.special/special.exp
new file mode 100644 (file)
index 0000000..76afd9a
--- /dev/null
@@ -0,0 +1,30 @@
+# Special test cases.  These require tricky build procedures.
+
+proc gcj_special_run {} {
+  global srcdir subdir env
+
+  # ---- PR 21115 -------------------------------------------------------
+
+  if {! [bytecompile_file ${srcdir}/${subdir}/pr21115I.java [pwd]]} {
+    fail "bytecompile ${srcdir}/${subdir}/libjava.special/pr21115I.java"
+    # FIXME - should use `untested' on all remaining tests.
+    # But that is hard.
+    return 0
+  }
+  pass "bytecompile pr21115I.java"
+
+    if {! [gcj_link pr21115 pr21115 [list ${srcdir}/${subdir}/pr21115.java]]} {
+    fail "compiling/linking pr21115.java"
+    # FIXME
+    return 0
+  }
+
+  if {! [gcj_invoke pr21115 ${srcdir}/${subdir}/pr21115.out ""]} {
+    # FIXME
+    return 0
+  }
+
+  return 1
+}
+
+gcj_special_run