diff options
author | Richard Stallman <rms@gnu.org> | 1992-11-09 17:42:55 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-11-09 17:42:55 +0000 |
commit | 61fab2368262b163ebb8686c641909f776653c84 (patch) | |
tree | 8d956d7ee9dd23b8ce3e2ca7a55148b0167ab3b9 | |
parent | 233c0fef141de52fc4d61ea3e676771742a5c4eb (diff) | |
download | gcc-61fab2368262b163ebb8686c641909f776653c84.zip gcc-61fab2368262b163ebb8686c641909f776653c84.tar.gz gcc-61fab2368262b163ebb8686c641909f776653c84.tar.bz2 |
(build_message_expr): Don't crash if super_type is 0.
From-SVN: r2723
-rw-r--r-- | gcc/objc/objc-act.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 06e1de7..b5109ea 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -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; |