aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorOvidiu Predescu <ovidiu@gcc.gnu.org>2001-02-05 16:44:36 +0000
committerOvidiu Predescu <ovidiu@gcc.gnu.org>2001-02-05 16:44:36 +0000
commit480cd7780df68117dfe6d7fa194932e75575a397 (patch)
tree0236eb2da1f1b3011ae099c304c37fe323b90ad4 /gcc
parentb9c4543ff789c223cb3554c3dd6b1ffede72197b (diff)
downloadgcc-480cd7780df68117dfe6d7fa194932e75575a397.zip
gcc-480cd7780df68117dfe6d7fa194932e75575a397.tar.gz
gcc-480cd7780df68117dfe6d7fa194932e75575a397.tar.bz2
Added.
From-SVN: r39459
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/objc/execute/bycopy-1.m20
-rw-r--r--gcc/testsuite/objc/execute/bycopy-2.m33
2 files changed, 53 insertions, 0 deletions
diff --git a/gcc/testsuite/objc/execute/bycopy-1.m b/gcc/testsuite/objc/execute/bycopy-1.m
new file mode 100644
index 0000000..83f4b27
--- /dev/null
+++ b/gcc/testsuite/objc/execute/bycopy-1.m
@@ -0,0 +1,20 @@
+/*
+ * Contributed by Nicola Pero <nicola@brainstorm.co.uk>
+ * Fri Feb 2 11:48:01 GMT 2001
+ */
+
+#include <objc/objc.h>
+#include <objc/Protocol.h>
+
+@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 0000000..dce0281
--- /dev/null
+++ b/gcc/testsuite/objc/execute/bycopy-2.m
@@ -0,0 +1,33 @@
+/*
+ * Contributed by Nicola Pero <nicola@brainstorm.co.uk>
+ * Fri Feb 2 11:48:01 GMT 2001
+ */
+
+#include <objc/objc.h>
+#include <objc/Object.h>
+#include <objc/Protocol.h>
+
+@protocol MyProtocol
++ (bycopy id<MyProtocol>) bycopyMethod;
+@end
+
+@interface MyObject : Object <MyProtocol>
+@end
+
+@implementation MyObject
++ (bycopy id<MyProtocol>) bycopyMethod
+{
+ return [MyObject alloc];
+}
+@end
+
+int main (void)
+{
+ MyObject *object;
+
+ object = [MyObject bycopyMethod];
+
+ exit (0);
+}
+
+