OSDN Git Service

Added.
authorovidiu <ovidiu@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Feb 2001 16:44:36 +0000 (16:44 +0000)
committerovidiu <ovidiu@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Feb 2001 16:44:36 +0000 (16:44 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39459 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/objc/execute/bycopy-1.m [new file with mode: 0644]
gcc/testsuite/objc/execute/bycopy-2.m [new file with mode: 0644]

diff --git a/gcc/testsuite/objc/execute/bycopy-1.m b/gcc/testsuite/objc/execute/bycopy-1.m
new file mode 100644 (file)
index 0000000..83f4b27
--- /dev/null
@@ -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 (file)
index 0000000..dce0281
--- /dev/null
@@ -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);
+}
+
+