diff options
author | Ziemowit Laski <zlaski@apple.com> | 2005-06-28 02:01:08 +0000 |
---|---|---|
committer | Ziemowit Laski <zlaski@gcc.gnu.org> | 2005-06-28 02:01:08 +0000 |
commit | 2aba33dd6f2d9cf16b2c2e25e73071b5e6d4368c (patch) | |
tree | 4dc299720e3fd440e3139ea0c208910bedcceae5 /gcc/testsuite/objc.dg | |
parent | 0d44cd2c64966f4605d1b0a17d5be994aee11c99 (diff) | |
download | gcc-2aba33dd6f2d9cf16b2c2e25e73071b5e6d4368c.zip gcc-2aba33dd6f2d9cf16b2c2e25e73071b5e6d4368c.tar.gz gcc-2aba33dd6f2d9cf16b2c2e25e73071b5e6d4368c.tar.bz2 |
objc-act.c (objc_build_struct): Save the TYPE_OBJC_INFO portion of TYPE_LANG_SPECIFIC info for all variants of...
[gcc/objc/ChangeLog]
2005-06-27 Ziemowit Laski <zlaski@apple.com>
* objc-act.c (objc_build_struct): Save the TYPE_OBJC_INFO
portion of TYPE_LANG_SPECIFIC info for all variants of
a class before calling finish_struct(), and restore
same TYPE_OBJC_INFO afterwards.
[gcc/testsuite/ChangeLog]
2005-06-27 Ziemowit Laski <zlaski@apple.com>
* obj-c++.dg/proto-lossage-5.mm: New.
* objc.dg/proto-lossage-5.m: New.
From-SVN: r101368
Diffstat (limited to 'gcc/testsuite/objc.dg')
-rw-r--r-- | gcc/testsuite/objc.dg/proto-lossage-5.m | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/proto-lossage-5.m b/gcc/testsuite/objc.dg/proto-lossage-5.m new file mode 100644 index 0000000..35c0956 --- /dev/null +++ b/gcc/testsuite/objc.dg/proto-lossage-5.m @@ -0,0 +1,22 @@ +/* Do not lose references to forward-declared protocols. */ +/* { dg-do compile } */ +@class MyBaseClass; +@class MyClassThatFails; +@protocol _MyProtocol; + +@interface MyClassThatFails +- (MyBaseClass<_MyProtocol> *) aMethod; +@end + +@interface MyBaseClass +@end + +@protocol _MyProtocol +@end + +@implementation MyClassThatFails +- (MyBaseClass<_MyProtocol> *) aMethod +{ + return 0; +} +@end |