aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/testsuite')
-rw-r--r--libjava/testsuite/libjava.compile/AssertBug.java7
-rw-r--r--libjava/testsuite/libjava.compile/pr15656.java8
-rw-r--r--libjava/testsuite/libjava.compile/pr15656.xfail1
-rw-r--r--libjava/testsuite/libjava.compile/pr17329.java14
-rw-r--r--libjava/testsuite/libjava.compile/pr17500.java28
-rw-r--r--libjava/testsuite/libjava.lang/pr16789.java15
-rw-r--r--libjava/testsuite/libjava.lang/pr16789.out1
7 files changed, 74 insertions, 0 deletions
diff --git a/libjava/testsuite/libjava.compile/AssertBug.java b/libjava/testsuite/libjava.compile/AssertBug.java
new file mode 100644
index 00000000000..3938b11da28
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/AssertBug.java
@@ -0,0 +1,7 @@
+// PR java/16927
+public class AssertBug {
+ public void bug(Integer i) {
+ assert(false):
+ i.toString() + "!";
+ }
+}
diff --git a/libjava/testsuite/libjava.compile/pr15656.java b/libjava/testsuite/libjava.compile/pr15656.java
new file mode 100644
index 00000000000..4076c9f6870
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/pr15656.java
@@ -0,0 +1,8 @@
+// This used to cause a gcj crash in error_if_numeric_overflow.
+
+public class pr15656 {
+ public static void defineClass ()
+ {
+ Object ctor = new Object;
+ }
+}
diff --git a/libjava/testsuite/libjava.compile/pr15656.xfail b/libjava/testsuite/libjava.compile/pr15656.xfail
new file mode 100644
index 00000000000..e3b083b1fa5
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/pr15656.xfail
@@ -0,0 +1 @@
+shouldfail
diff --git a/libjava/testsuite/libjava.compile/pr17329.java b/libjava/testsuite/libjava.compile/pr17329.java
new file mode 100644
index 00000000000..fa31f18a726
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/pr17329.java
@@ -0,0 +1,14 @@
+// gcj had a problem with "SomeClass.field++" when gimplifying.
+
+class helper
+{
+ static int value;
+}
+
+public class pr17329
+{
+ static void doit ()
+ {
+ helper.value += 2;
+ }
+}
diff --git a/libjava/testsuite/libjava.compile/pr17500.java b/libjava/testsuite/libjava.compile/pr17500.java
new file mode 100644
index 00000000000..825133dc1bd
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/pr17500.java
@@ -0,0 +1,28 @@
+// gcj had a problem compiling code where two anonymous classes had
+// captured constructor arguments of the same type but with different
+// names.
+
+public class pr17500
+{
+ public Object m1 (final Object one)
+ {
+ return new Comparable()
+ {
+ public int compareTo(Object other)
+ {
+ return one == other ? 0 : 1;
+ }
+ };
+ }
+
+ public Object m2 (final Object two)
+ {
+ return new Comparable()
+ {
+ public int compareTo(Object other)
+ {
+ return two == other ? 0 : 1;
+ }
+ };
+ }
+}
diff --git a/libjava/testsuite/libjava.lang/pr16789.java b/libjava/testsuite/libjava.lang/pr16789.java
new file mode 100644
index 00000000000..64c43f30417
--- /dev/null
+++ b/libjava/testsuite/libjava.lang/pr16789.java
@@ -0,0 +1,15 @@
+// gcj used to generate incorrect bytecode for
+// staticMethod().staticMethod()
+public class pr16789
+{
+ public void foo()
+ {
+ System.out.println(Thread.currentThread().holdsLock(this));
+ }
+
+ public static void main(String[] args)
+ {
+ new pr16789().foo();
+ }
+}
+
diff --git a/libjava/testsuite/libjava.lang/pr16789.out b/libjava/testsuite/libjava.lang/pr16789.out
new file mode 100644
index 00000000000..c508d5366f7
--- /dev/null
+++ b/libjava/testsuite/libjava.lang/pr16789.out
@@ -0,0 +1 @@
+false