diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-18 14:35:34 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-18 14:35:34 +0000 |
commit | 60e144bbfacd7f1106e2819755fd9770fbb9737f (patch) | |
tree | c73cc284818f97538f4bf6a2664bc5fc78178314 /libjava/testsuite/libjava.jni | |
parent | face0cb7d0c9e2ca00257926372f57690f0750dd (diff) | |
download | gcc-60e144bbfacd7f1106e2819755fd9770fbb9737f.tar.gz |
PR libgcj/11951:
* libjava.jni/pr11951.c: New file.
* libjava.jni/pr11951.out: New file.
* libjava.jni/pr11951.java: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70543 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/testsuite/libjava.jni')
-rw-r--r-- | libjava/testsuite/libjava.jni/pr11951.c | 16 | ||||
-rw-r--r-- | libjava/testsuite/libjava.jni/pr11951.java | 14 | ||||
-rw-r--r-- | libjava/testsuite/libjava.jni/pr11951.out | 1 |
3 files changed, 31 insertions, 0 deletions
diff --git a/libjava/testsuite/libjava.jni/pr11951.c b/libjava/testsuite/libjava.jni/pr11951.c new file mode 100644 index 00000000000..4c8ab63f1da --- /dev/null +++ b/libjava/testsuite/libjava.jni/pr11951.c @@ -0,0 +1,16 @@ +#include <stdio.h> +#include <pr11951.h> + +JNIEXPORT void JNICALL +Java_pr11951_nmethod (JNIEnv *env, jclass myclass) +{ + jmethodID method; + jobject r; + + method = (*env)->GetStaticMethodID (env, myclass, "dosomething", + "()Ljava/lang/Object;"); + r = (*env)->CallStaticObjectMethod (env, myclass, method); + printf ("%d\n", r == NULL); + + (*env)->ExceptionClear (env); +} diff --git a/libjava/testsuite/libjava.jni/pr11951.java b/libjava/testsuite/libjava.jni/pr11951.java new file mode 100644 index 00000000000..68a9f0126a3 --- /dev/null +++ b/libjava/testsuite/libjava.jni/pr11951.java @@ -0,0 +1,14 @@ +public class pr11951 +{ + public static Object dosomething() + { + throw new Error(); + } + + public static native void nmethod(); + + public static void main(String[] args) + { + nmethod(); + } +} diff --git a/libjava/testsuite/libjava.jni/pr11951.out b/libjava/testsuite/libjava.jni/pr11951.out new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/libjava/testsuite/libjava.jni/pr11951.out @@ -0,0 +1 @@ +1 |