OSDN Git Service

2011-01-08 Dominique d'Humieres <dominiq@lps.ens.fr>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / objc.dg / pr18255.m
1 /* This is a test for a GNU Objective-C Runtime library bug.  */
2 /* { dg-do run } */
3 /* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */
4
5 #include <objc/Protocol.h>
6 #include <stdlib.h>
7
8 @protocol a
9 - aMethod;
10 @end
11
12
13 @protocol b <a>
14 - bMethod;
15 @end
16
17
18 int main (int argc, char **argv)
19 {
20   if ([@protocol(b) descriptionForInstanceMethod: @selector(aMethod)] == NULL)
21     abort ();
22
23   return 0;
24 }