OSDN Git Service

(build_message_expr): Don't crash if super_type is 0.
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 Nov 1992 17:42:55 +0000 (17:42 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 Nov 1992 17:42:55 +0000 (17:42 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@2723 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/objc/objc-act.c

index 06e1de7..b5109ea 100644 (file)
@@ -1635,12 +1635,10 @@ check_ivars (inter, imp)
     }
 }
 
-/*
- *     struct objc_super {
- *             id self;
- *             struct objc_class *class;
- *     };
- */
+/* Set super_type to the data type node for struct objc_super *,
+   first defining struct objc_super itself.
+   This needs to be done just once per compilation.  */
+
 static tree
 build_super_template ()
 {
@@ -2695,7 +2693,8 @@ build_message_expr (mess)
 
   /* Determine operation return type.  */
 
-  if (TYPE_MAIN_VARIANT (rtype) == TYPE_MAIN_VARIANT (super_type))
+  if (super_type != 0
+      && TYPE_MAIN_VARIANT (rtype) == TYPE_MAIN_VARIANT (super_type))
     {
       tree iface;