From: Ovidiu Predescu Date: Mon, 5 Feb 2001 16:44:36 +0000 (+0000) Subject: Added. X-Git-Tag: prereleases/libstdc++-2.92~1125 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=480cd7780df68117dfe6d7fa194932e75575a397;p=thirdparty%2Fgcc.git Added. From-SVN: r39459 --- diff --git a/gcc/testsuite/objc/execute/bycopy-1.m b/gcc/testsuite/objc/execute/bycopy-1.m new file mode 100644 index 000000000000..83f4b270b8fb --- /dev/null +++ b/gcc/testsuite/objc/execute/bycopy-1.m @@ -0,0 +1,20 @@ +/* + * Contributed by Nicola Pero + * Fri Feb 2 11:48:01 GMT 2001 + */ + +#include +#include + +@protocol MyProtocol +- (bycopy id) bycopyMethod; +@end + +int main (void) +{ + [nil bycopyMethod]; + + exit (0); +} + + diff --git a/gcc/testsuite/objc/execute/bycopy-2.m b/gcc/testsuite/objc/execute/bycopy-2.m new file mode 100644 index 000000000000..dce028152a96 --- /dev/null +++ b/gcc/testsuite/objc/execute/bycopy-2.m @@ -0,0 +1,33 @@ +/* + * Contributed by Nicola Pero + * Fri Feb 2 11:48:01 GMT 2001 + */ + +#include +#include +#include + +@protocol MyProtocol ++ (bycopy id) bycopyMethod; +@end + +@interface MyObject : Object +@end + +@implementation MyObject ++ (bycopy id) bycopyMethod +{ + return [MyObject alloc]; +} +@end + +int main (void) +{ + MyObject *object; + + object = [MyObject bycopyMethod]; + + exit (0); +} + +