summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc/execute/np-2.m
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/objc/execute/np-2.m')
-rw-r--r--gcc/testsuite/objc/execute/np-2.m32
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/objc/execute/np-2.m b/gcc/testsuite/objc/execute/np-2.m
new file mode 100644
index 000000000..da276be98
--- /dev/null
+++ b/gcc/testsuite/objc/execute/np-2.m
@@ -0,0 +1,32 @@
+/*
+ * Contributed by Nicola Pero <n.pero@mi.flashnet.it>
+ * Tue Sep 19 4:34AM
+ */
+#include "../../objc-obj-c++-shared/Protocol1.h"
+#include <objc/objc.h>
+
+@protocol MyProtocol
++ (oneway void) methodA;
+@end
+
+@interface MyObject <MyProtocol>
+@end
+
+@implementation MyObject
++ (oneway void) methodA
+{
+ printf ("methodA\n");
+}
+#ifdef __NEXT_RUNTIME__
++ initialize { return self; }
+#endif
+@end
+
+int main (void)
+{
+ [MyObject methodA];
+
+ exit (0);
+}
+
+