re PR java/19921 (wrong argument count for invokeInterface with new multidimensional...
authorTom Tromey <tromey@redhat.com>
Mon, 14 Feb 2005 20:04:36 +0000 (20:04 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Mon, 14 Feb 2005 20:04:36 +0000 (20:04 +0000)
gcc/java:
PR java/19921:
* jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
stack effect of multianewarray.

libjava:
For PR java/19929:
* testsuite/libjava.lang/PR19929.out: New file.
* testsuite/libjava.lang/PR19929.java: New file.

From-SVN: r95041

gcc/java/ChangeLog
gcc/java/jcf-write.c
libjava/ChangeLog
libjava/testsuite/libjava.lang/PR19929.java [new file with mode: 0644]
libjava/testsuite/libjava.lang/PR19929.out [new file with mode: 0644]

index 22f9176b9a61fb80a91a044f082c694827b3194e..02d12c161b9a878788b493d3343828dc951bf620 100644 (file)
@@ -1,3 +1,9 @@
+2005-02-14  Tom Tromey  <tromey@redhat.com>
+
+       PR java/19921:
+       * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
+       stack effect of multianewarray.
+
 2005-02-14  Andrew Haley  <aph@redhat.com>
 
        PR java/19907
index 603eaa51ee951609c566782195db963991905d6d..87790408d137b4cba2249d6620f4f191033a1cc5 100644 (file)
@@ -2572,6 +2572,7 @@ generate_bytecode_insns (tree exp, int target, struct jcf_partial *state)
            OP1 (OPCODE_multianewarray);
            OP2 (index);
            OP1 (ndims);
+           NOTE_POP (ndims - 1);
            break;
          }
        else if (f == soft_anewarray_node)
index 1e727762f7a1d3d17d11abb100aefbfbdf94490c..6c9254bd015b5b8ecacbfef8834d14642176d5e9 100644 (file)
@@ -1,3 +1,9 @@
+2005-02-14  Tom Tromey  <tromey@redhat.com>
+
+       For PR java/19929:
+       * testsuite/libjava.lang/PR19929.out: New file.
+       * testsuite/libjava.lang/PR19929.java: New file.
+
 2005-02-14  Anthony Green  <green@redhat.com>
 
        PR libgcj/18116
diff --git a/libjava/testsuite/libjava.lang/PR19929.java b/libjava/testsuite/libjava.lang/PR19929.java
new file mode 100644 (file)
index 0000000..f1deea2
--- /dev/null
@@ -0,0 +1,11 @@
+interface I {
+    void f(Object x);
+}
+
+class PR19929 {
+    static void g(I i) {
+      // gcj used to create invalid bytecode for this.
+      i.f(new Object[1][1]);
+    }
+  public static void main(String[] args) { }
+}
diff --git a/libjava/testsuite/libjava.lang/PR19929.out b/libjava/testsuite/libjava.lang/PR19929.out
new file mode 100644 (file)
index 0000000..e69de29