From 480cd7780df68117dfe6d7fa194932e75575a397 Mon Sep 17 00:00:00 2001 From: Ovidiu Predescu Date: Mon, 5 Feb 2001 16:44:36 +0000 Subject: [PATCH] Added. From-SVN: r39459 --- gcc/testsuite/objc/execute/bycopy-1.m | 20 ++++++++++++++++ gcc/testsuite/objc/execute/bycopy-2.m | 33 +++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 gcc/testsuite/objc/execute/bycopy-1.m create mode 100644 gcc/testsuite/objc/execute/bycopy-2.m diff --git a/gcc/testsuite/objc/execute/bycopy-1.m b/gcc/testsuite/objc/execute/bycopy-1.m new file mode 100644 index 00000000000..83f4b270b8f --- /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 00000000000..dce028152a9 --- /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); +} + + -- 2.30.2