1/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
2/* { dg-do compile } */
3
4/* Test case when an accessor from a @property matches a method
5   required by a protocol.  If the @property is @dynamic, then no
6   warning should be generated.  */
7
8#include <objc/objc.h>
9#include <objc/runtime.h>
10#include <stdlib.h>
11
12@protocol Count
13- (int) count;
14@end
15
16@interface MyRootClass <Count>
17{
18  Class isa;
19}
20@property int count;
21@end
22
23@implementation MyRootClass
24/* This @dynamic turns off any warnings for -count and -setCount:.  */
25@dynamic count;
26@end
27