diff options
author | Tom Tromey <tromey@redhat.com> | 2008-06-14 19:49:45 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2008-06-14 19:49:45 +0000 |
commit | 25e8b6ceb492818d78314bfccd8808556d059761 (patch) | |
tree | 1b7b78c294f2e99523b7b1c7eccf9cca010b57b6 /gcc/java | |
parent | 397fda8004eb8e8391a3fee9e4ee6098ff613be7 (diff) | |
download | gcc-25e8b6ceb492818d78314bfccd8808556d059761.zip gcc-25e8b6ceb492818d78314bfccd8808556d059761.tar.gz gcc-25e8b6ceb492818d78314bfccd8808556d059761.tar.bz2 |
re PR java/36247 (Segfault with -findirect-dispatch and --jni)
PR java/36247:
* class.c (build_class_ref): Initialize this_classdollar when
From-SVN: r136787
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/java/class.c | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 144e25d..943299d 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2008-06-14 Tom Tromey <tromey@redhat.com> + + PR java/36247: + * class.c (build_class_ref): Initialize this_classdollar when + needed. + 2008-05-23 Andrew Haley <aph@redhat.com> * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full diff --git a/gcc/java/class.c b/gcc/java/class.c index 85e37bc..dff75ac 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -1142,7 +1142,13 @@ build_class_ref (tree type) return build_indirect_class_ref (type); if (type == output_class && flag_indirect_classes) - return this_classdollar; + { + /* This can be NULL if we see a JNI stub before we see any + other method. */ + if (! this_classdollar) + this_classdollar = build_classdollar_field (output_class); + return this_classdollar; + } if (TREE_CODE (type) == RECORD_TYPE) return build_static_class_ref (type); |