summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg/naming-5.m
blob: 2e2786c41dee4279d17867b46d89c9ec33ad6e6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* Testing for detecting duplicate ivars. */
/* { dg-do compile } */

typedef struct S { int i; } NSDictionary;

@interface A 
{
    NSDictionary * _userInfo;
    int i1;
    int i2;
    int i3;
    int i4;
    int i5;
    int i6;
    int i7;
}
@end

@interface B : A
{
    NSDictionary * _userInfo;	/* { dg-error "duplicate member" } */
    int ii1;
    int ii2;
    int ii3;
    int ii4;
    int ii5;
    int ii6;
    int ii7;
    NSDictionary * _userInfo;	/* { dg-error "duplicate member" } */
}
@end

@interface C : A
@end

@interface D : C
{
    NSDictionary * _userInfo;   /* { dg-error "duplicate member" } */
    NSDictionary * _userInfo;   /* { dg-error "duplicate member" } */
}	
@end