]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR java/36247 (Segfault with -findirect-dispatch and --jni)
authorTom Tromey <tromey@redhat.com>
Sat, 14 Jun 2008 19:49:45 +0000 (19:49 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Sat, 14 Jun 2008 19:49:45 +0000 (19:49 +0000)
PR java/36247:
* class.c (build_class_ref): Initialize this_classdollar when

From-SVN: r136787

gcc/java/ChangeLog
gcc/java/class.c

index 144e25d4c3737bd2cfb207ef04b1507d9e9d4228..943299d5318c0f4077b78b236720a327baa622c4 100644 (file)
@@ -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
index 85e37bc468b3a0e4da780d7013bab566b6b7b4f7..dff75ac9e43eafdd7a03fb2b327873f6ee3a5576 100644 (file)
@@ -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);