Replace absolute linenrs in objc.dg,obj-c++.dg
2017-04-28 Tom de Vries <tom@codesourcery.com> PR testsuite/80557 * obj-c++.dg/bitfield-1.mm: Replace absolute linenrs. * obj-c++.dg/bitfield-4.mm: Same. * obj-c++.dg/bitfield-5.mm: Same. * obj-c++.dg/exceptions-3.mm: Same. * obj-c++.dg/exceptions-5.mm: Same. * obj-c++.dg/method-1.mm: Same. * obj-c++.dg/method-12.mm: Same. * obj-c++.dg/method-13.mm: Same. * obj-c++.dg/method-15.mm: Same. * obj-c++.dg/method-16.mm: Same. * obj-c++.dg/property/at-property-18.mm: Same. * obj-c++.dg/property/at-property-25.mm: Same. * obj-c++.dg/property/at-property-5.mm: Same. * obj-c++.dg/property/dynamic-2.mm: Same. * obj-c++.dg/property/property-neg-3.mm: Same. * obj-c++.dg/protocol-inheritance-1.mm: Same. * obj-c++.dg/protocol-inheritance-2.mm: Same. * obj-c++.dg/syntax-error-1.mm: Same. * obj-c++.dg/try-catch-13.mm: Same. * objc.dg/bitfield-4.m: Same. * objc.dg/class-1.m: Same. * objc.dg/method-11.m: Same. * objc.dg/method-6.m: Same. * objc.dg/method-7.m: Same. * objc.dg/method-9.m: Same. * objc.dg/missing-proto-3.m: Same. * objc.dg/naming-2.m: Same. * objc.dg/property/at-property-16.m: Same. * objc.dg/property/at-property-18.m: Same. * objc.dg/property/at-property-25.m: Same. * objc.dg/property/at-property-5.m: Same. * objc.dg/property/dynamic-2.m: Same. * objc.dg/property/property-neg-3.m: Same. * objc.dg/protocol-inheritance-1.m: Same. * objc.dg/protocol-inheritance-2.m: Same. From-SVN: r247399
This commit is contained in:
parent
d35256b6c1
commit
b5be38bc30
@ -1,3 +1,42 @@
|
||||
2017-04-28 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
PR testsuite/80557
|
||||
* obj-c++.dg/bitfield-1.mm: Replace absolute linenrs.
|
||||
* obj-c++.dg/bitfield-4.mm: Same.
|
||||
* obj-c++.dg/bitfield-5.mm: Same.
|
||||
* obj-c++.dg/exceptions-3.mm: Same.
|
||||
* obj-c++.dg/exceptions-5.mm: Same.
|
||||
* obj-c++.dg/method-1.mm: Same.
|
||||
* obj-c++.dg/method-12.mm: Same.
|
||||
* obj-c++.dg/method-13.mm: Same.
|
||||
* obj-c++.dg/method-15.mm: Same.
|
||||
* obj-c++.dg/method-16.mm: Same.
|
||||
* obj-c++.dg/property/at-property-18.mm: Same.
|
||||
* obj-c++.dg/property/at-property-25.mm: Same.
|
||||
* obj-c++.dg/property/at-property-5.mm: Same.
|
||||
* obj-c++.dg/property/dynamic-2.mm: Same.
|
||||
* obj-c++.dg/property/property-neg-3.mm: Same.
|
||||
* obj-c++.dg/protocol-inheritance-1.mm: Same.
|
||||
* obj-c++.dg/protocol-inheritance-2.mm: Same.
|
||||
* obj-c++.dg/syntax-error-1.mm: Same.
|
||||
* obj-c++.dg/try-catch-13.mm: Same.
|
||||
* objc.dg/bitfield-4.m: Same.
|
||||
* objc.dg/class-1.m: Same.
|
||||
* objc.dg/method-11.m: Same.
|
||||
* objc.dg/method-6.m: Same.
|
||||
* objc.dg/method-7.m: Same.
|
||||
* objc.dg/method-9.m: Same.
|
||||
* objc.dg/missing-proto-3.m: Same.
|
||||
* objc.dg/naming-2.m: Same.
|
||||
* objc.dg/property/at-property-16.m: Same.
|
||||
* objc.dg/property/at-property-18.m: Same.
|
||||
* objc.dg/property/at-property-25.m: Same.
|
||||
* objc.dg/property/at-property-5.m: Same.
|
||||
* objc.dg/property/dynamic-2.m: Same.
|
||||
* objc.dg/property/property-neg-3.m: Same.
|
||||
* objc.dg/protocol-inheritance-1.m: Same.
|
||||
* objc.dg/protocol-inheritance-2.m: Same.
|
||||
|
||||
2017-04-28 Marc Glisse <marc.glisse@inria.fr>
|
||||
|
||||
* gcc.dg/tree-ssa/cmpexactdiv-2.c: Update for X-Z OP Y-Z.
|
||||
|
@ -39,10 +39,10 @@ struct Base_0 { /* { dg-warning "padding struct size to alignment boundary" } */
|
||||
signed e: 5;
|
||||
unsigned f: 4;
|
||||
enum Enum g: 3;
|
||||
}
|
||||
} /* { dg-line interface_Derived } */
|
||||
@end
|
||||
|
||||
struct Derived_0 {
|
||||
struct Derived_0 { /* { dg-line struct_Derived_0 } */
|
||||
Class isa;
|
||||
unsigned a: 2;
|
||||
int b: 3;
|
||||
@ -56,10 +56,10 @@ struct Derived_0 {
|
||||
@interface Leaf: Derived {
|
||||
@public
|
||||
signed h: 2;
|
||||
}
|
||||
} /* { dg-line interface_Leaf } */
|
||||
@end
|
||||
|
||||
struct Leaf_0 {
|
||||
struct Leaf_0 { /* { dg-line struct_Leaf_0 } */
|
||||
Class isa;
|
||||
unsigned a: 2;
|
||||
int b: 3;
|
||||
@ -74,8 +74,8 @@ struct Leaf_0 {
|
||||
/* Note that the semicolon after @defs(...) is optional. */
|
||||
|
||||
typedef struct { @defs(Base) } Base_t; /* { dg-warning "padding struct size to alignment boundary" } */
|
||||
typedef struct { @defs(Derived); } Derived_t;
|
||||
typedef struct { @defs(Leaf); } Leaf_t;
|
||||
typedef struct { @defs(Derived); } Derived_t; /* { dg-line Derived_t_def } */
|
||||
typedef struct { @defs(Leaf); } Leaf_t; /* { dg-line Leaf_t_def } */
|
||||
|
||||
int main(void)
|
||||
{
|
||||
@ -116,9 +116,9 @@ int main(void)
|
||||
|
||||
/* { dg-prune-output "In file included from" } Ignore this message. */
|
||||
/* { dg-bogus "padding struct to align" "PR23610" { target *-*-* } 0 } */
|
||||
/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } 42 } */
|
||||
/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } 45 } */
|
||||
/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } 59 } */
|
||||
/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } 62 } */
|
||||
/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } 77 } */
|
||||
/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } 78 } */
|
||||
/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } interface_Derived } */
|
||||
/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } struct_Derived_0 } */
|
||||
/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } interface_Leaf } */
|
||||
/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } struct_Leaf_0 } */
|
||||
/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } Derived_t_def } */
|
||||
/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } Leaf_t_def } */
|
||||
|
@ -25,13 +25,13 @@ enum Enum { one, two, three, four };
|
||||
signed e: 5;
|
||||
int f: 4;
|
||||
enum Enum g: 3;
|
||||
}
|
||||
} /* { dg-line interface_Derived } */
|
||||
@end
|
||||
|
||||
/* Note that the semicolon after @defs(...) is optional. */
|
||||
|
||||
typedef struct { @defs(Base) } Base_t; /* { dg-warning "padding struct size to alignment boundary" } */
|
||||
typedef struct { @defs(Derived); } Derived_t;
|
||||
typedef struct { @defs(Derived); } Derived_t; /* { dg-line Derived_t_def } */
|
||||
|
||||
int main(void)
|
||||
{
|
||||
@ -52,5 +52,5 @@ int main(void)
|
||||
/* { dg-prune-output "In file included from" } Ignore this message. */
|
||||
/* { dg-bogus "padding struct to align" "PR23610" { target *-*-* } 0 } */
|
||||
|
||||
/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } 28 } */
|
||||
/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } 34 } */
|
||||
/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } interface_Derived } */
|
||||
/* { dg-bogus "padding struct size" "PR23610" { xfail lp64 } Derived_t_def } */
|
||||
|
@ -10,20 +10,20 @@
|
||||
@end
|
||||
|
||||
@interface WithBitfields: Base {
|
||||
void *isa;
|
||||
unsigned a: 3;
|
||||
void *isa; /* { dg-line WithBitfields_isa } */
|
||||
unsigned a: 3; /* { dg-line WithBitfields_a } */
|
||||
signed b: 4;
|
||||
int c: 5;
|
||||
int c: 5; /* { dg-line WithBitfields_c } */
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation WithBitfields {
|
||||
char *isa; /* { dg-error "conflicting instance variable type .char \\*isa." } */
|
||||
/* { dg-error "previous declaration of .void \\*isa." "" { target *-*-* } 13 } */
|
||||
/* { dg-error "previous declaration of .void \\*isa." "" { target *-*-* } WithBitfields_isa } */
|
||||
unsigned a: 5; /* { dg-error "conflicting instance variable type .unsigned( int)? a: 5." } */
|
||||
/* { dg-error "previous declaration of .unsigned( int)? a: 3." "" { target *-*-* } 14 } */
|
||||
/* { dg-error "previous declaration of .unsigned( int)? a: 3." "" { target *-*-* } WithBitfields_a } */
|
||||
signed b: 4; /* This one is fine. */
|
||||
int c: 3; /* { dg-error "conflicting instance variable type .int c: 3." } */
|
||||
/* { dg-error "previous declaration of .int c: 5." "" { target *-*-* } 16 } */
|
||||
/* { dg-error "previous declaration of .int c: 5." "" { target *-*-* } WithBitfields_c } */
|
||||
}
|
||||
@end
|
||||
|
@ -10,7 +10,7 @@
|
||||
@interface MyObject
|
||||
{
|
||||
Class isa;
|
||||
}
|
||||
} /* { dg-line interface_MyObject } */
|
||||
@end
|
||||
|
||||
@implementation MyObject
|
||||
@ -71,8 +71,8 @@ int test (id object)
|
||||
@try { @throw object; }
|
||||
@catch (MyObject x) /* { dg-error "@catch parameter is not a known Objective-C class type" } */
|
||||
{ /* { dg-error "no matching function" "" { target *-*-* } .-1 } */
|
||||
dummy++; /* { dg-message "MyObject" "" { target *-*-* } 13 } */
|
||||
} /* { dg-message "candidate" "" { target *-*-* } 13 } */
|
||||
dummy++; /* { dg-message "MyObject" "" { target *-*-* } interface_MyObject } */
|
||||
} /* { dg-message "candidate" "" { target *-*-* } interface_MyObject } */
|
||||
@try { @throw object; }
|
||||
@catch (static MyObject *x) /* { dg-error "storage class" } */
|
||||
{
|
||||
|
@ -10,7 +10,7 @@
|
||||
@interface MyObject
|
||||
{
|
||||
Class isa;
|
||||
}
|
||||
} /* { dg-line interface_MyObject } */
|
||||
@end
|
||||
|
||||
@implementation MyObject
|
||||
@ -71,8 +71,8 @@ int test (id object)
|
||||
@try { @throw object; }
|
||||
@catch (MyObject) /* { dg-error "@catch parameter is not a known Objective-C class type" } */
|
||||
{ /* { dg-error "no matching function" "" { target *-*-* } .-1 } */
|
||||
dummy++; /* { dg-message "MyObject" "" { target *-*-* } 13 } */
|
||||
} /* { dg-message "candidate" "" { target *-*-* } 13 } */
|
||||
dummy++; /* { dg-message "MyObject" "" { target *-*-* } interface_MyObject } */
|
||||
} /* { dg-message "candidate" "" { target *-*-* } interface_MyObject } */
|
||||
|
||||
@try { @throw object; }
|
||||
@catch (static MyObject *) /* { dg-error "storage class" } */
|
||||
|
@ -22,9 +22,10 @@
|
||||
@end
|
||||
|
||||
int main(void) {
|
||||
id i = [(Int2 *)[Int1 classMethod1] int2Method]; /* { dg-bogus "may not respond to" } */
|
||||
id i = [(Int2 *)[Int1 classMethod1] int2Method]; /* { dg-line i_def } */
|
||||
/* { dg-bogus "may not respond to" "" { target *-*-* } i_def } */
|
||||
int j = [(Int2 *)[Int2 classMethod2] instanceMethod: 45]; /* { dg-bogus "multiple methods" } */
|
||||
/* { dg-bogus "invalid conversion" "" { target *-*-* } 25 } */
|
||||
/* { dg-bogus "invalid conversion" "" { target *-*-* } 25 } */
|
||||
/* { dg-bogus "invalid conversion" "" { target *-*-* } i_def } */
|
||||
/* { dg-bogus "invalid conversion" "" { target *-*-* } i_def } */
|
||||
return j;
|
||||
}
|
||||
|
@ -7,12 +7,12 @@
|
||||
#include <objc/Protocol.h>
|
||||
|
||||
@interface Base
|
||||
- (unsigned)port;
|
||||
- (unsigned)port; /* { dg-line Base_port } */
|
||||
@end
|
||||
|
||||
@interface Derived: Base
|
||||
- (Object *)port;
|
||||
+ (Protocol *)port;
|
||||
+ (Protocol *)port; /* { dg-line Derived_port_last } */
|
||||
- (id)starboard;
|
||||
@end
|
||||
|
||||
@ -20,8 +20,8 @@ void foo(void) {
|
||||
Class receiver;
|
||||
|
||||
[receiver port]; /* { dg-warning "multiple methods named .\\+port. found" } */
|
||||
/* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 10 } */
|
||||
/* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 15 } */
|
||||
/* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } Base_port } */
|
||||
/* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } Derived_port_last } */
|
||||
|
||||
[receiver starboard]; /* { dg-warning "no .\\+starboard. method found" } */
|
||||
/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } .-1 } */
|
||||
|
@ -5,11 +5,11 @@
|
||||
#include "../objc-obj-c++-shared/TestsuiteObject.h"
|
||||
|
||||
@interface Class1
|
||||
- (void)setWindow:(TestsuiteObject *)wdw;
|
||||
- (void)setWindow:(TestsuiteObject *)wdw; /* { dg-line Class1_setWindow } */
|
||||
@end
|
||||
|
||||
@interface Class2
|
||||
- (void)setWindow:(Class1 *)window;
|
||||
- (void)setWindow:(Class1 *)window; /* { dg-line Class2_setWindow } */
|
||||
@end
|
||||
|
||||
id foo(void) {
|
||||
@ -20,8 +20,8 @@ id foo(void) {
|
||||
/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } .-2 } */
|
||||
/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } .-3 } */
|
||||
[obj2 setWindow:nil]; /* { dg-warning "multiple methods named .\\-setWindow:. found" } */
|
||||
/* { dg-message "using .\\-\\(void\\)setWindow:\\(TestsuiteObject \\*\\)wdw." "" { target *-*-* } 8 } */
|
||||
/* { dg-message "also found .\\-\\(void\\)setWindow:\\(Class1 \\*\\)window." "" { target *-*-* } 12 } */
|
||||
/* { dg-message "using .\\-\\(void\\)setWindow:\\(TestsuiteObject \\*\\)wdw." "" { target *-*-* } Class1_setWindow } */
|
||||
/* { dg-message "also found .\\-\\(void\\)setWindow:\\(Class1 \\*\\)window." "" { target *-*-* } Class2_setWindow } */
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
@ -6,15 +6,15 @@
|
||||
#include "../objc-obj-c++-shared/TestsuiteObject.h"
|
||||
|
||||
@protocol MyObject
|
||||
- (id)initWithData:(TestsuiteObject *)data;
|
||||
- (id)initWithData:(TestsuiteObject *)data; /* { dg-line MyObject_initWithData } */
|
||||
@end
|
||||
|
||||
@protocol SomeOther
|
||||
- (id)initWithData:(int)data;
|
||||
- (id)initWithData:(int)data; /* { dg-line SomeOther_initWithData } */
|
||||
@end
|
||||
|
||||
@protocol MyCoding
|
||||
- (id)initWithData:(id<MyObject, MyCoding>)data;
|
||||
- (id)initWithData:(id<MyObject, MyCoding>)data; /* { dg-line MyCoding_initWithData } */
|
||||
@end
|
||||
|
||||
@interface NTGridDataObject: TestsuiteObject <MyCoding>
|
||||
@ -30,14 +30,14 @@
|
||||
}
|
||||
+ (NTGridDataObject*)dataObject:(id<MyObject, MyCoding>)data
|
||||
{
|
||||
NTGridDataObject *result = [[NTGridDataObject alloc] initWithData:data];
|
||||
NTGridDataObject *result = [[NTGridDataObject alloc] initWithData:data]; /* { dg-line result_init } */
|
||||
/* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } .-1 } */
|
||||
/* { dg-message "using .\\-\\(id\\)initWithData:\\(TestsuiteObject \\*\\)data." "" { target *-*-* } 9 } */
|
||||
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(id <MyObject, MyCoding>\\)data." "" { target *-*-* } 17 } */
|
||||
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(int\\)data." "" { target *-*-* } 13 } */
|
||||
/* { dg-message "using .\\-\\(id\\)initWithData:\\(TestsuiteObject \\*\\)data." "" { target *-*-* } MyObject_initWithData } */
|
||||
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(id <MyObject, MyCoding>\\)data." "" { target *-*-* } MyCoding_initWithData } */
|
||||
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(int\\)data." "" { target *-*-* } SomeOther_initWithData } */
|
||||
|
||||
/* The following warning is a consequence of picking the "wrong" method signature. */
|
||||
/* { dg-warning "passing argument 1 of .initWithData:. from distinct Objective\\-C type" "" { target *-*-* } 33 } */
|
||||
/* { dg-warning "passing argument 1 of .initWithData:. from distinct Objective\\-C type" "" { target *-*-* } result_init } */
|
||||
return result;
|
||||
}
|
||||
@end
|
||||
|
@ -10,25 +10,25 @@
|
||||
#include <objc/objc.h>
|
||||
|
||||
@interface Object1
|
||||
- (void)initWithData:(Object1 *)data;
|
||||
- (void)initWithData:(Object1 *)data; /* { dg-line Object1_initWithData } */
|
||||
@end
|
||||
|
||||
@interface Object2
|
||||
- (id)initWithData:(Object1 *)data;
|
||||
- (id)initWithData:(Object1 *)data; /* { dg-line Object2_initWithData } */
|
||||
@end
|
||||
|
||||
@interface Object3
|
||||
- (id)initWithData:(Object2 *)data;
|
||||
- (id)initWithData:(Object2 *)data; /* { dg-line Object3_initWithData } */
|
||||
@end
|
||||
|
||||
void foo(void) {
|
||||
id obj1, obj2 = 0;
|
||||
obj2 = [obj1 initWithData: obj2];
|
||||
obj2 = [obj1 initWithData: obj2]; /* { dg-line obj2_assign } */
|
||||
/* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } .-1 } */
|
||||
/* { dg-message "using .\\-\\(void\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 13 } */
|
||||
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 17 } */
|
||||
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(Object2 \\*\\)data." "" { target *-*-* } 21 } */
|
||||
/* { dg-message "using .\\-\\(void\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } Object1_initWithData } */
|
||||
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } Object2_initWithData } */
|
||||
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(Object2 \\*\\)data." "" { target *-*-* } Object3_initWithData } */
|
||||
|
||||
/* The following error is a consequence of picking the "wrong" method signature. */
|
||||
/* { dg-error "void value not ignored as it ought to be" "" { target *-*-* } 26 } */
|
||||
/* { dg-error "void value not ignored as it ought to be" "" { target *-*-* } obj2_assign } */
|
||||
}
|
||||
|
@ -13,34 +13,34 @@
|
||||
{
|
||||
Class isa;
|
||||
}
|
||||
@property (assign) id a;
|
||||
@property (retain) id b;
|
||||
@property int c;
|
||||
@property (nonatomic) int d;
|
||||
@property int e;
|
||||
@property int f;
|
||||
@property int g;
|
||||
@property (assign) id a; /* { dg-line MyRootClass_a } */
|
||||
@property (retain) id b; /* { dg-line MyRootClass_b } */
|
||||
@property int c; /* { dg-line MyRootClass_c } */
|
||||
@property (nonatomic) int d; /* { dg-line MyRootClass_d } */
|
||||
@property int e; /* { dg-line MyRootClass_e } */
|
||||
@property int f; /* { dg-line MyRootClass_f } */
|
||||
@property int g; /* { dg-line MyRootClass_g } */
|
||||
@property (readonly) int h;
|
||||
@property (readonly,getter=getMe) int i;
|
||||
@property (readonly,getter=getMe) int i; /* { dg-line MyRootClass_i } */
|
||||
@property (nonatomic) float j;
|
||||
@end
|
||||
@interface MyRootClass (Category)
|
||||
@property (retain) id a; /* { dg-warning "assign semantics attributes of property .a. conflict with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 16 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_a } */
|
||||
@property (assign) id b; /* { dg-warning "assign semantics attributes of property .b. conflict with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 17 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_b } */
|
||||
@property (nonatomic) int c; /* { dg-warning ".nonatomic. attribute of property .c. conflicts with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 18 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_c } */
|
||||
@property int d; /* { dg-warning ".nonatomic. attribute of property .d. conflicts with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 19 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_d } */
|
||||
@property (setter=setX:) int e; /* { dg-warning ".setter. attribute of property .e. conflicts with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 20 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_e } */
|
||||
@property (getter=x) int f; /* { dg-warning ".getter. attribute of property .f. conflicts with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 21 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_f } */
|
||||
@property (readonly) int g; /* { dg-warning ".readonly. attribute of property .g. conflicts with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 22 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_g } */
|
||||
@property (readwrite) int h; /* Ok */
|
||||
@property (readonly) int i; /* { dg-warning ".getter. attribute of property .i. conflicts with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 24 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_i } */
|
||||
@property (nonatomic) float j; /* Ok */
|
||||
@end
|
||||
|
@ -79,9 +79,8 @@
|
||||
|
||||
@implementation MySubClass4
|
||||
@end
|
||||
|
||||
/* { dg-warning "incomplete implementation of class" "" { target *-*-* } 81 } */
|
||||
/* { dg-warning "method definition for ..setCount1:. not found" "" { target *-*-* } 81 } */
|
||||
/* { dg-warning "method definition for ..count1. not found" "" { target *-*-* } 81 } */
|
||||
/* { dg-warning "method definition for ..count2. not found" "" { target *-*-* } 81 } */
|
||||
/* { dg-warning "class .MySubClass4. does not fully implement the .count2. protocol" "" { target *-*-* } 81 } */
|
||||
/* { dg-warning "incomplete implementation of class" "" { target *-*-* } .-1 } */
|
||||
/* { dg-warning "method definition for ..setCount1:. not found" "" { target *-*-* } .-2 } */
|
||||
/* { dg-warning "method definition for ..count1. not found" "" { target *-*-* } .-3 } */
|
||||
/* { dg-warning "method definition for ..count2. not found" "" { target *-*-* } .-4 } */
|
||||
/* { dg-warning "class .MySubClass4. does not fully implement the .count2. protocol" "" { target *-*-* } .-5 } */
|
||||
|
@ -23,12 +23,12 @@
|
||||
@property (retain) int property_c; /* { dg-error ".retain. attribute is only valid for Objective-C objects" } */
|
||||
@property (copy) int property_d; /* { dg-error ".copy. attribute is only valid for Objective-C objects" } */
|
||||
|
||||
@property (retain) id property_e;
|
||||
@property (retain) id property_e; /* { dg-line property_e_first } */
|
||||
@property (retain) id property_f;
|
||||
@property (retain) id property_g;
|
||||
@property (retain) id property_h;
|
||||
@property (retain) id property_e; /* { dg-error "redeclaration of property .property_e." } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 26 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } property_e_first } */
|
||||
@end
|
||||
|
||||
@property id test; /* { dg-error "misplaced .@property. Objective-C.. construct" } */
|
||||
|
@ -38,8 +38,8 @@
|
||||
@end
|
||||
|
||||
@implementation AnotherTest
|
||||
@dynamic one;
|
||||
@dynamic one; /* { dg-line dynamic_one_first } */
|
||||
@dynamic one; /* { dg-error "property .one. already specified in .@dynamic." } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 41 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } dynamic_one_first } */
|
||||
@dynamic three; /* { dg-error "no declaration of property .three. found in the interface" } */
|
||||
@end
|
||||
|
@ -8,7 +8,7 @@
|
||||
@end
|
||||
|
||||
@implementation Person
|
||||
@dynamic firstName;
|
||||
@dynamic firstName; /* { dg-line firstName_first } */
|
||||
@synthesize firstName; /* { dg-error "property .firstName. already specified in .@dynamic." } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 11 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } firstName_first } */
|
||||
@end
|
||||
|
@ -48,7 +48,6 @@
|
||||
|
||||
@implementation MySubClass2
|
||||
@end /* Warnings here, below. */
|
||||
|
||||
/* { dg-warning "incomplete implementation of class .MySubClass2." "" { target *-*-* } 50 } */
|
||||
/* { dg-warning "method definition for .\\-method2. not found" "" { target *-*-* } 50 } */
|
||||
/* { dg-warning "class .MySubClass2. does not fully implement the .MyProtocol2. protocol" "" { target *-*-* } 50 } */
|
||||
/* { dg-warning "incomplete implementation of class .MySubClass2." "" { target *-*-* } .-1 } */
|
||||
/* { dg-warning "method definition for .\\-method2. not found" "" { target *-*-* } .-2 } */
|
||||
/* { dg-warning "class .MySubClass2. does not fully implement the .MyProtocol2. protocol" "" { target *-*-* } .-3 } */
|
||||
|
@ -37,10 +37,9 @@
|
||||
|
||||
@implementation MySubClass
|
||||
@end
|
||||
|
||||
/* { dg-warning "incomplete implementation of class .MySubClass." "" { target *-*-* } 39 } */
|
||||
/* { dg-warning "method definition for .\\-method. not found" "" { target *-*-* } 39 } */
|
||||
/* { dg-warning "class .MySubClass. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } 39 } */
|
||||
/* { dg-warning "incomplete implementation of class .MySubClass." "" { target *-*-* } .-1 } */
|
||||
/* { dg-warning "method definition for .\\-method. not found" "" { target *-*-* } .-2 } */
|
||||
/* { dg-warning "class .MySubClass. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } .-3 } */
|
||||
|
||||
|
||||
/* The subclass instead does not inherit the method method2 (and does
|
||||
@ -51,7 +50,6 @@
|
||||
|
||||
@implementation MySubClass2
|
||||
@end /* Warnings here, below. */
|
||||
|
||||
/* { dg-warning "incomplete implementation of class .MySubClass2." "" { target *-*-* } 53 } */
|
||||
/* { dg-warning "method definition for .\\-method2. not found" "" { target *-*-* } 53 } */
|
||||
/* { dg-warning "class .MySubClass2. does not fully implement the .MyProtocol2. protocol" "" { target *-*-* } 53 } */
|
||||
/* { dg-warning "incomplete implementation of class .MySubClass2." "" { target *-*-* } .-1 } */
|
||||
/* { dg-warning "method definition for .\\-method2. not found" "" { target *-*-* } .-2 } */
|
||||
/* { dg-warning "class .MySubClass2. does not fully implement the .MyProtocol2. protocol" "" { target *-*-* } .-3 } */
|
||||
|
@ -25,8 +25,9 @@ extern void NXLog(const char *, ...);
|
||||
|
||||
@implementation Test2
|
||||
- (void) foo2
|
||||
NXLog("Hello, world!"); /* { dg-error "expected .\{. before .NXLog." } */
|
||||
NXLog("Hello, world!"); /* { dg-line Test2_foo2_body } */
|
||||
/* { dg-error "expected .\{. before .NXLog." "" { target *-*-* } Test2_foo2_body } */
|
||||
} /* { dg-error "stray .\}. between Objective\\-C\\+\\+ methods" } */
|
||||
@end
|
||||
|
||||
/* { dg-error "expected constructor, destructor, or type conversion before" "" { target *-*-* } 28 } */
|
||||
/* { dg-error "expected constructor, destructor, or type conversion before" "" { target *-*-* } Test2_foo2_body } */
|
||||
|
@ -9,7 +9,7 @@
|
||||
- (void) testSpoon;
|
||||
@end
|
||||
|
||||
extern void some_func (int *);
|
||||
extern void some_func (int *); /* { dg-line some_func_decl } */
|
||||
|
||||
@implementation TestMyTests
|
||||
- (void) testSpoon {
|
||||
@ -22,7 +22,7 @@ extern void some_func (int *);
|
||||
typeof(q) k = 66;
|
||||
some_func (&j);
|
||||
/* { dg-error "invalid conversion" "" { target *-*-* } .-1 } */
|
||||
/* { dg-message "initializing argument" "" { target *-*-* } 12 } */
|
||||
/* { dg-message "initializing argument" "" { target *-*-* } some_func_decl } */
|
||||
some_func (&k);
|
||||
}
|
||||
@catch (id exc) {
|
||||
@ -39,7 +39,7 @@ extern void some_func (int *);
|
||||
/* { dg-error "invalid conversion" "" { target *-*-* } .-1 } */
|
||||
/* The following is disabled as it is already checked above and the testsuites seems
|
||||
to count multiple different identical errors on the same line only once */
|
||||
/* dg-message "initializing argument" "" { target *-*-* } 12 */
|
||||
/* dg-message "initializing argument" "" { target *-*-* } some_func_decl */
|
||||
}
|
||||
@catch (id exc) {
|
||||
@throw;
|
||||
@ -54,7 +54,7 @@ extern void some_func (int *);
|
||||
/* { dg-error "invalid conversion" "" { target *-*-* } .-1 } */
|
||||
/* The following is disabled as it is already checked above and the testsuites seems
|
||||
to count multiple different identical errors on the same line only once */
|
||||
/* dg-message "initializing argument" "" { target *-*-* } 12 */
|
||||
/* dg-message "initializing argument" "" { target *-*-* } some_func_decl */
|
||||
some_func (&k);
|
||||
}
|
||||
@catch (id exc) {
|
||||
|
@ -9,20 +9,20 @@
|
||||
@end
|
||||
|
||||
@interface WithBitfields: Base {
|
||||
void *isa;
|
||||
unsigned a: 3;
|
||||
void *isa; /* { dg-line WithBitFields_isa } */
|
||||
unsigned a: 3; /* { dg-line WithBitFields_a } */
|
||||
signed b: 4;
|
||||
int c: 5;
|
||||
int c: 5; /* { dg-line WithBitFields_c } */
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation WithBitfields {
|
||||
char *isa; /* { dg-error "conflicting instance variable type .char \\*isa." } */
|
||||
/* { dg-error "previous declaration of .void \\*isa." "" { target *-*-* } 12 } */
|
||||
/* { dg-error "previous declaration of .void \\*isa." "" { target *-*-* } WithBitFields_isa } */
|
||||
unsigned a: 5; /* { dg-error "conflicting instance variable type .unsigned( int)? a: 5." } */
|
||||
/* { dg-error "previous declaration of .unsigned( int)? a: 3." "" { target *-*-* } 13 } */
|
||||
/* { dg-error "previous declaration of .unsigned( int)? a: 3." "" { target *-*-* } WithBitFields_a } */
|
||||
signed b: 4; /* This one is fine. */
|
||||
int c: 3; /* { dg-error "conflicting instance variable type .int c: 3." } */
|
||||
/* { dg-error "previous declaration of .int c: 5." "" { target *-*-* } 15 } */
|
||||
/* { dg-error "previous declaration of .int c: 5." "" { target *-*-* } WithBitFields_c } */
|
||||
}
|
||||
@end
|
||||
|
@ -1,20 +1,21 @@
|
||||
/* Redeclarations of class names. */
|
||||
/* { dg-do compile } */
|
||||
|
||||
typedef int foo;
|
||||
typedef int foo; /* { dg-line foo_def } */
|
||||
|
||||
@class foo; /* { dg-error "redeclared as different kind of symbol" } */
|
||||
/* { dg-error "previous declaration of" "" { target *-*-* } 4 } */
|
||||
/* { dg-error "previous declaration of" "" { target *-*-* } foo_def } */
|
||||
|
||||
typedef int bar;
|
||||
typedef int bar; /* { dg-line bar_def } */
|
||||
|
||||
@interface bar
|
||||
@end /* { dg-error "redeclared as different kind of symbol" } */
|
||||
/* { dg-error "previous declaration of" "" { target *-*-* } 9 } */
|
||||
/* { dg-error "previous declaration of" "" { target *-*-* } bar_def } */
|
||||
|
||||
int glob;
|
||||
int glob; /* { dg-line glob_def } */
|
||||
|
||||
@implementation glob
|
||||
@end /* { dg-error "redeclared as different kind of symbol" } */
|
||||
/* { dg-error "previous declaration of" "" { target *-*-* } 15 } */
|
||||
/* { dg-warning "annot find interface declaration" "" { target *-*-* } 18 } */
|
||||
@end /* { dg-line glob_impl_end } */
|
||||
/* { dg-error "redeclared as different kind of symbol" "" { target *-*-* } glob_impl_end } */
|
||||
/* { dg-error "previous declaration of" "" { target *-*-* } glob_def } */
|
||||
/* { dg-warning "annot find interface declaration" "" { target *-*-* } glob_impl_end } */
|
||||
|
@ -9,25 +9,25 @@
|
||||
#include <objc/objc.h>
|
||||
|
||||
@interface Object1
|
||||
- (void)initWithData:(Object1 *)data;
|
||||
- (void)initWithData:(Object1 *)data; /* { dg-line Object1_initWithData } */
|
||||
@end
|
||||
|
||||
@interface Object2
|
||||
- (id)initWithData:(Object1 *)data;
|
||||
- (id)initWithData:(Object1 *)data; /* { dg-line Object2_initWithData } */
|
||||
@end
|
||||
|
||||
@interface Object3
|
||||
- (id)initWithData:(Object2 *)data;
|
||||
- (id)initWithData:(Object2 *)data; /* { dg-line Object3_initWithData } */
|
||||
@end
|
||||
|
||||
void foo(void) {
|
||||
id obj1, obj2 = 0;
|
||||
obj2 = [obj1 initWithData: obj2];
|
||||
obj2 = [obj1 initWithData: obj2]; /* { dg-line initWithData_message } */
|
||||
/* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } .-1 } */
|
||||
/* { dg-message "using .\\-\\(void\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 12 } */
|
||||
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 16 } */
|
||||
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(Object2 \\*\\)data." "" { target *-*-* } 20 } */
|
||||
/* { dg-message "using .\\-\\(void\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } Object1_initWithData } */
|
||||
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } Object2_initWithData } */
|
||||
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(Object2 \\*\\)data." "" { target *-*-* } Object3_initWithData } */
|
||||
|
||||
/* The following error is a consequence of picking the "wrong" method signature. */
|
||||
/* { dg-error "void value not ignored as it ought to be" "" { target *-*-* } 25 } */
|
||||
/* { dg-error "void value not ignored as it ought to be" "" { target *-*-* } initWithData_message } */
|
||||
}
|
||||
|
@ -14,12 +14,12 @@
|
||||
#endif
|
||||
|
||||
@interface Base
|
||||
- (unsigned)port;
|
||||
- (unsigned)port; /* { dg-line Base_port } */
|
||||
@end
|
||||
|
||||
@interface Derived: Base
|
||||
- (OBJECT *)port;
|
||||
+ (Protocol *)port;
|
||||
+ (Protocol *)port; /* { dg-line Derived_port_last } */
|
||||
- (id)starboard;
|
||||
@end
|
||||
|
||||
@ -27,8 +27,8 @@ void foo(void) {
|
||||
Class receiver;
|
||||
|
||||
[receiver port]; /* { dg-warning "multiple methods named .\\+port. found" } */
|
||||
/* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 17 } */
|
||||
/* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 22 } */
|
||||
/* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } Base_port } */
|
||||
/* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } Derived_port_last } */
|
||||
|
||||
[receiver starboard]; /* { dg-warning "no .\\+starboard. method found" } */
|
||||
/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } .-1 } */
|
||||
|
@ -7,11 +7,11 @@
|
||||
#include "../objc-obj-c++-shared/TestsuiteObject.h"
|
||||
|
||||
@interface Class1
|
||||
- (void)setWindow:(TestsuiteObject *)wdw;
|
||||
- (void)setWindow:(TestsuiteObject *)wdw; /* { dg-line Class1_setWindow } */
|
||||
@end
|
||||
|
||||
@interface Class2
|
||||
- (void)setWindow:(Class1 *)window;
|
||||
- (void)setWindow:(Class1 *)window; /* { dg-line Class2_setWindow } */
|
||||
@end
|
||||
|
||||
id foo(void) {
|
||||
@ -22,8 +22,8 @@ id foo(void) {
|
||||
/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } .-2 } */
|
||||
/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } .-3 } */
|
||||
[obj2 setWindow:nil]; /* { dg-warning "multiple methods named .\\-setWindow:. found" } */
|
||||
/* { dg-message "using .\\-\\(void\\)setWindow:\\(TestsuiteObject \\*\\)wdw." "" { target *-*-* } 10 } */
|
||||
/* { dg-message "also found .\\-\\(void\\)setWindow:\\(Class1 \\*\\)window." "" { target *-*-* } 14 } */
|
||||
/* { dg-message "using .\\-\\(void\\)setWindow:\\(TestsuiteObject \\*\\)wdw." "" { target *-*-* } Class1_setWindow } */
|
||||
/* { dg-message "also found .\\-\\(void\\)setWindow:\\(Class1 \\*\\)window." "" { target *-*-* } Class2_setWindow } */
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
@ -8,15 +8,15 @@
|
||||
#include "../objc-obj-c++-shared/TestsuiteObject.h"
|
||||
|
||||
@protocol MyObject
|
||||
- (id)initWithData:(TestsuiteObject *)data;
|
||||
- (id)initWithData:(TestsuiteObject *)data; /* { dg-line MyObject_initWithData } */
|
||||
@end
|
||||
|
||||
@protocol SomeOther
|
||||
- (id)initWithData:(int)data;
|
||||
- (id)initWithData:(int)data; /* { dg-line SomeOther_initWithData } */
|
||||
@end
|
||||
|
||||
@protocol MyCoding
|
||||
- (id)initWithData:(id<MyObject, MyCoding>)data;
|
||||
- (id)initWithData:(id<MyObject, MyCoding>)data; /* { dg-line MyCoding_initWithData } */
|
||||
@end
|
||||
|
||||
@interface NTGridDataObject: TestsuiteObject <MyCoding>
|
||||
@ -32,14 +32,14 @@
|
||||
}
|
||||
+ (NTGridDataObject*)dataObject:(id<MyObject, MyCoding>)data
|
||||
{
|
||||
NTGridDataObject *result = [[NTGridDataObject alloc] initWithData:data];
|
||||
NTGridDataObject *result = [[NTGridDataObject alloc] initWithData:data]; /* { dg-line initWithData_message } */
|
||||
/* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } .-1 } */
|
||||
/* { dg-message "using .\\-\\(id\\)initWithData:\\(TestsuiteObject \\*\\)data." "" { target *-*-* } 11 } */
|
||||
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(id <MyObject, MyCoding>\\)data." "" { target *-*-* } 19 } */
|
||||
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(int\\)data." "" { target *-*-* } 15 } */
|
||||
/* { dg-message "using .\\-\\(id\\)initWithData:\\(TestsuiteObject \\*\\)data." "" { target *-*-* } MyObject_initWithData } */
|
||||
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(id <MyObject, MyCoding>\\)data." "" { target *-*-* } MyCoding_initWithData } */
|
||||
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(int\\)data." "" { target *-*-* } SomeOther_initWithData } */
|
||||
|
||||
/* The following warning is a consequence of picking the "wrong" method signature. */
|
||||
/* { dg-warning "passing argument 1 of .initWithData:. from distinct Objective\\-C type" "" { target *-*-* } 35 } */
|
||||
/* { dg-warning "passing argument 1 of .initWithData:. from distinct Objective\\-C type" "" { target *-*-* } initWithData_message } */
|
||||
return result;
|
||||
}
|
||||
@end
|
||||
|
@ -19,8 +19,7 @@
|
||||
return self;
|
||||
}
|
||||
@end
|
||||
|
||||
/* { dg-warning "incomplete implementation of class .MyClass." "" { target *-*-* } 21 } */
|
||||
/* { dg-warning "method definition for .\\-missingMethod1. not found" "" { target *-*-* } 21 } */
|
||||
/* { dg-warning "class .MyClass. does not fully implement the .DefinedProtocol. protocol" "" { target *-*-* } 21 } */
|
||||
/* { dg-warning "incomplete implementation of class .MyClass." "" { target *-*-* } .-1 } */
|
||||
/* { dg-warning "method definition for .\\-missingMethod1. not found" "" { target *-*-* } .-2 } */
|
||||
/* { dg-warning "class .MyClass. does not fully implement the .DefinedProtocol. protocol" "" { target *-*-* } .-3 } */
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
@end
|
||||
float Foo; /* { dg-error "parse error|syntax error|expected|redeclaration" } */
|
||||
|
||||
double Bar;
|
||||
double Bar; /* { dg-line Bar_decl } */
|
||||
@interface Bar
|
||||
@end /* { dg-error "redeclared as different kind of symbol" } */
|
||||
/* { dg-error "previous declaration of" "" { target *-*-* } 9 } */
|
||||
/* { dg-error "previous declaration of" "" { target *-*-* } Bar_decl } */
|
||||
|
@ -10,15 +10,15 @@
|
||||
{
|
||||
Class isa;
|
||||
}
|
||||
@property (assign) id a;
|
||||
@property (retain) id b;
|
||||
@property int c;
|
||||
@property (nonatomic) int d;
|
||||
@property int e;
|
||||
@property int f;
|
||||
@property int g;
|
||||
@property (readonly) int h;
|
||||
@property (readonly,getter=getMe) int i;
|
||||
@property (assign) id a; /* { dg-line MyRootClass_property_a } */
|
||||
@property (retain) id b; /* { dg-line MyRootClass_property_b } */
|
||||
@property int c; /* { dg-line MyRootClass_property_c } */
|
||||
@property (nonatomic) int d; /* { dg-line MyRootClass_property_d } */
|
||||
@property int e; /* { dg-line MyRootClass_property_e } */
|
||||
@property int f; /* { dg-line MyRootClass_property_f } */
|
||||
@property int g; /* { dg-line MyRootClass_property_g } */
|
||||
@property (readonly) int h;
|
||||
@property (readonly,getter=getMe) int i; /* { dg-line MyRootClass_property_i } */
|
||||
@end
|
||||
|
||||
@interface MyClass : MyRootClass
|
||||
@ -35,21 +35,21 @@
|
||||
|
||||
@interface MyClass2 : MyRootClass
|
||||
@property (retain) id a; /* { dg-warning "assign semantics attributes of property .a. conflict with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 13 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_property_a } */
|
||||
@property (assign) id b; /* { dg-warning "assign semantics attributes of property .b. conflict with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 14 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_property_b } */
|
||||
@property (nonatomic) int c; /* { dg-warning ".nonatomic. attribute of property .c. conflicts with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 15 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_property_c } */
|
||||
@property int d; /* { dg-warning ".nonatomic. attribute of property .d. conflicts with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 16 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_property_d } */
|
||||
@property (setter=setX:) int e; /* { dg-warning ".setter. attribute of property .e. conflicts with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 17 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_property_e } */
|
||||
@property (getter=x) int f; /* { dg-warning ".getter. attribute of property .f. conflicts with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 18 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_property_f } */
|
||||
@property (readonly) int g; /* { dg-warning ".readonly. attribute of property .g. conflicts with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 19 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_property_g } */
|
||||
@property (readwrite) int h; /* Ok */
|
||||
@property (readonly) int i; /* { dg-warning ".getter. attribute of property .i. conflicts with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 21 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_property_i } */
|
||||
@end
|
||||
|
||||
|
@ -13,35 +13,35 @@
|
||||
{
|
||||
Class isa;
|
||||
}
|
||||
@property (assign) id a;
|
||||
@property (retain) id b;
|
||||
@property int c;
|
||||
@property (nonatomic) int d;
|
||||
@property int e;
|
||||
@property int f;
|
||||
@property int g;
|
||||
@property (assign) id a; /* { dg-line MyRootClass_property_a } */
|
||||
@property (retain) id b; /* { dg-line MyRootClass_property_b } */
|
||||
@property int c; /* { dg-line MyRootClass_property_c } */
|
||||
@property (nonatomic) int d; /* { dg-line MyRootClass_property_d } */
|
||||
@property int e; /* { dg-line MyRootClass_property_e } */
|
||||
@property int f; /* { dg-line MyRootClass_property_f } */
|
||||
@property int g; /* { dg-line MyRootClass_property_g } */
|
||||
@property (readonly) int h;
|
||||
@property (readonly,getter=getMe) int i;
|
||||
@property (readonly,getter=getMe) int i; /* { dg-line MyRootClass_property_i } */
|
||||
@property (nonatomic) float j;
|
||||
@end
|
||||
|
||||
@interface MyRootClass (Category)
|
||||
@property (retain) id a; /* { dg-warning "assign semantics attributes of property .a. conflict with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 16 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_property_a } */
|
||||
@property (assign) id b; /* { dg-warning "assign semantics attributes of property .b. conflict with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 17 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_property_b } */
|
||||
@property (nonatomic) int c; /* { dg-warning ".nonatomic. attribute of property .c. conflicts with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 18 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_property_c } */
|
||||
@property int d; /* { dg-warning ".nonatomic. attribute of property .d. conflicts with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 19 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_property_d } */
|
||||
@property (setter=setX:) int e; /* { dg-warning ".setter. attribute of property .e. conflicts with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 20 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_property_e } */
|
||||
@property (getter=x) int f; /* { dg-warning ".getter. attribute of property .f. conflicts with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 21 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_property_f } */
|
||||
@property (readonly) int g; /* { dg-warning ".readonly. attribute of property .g. conflicts with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 22 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_property_g } */
|
||||
@property (readwrite) int h; /* Ok */
|
||||
@property (readonly) int i; /* { dg-warning ".getter. attribute of property .i. conflicts with previous declaration" } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 24 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } MyRootClass_property_i } */
|
||||
@property (nonatomic) float j; /* Ok */
|
||||
@end
|
||||
|
@ -79,9 +79,8 @@
|
||||
|
||||
@implementation MySubClass4
|
||||
@end
|
||||
|
||||
/* { dg-warning "incomplete implementation of class" "" { target *-*-* } 81 } */
|
||||
/* { dg-warning "method definition for ..setCount1:. not found" "" { target *-*-* } 81 } */
|
||||
/* { dg-warning "method definition for ..count1. not found" "" { target *-*-* } 81 } */
|
||||
/* { dg-warning "method definition for ..count2. not found" "" { target *-*-* } 81 } */
|
||||
/* { dg-warning "class .MySubClass4. does not fully implement the .count2. protocol" "" { target *-*-* } 81 } */
|
||||
/* { dg-warning "incomplete implementation of class" "" { target *-*-* } .-1 } */
|
||||
/* { dg-warning "method definition for ..setCount1:. not found" "" { target *-*-* } .-2 } */
|
||||
/* { dg-warning "method definition for ..count1. not found" "" { target *-*-* } .-3 } */
|
||||
/* { dg-warning "method definition for ..count2. not found" "" { target *-*-* } .-4 } */
|
||||
/* { dg-warning "class .MySubClass4. does not fully implement the .count2. protocol" "" { target *-*-* } .-5 } */
|
||||
|
@ -23,12 +23,12 @@
|
||||
@property (retain) int property_c; /* { dg-error ".retain. attribute is only valid for Objective-C objects" } */
|
||||
@property (copy) int property_d; /* { dg-error ".copy. attribute is only valid for Objective-C objects" } */
|
||||
|
||||
@property (retain) id property_e;
|
||||
@property (retain) id property_e; /* { dg-line property_e_first } */
|
||||
@property (retain) id property_f;
|
||||
@property (retain) id property_g;
|
||||
@property (retain) id property_h;
|
||||
@property (retain) id property_e; /* { dg-error "redeclaration of property .property_e." } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 26 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } property_e_first } */
|
||||
@end
|
||||
|
||||
@property id test; /* { dg-error "property declaration not in .interface or .protocol context" } */
|
||||
|
@ -38,8 +38,8 @@
|
||||
@end
|
||||
|
||||
@implementation AnotherTest
|
||||
@dynamic one;
|
||||
@dynamic one; /* { dg-line dynamic_one_first } */
|
||||
@dynamic one; /* { dg-error "property .one. already specified in .@dynamic." } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 41 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } dynamic_one_first } */
|
||||
@dynamic three; /* { dg-error "no declaration of property .three. found in the interface" } */
|
||||
@end
|
||||
|
@ -8,7 +8,7 @@
|
||||
@end
|
||||
|
||||
@implementation Person
|
||||
@dynamic firstName;
|
||||
@dynamic firstName; /* { dg-line dynamic_firstName } */
|
||||
@synthesize firstName; /* { dg-error "property .firstName. already specified in .@dynamic." } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } 11 } */
|
||||
/* { dg-message "originally specified here" "" { target *-*-* } dynamic_firstName } */
|
||||
@end
|
||||
|
@ -48,7 +48,6 @@
|
||||
|
||||
@implementation MySubClass2
|
||||
@end /* Warnings here, below. */
|
||||
|
||||
/* { dg-warning "incomplete implementation of class .MySubClass2." "" { target *-*-* } 50 } */
|
||||
/* { dg-warning "method definition for .\\-method2. not found" "" { target *-*-* } 50 } */
|
||||
/* { dg-warning "class .MySubClass2. does not fully implement the .MyProtocol2. protocol" "" { target *-*-* } 50 } */
|
||||
/* { dg-warning "incomplete implementation of class .MySubClass2." "" { target *-*-* } .-1 } */
|
||||
/* { dg-warning "method definition for .\\-method2. not found" "" { target *-*-* } .-2 } */
|
||||
/* { dg-warning "class .MySubClass2. does not fully implement the .MyProtocol2. protocol" "" { target *-*-* } .-3 } */
|
||||
|
@ -37,10 +37,9 @@
|
||||
|
||||
@implementation MySubClass
|
||||
@end
|
||||
|
||||
/* { dg-warning "incomplete implementation of class .MySubClass." "" { target *-*-* } 39 } */
|
||||
/* { dg-warning "method definition for .\\-method. not found" "" { target *-*-* } 39 } */
|
||||
/* { dg-warning "class .MySubClass. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } 39 } */
|
||||
/* { dg-warning "incomplete implementation of class .MySubClass." "" { target *-*-* } .-1 } */
|
||||
/* { dg-warning "method definition for .\\-method. not found" "" { target *-*-* } .-2 } */
|
||||
/* { dg-warning "class .MySubClass. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } .-3 } */
|
||||
|
||||
|
||||
/* The subclass instead does not inherit the method method2 (and does
|
||||
@ -51,7 +50,6 @@
|
||||
|
||||
@implementation MySubClass2
|
||||
@end /* Warnings here, below. */
|
||||
|
||||
/* { dg-warning "incomplete implementation of class .MySubClass2." "" { target *-*-* } 53 } */
|
||||
/* { dg-warning "method definition for .\\-method2. not found" "" { target *-*-* } 53 } */
|
||||
/* { dg-warning "class .MySubClass2. does not fully implement the .MyProtocol2. protocol" "" { target *-*-* } 53 } */
|
||||
/* { dg-warning "incomplete implementation of class .MySubClass2." "" { target *-*-* } .-1 } */
|
||||
/* { dg-warning "method definition for .\\-method2. not found" "" { target *-*-* } .-2 } */
|
||||
/* { dg-warning "class .MySubClass2. does not fully implement the .MyProtocol2. protocol" "" { target *-*-* } .-3 } */
|
||||
|
Loading…
x
Reference in New Issue
Block a user