summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg/pr18255.m
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/objc.dg/pr18255.m')
-rw-r--r--gcc/testsuite/objc.dg/pr18255.m24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/pr18255.m b/gcc/testsuite/objc.dg/pr18255.m
new file mode 100644
index 000000000..c9bb87c67
--- /dev/null
+++ b/gcc/testsuite/objc.dg/pr18255.m
@@ -0,0 +1,24 @@
+/* This is a test for a GNU Objective-C Runtime library bug. */
+/* { dg-do run } */
+/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */
+
+#include <objc/Protocol.h>
+#include <stdlib.h>
+
+@protocol a
+- aMethod;
+@end
+
+
+@protocol b <a>
+- bMethod;
+@end
+
+
+int main (int argc, char **argv)
+{
+ if ([@protocol(b) descriptionForInstanceMethod: @selector(aMethod)] == NULL)
+ abort ();
+
+ return 0;
+}