From cd0698363989ea9ad0c5546a79820da9e404b170 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 18 Aug 2003 14:35:34 +0000 Subject: [PATCH] re PR libgcj/11951 (natMethod.cc (_Jv_CallAnyMethodA) should clear ffi_result before ffi_call) PR libgcj/11951: * libjava.jni/pr11951.c: New file. * libjava.jni/pr11951.out: New file. * libjava.jni/pr11951.java: New file. From-SVN: r70543 --- libjava/testsuite/ChangeLog | 7 +++++++ libjava/testsuite/libjava.jni/pr11951.c | 16 ++++++++++++++++ libjava/testsuite/libjava.jni/pr11951.java | 14 ++++++++++++++ libjava/testsuite/libjava.jni/pr11951.out | 1 + 4 files changed, 38 insertions(+) create mode 100644 libjava/testsuite/libjava.jni/pr11951.c create mode 100644 libjava/testsuite/libjava.jni/pr11951.java create mode 100644 libjava/testsuite/libjava.jni/pr11951.out diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog index 835092de709..4453f93e383 100644 --- a/libjava/testsuite/ChangeLog +++ b/libjava/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2003-08-18 Tom Tromey + + PR libgcj/11951: + * libjava.jni/pr11951.c: New file. + * libjava.jni/pr11951.out: New file. + * libjava.jni/pr11951.java: New file. + 2003-08-12 Tom Tromey * libjava.jacks/jacks.xfail: Updated to account for new passes. 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 +#include + +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