From: Tom de Vries Date: Fri, 28 Apr 2017 21:24:00 +0000 (+0000) Subject: Replace absolute linenrs in objc.dg,obj-c++.dg X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b5be38bc30107969515bed284c65e39efe978af2;p=gcc.git Replace absolute linenrs in objc.dg,obj-c++.dg 2017-04-28 Tom de Vries 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 92db79cded7..589da6df3d1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,42 @@ +2017-04-28 Tom de Vries + + 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 * gcc.dg/tree-ssa/cmpexactdiv-2.c: Update for X-Z OP Y-Z. diff --git a/gcc/testsuite/obj-c++.dg/bitfield-1.mm b/gcc/testsuite/obj-c++.dg/bitfield-1.mm index 92aaae4cfda..a63761904b5 100644 --- a/gcc/testsuite/obj-c++.dg/bitfield-1.mm +++ b/gcc/testsuite/obj-c++.dg/bitfield-1.mm @@ -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 } */ diff --git a/gcc/testsuite/obj-c++.dg/bitfield-4.mm b/gcc/testsuite/obj-c++.dg/bitfield-4.mm index 9ffa398989c..1fd6d3a1668 100644 --- a/gcc/testsuite/obj-c++.dg/bitfield-4.mm +++ b/gcc/testsuite/obj-c++.dg/bitfield-4.mm @@ -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 } */ diff --git a/gcc/testsuite/obj-c++.dg/bitfield-5.mm b/gcc/testsuite/obj-c++.dg/bitfield-5.mm index b6716df8d97..3b0065d7f61 100644 --- a/gcc/testsuite/obj-c++.dg/bitfield-5.mm +++ b/gcc/testsuite/obj-c++.dg/bitfield-5.mm @@ -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 diff --git a/gcc/testsuite/obj-c++.dg/exceptions-3.mm b/gcc/testsuite/obj-c++.dg/exceptions-3.mm index a9da9d68433..c29752d1399 100644 --- a/gcc/testsuite/obj-c++.dg/exceptions-3.mm +++ b/gcc/testsuite/obj-c++.dg/exceptions-3.mm @@ -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" } */ { diff --git a/gcc/testsuite/obj-c++.dg/exceptions-5.mm b/gcc/testsuite/obj-c++.dg/exceptions-5.mm index c1a2e4cfbae..9e733a79055 100644 --- a/gcc/testsuite/obj-c++.dg/exceptions-5.mm +++ b/gcc/testsuite/obj-c++.dg/exceptions-5.mm @@ -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" } */ diff --git a/gcc/testsuite/obj-c++.dg/method-1.mm b/gcc/testsuite/obj-c++.dg/method-1.mm index fdab6b7a9c3..7317ae2aa87 100644 --- a/gcc/testsuite/obj-c++.dg/method-1.mm +++ b/gcc/testsuite/obj-c++.dg/method-1.mm @@ -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; } diff --git a/gcc/testsuite/obj-c++.dg/method-12.mm b/gcc/testsuite/obj-c++.dg/method-12.mm index 1c78b12224d..2282dec5b15 100644 --- a/gcc/testsuite/obj-c++.dg/method-12.mm +++ b/gcc/testsuite/obj-c++.dg/method-12.mm @@ -7,12 +7,12 @@ #include @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 } */ diff --git a/gcc/testsuite/obj-c++.dg/method-13.mm b/gcc/testsuite/obj-c++.dg/method-13.mm index c2ae447b8e9..b0a1f591117 100644 --- a/gcc/testsuite/obj-c++.dg/method-13.mm +++ b/gcc/testsuite/obj-c++.dg/method-13.mm @@ -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; } diff --git a/gcc/testsuite/obj-c++.dg/method-15.mm b/gcc/testsuite/obj-c++.dg/method-15.mm index a5543d64a3e..da851c931a4 100644 --- a/gcc/testsuite/obj-c++.dg/method-15.mm +++ b/gcc/testsuite/obj-c++.dg/method-15.mm @@ -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)data; +- (id)initWithData:(id)data; /* { dg-line MyCoding_initWithData } */ @end @interface NTGridDataObject: TestsuiteObject @@ -30,14 +30,14 @@ } + (NTGridDataObject*)dataObject:(id)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 \\)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 \\)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 diff --git a/gcc/testsuite/obj-c++.dg/method-16.mm b/gcc/testsuite/obj-c++.dg/method-16.mm index d23bf77fd02..4b691d81d1a 100644 --- a/gcc/testsuite/obj-c++.dg/method-16.mm +++ b/gcc/testsuite/obj-c++.dg/method-16.mm @@ -10,25 +10,25 @@ #include @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 } */ } diff --git a/gcc/testsuite/obj-c++.dg/property/at-property-18.mm b/gcc/testsuite/obj-c++.dg/property/at-property-18.mm index d318210986d..efd6f21cd6e 100644 --- a/gcc/testsuite/obj-c++.dg/property/at-property-18.mm +++ b/gcc/testsuite/obj-c++.dg/property/at-property-18.mm @@ -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 diff --git a/gcc/testsuite/obj-c++.dg/property/at-property-25.mm b/gcc/testsuite/obj-c++.dg/property/at-property-25.mm index 422a29e552c..f5f4988d478 100644 --- a/gcc/testsuite/obj-c++.dg/property/at-property-25.mm +++ b/gcc/testsuite/obj-c++.dg/property/at-property-25.mm @@ -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 } */ diff --git a/gcc/testsuite/obj-c++.dg/property/at-property-5.mm b/gcc/testsuite/obj-c++.dg/property/at-property-5.mm index c8eec2f9224..d4b33d9cf47 100644 --- a/gcc/testsuite/obj-c++.dg/property/at-property-5.mm +++ b/gcc/testsuite/obj-c++.dg/property/at-property-5.mm @@ -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" } */ diff --git a/gcc/testsuite/obj-c++.dg/property/dynamic-2.mm b/gcc/testsuite/obj-c++.dg/property/dynamic-2.mm index 49004eff495..6a12c7fdb7f 100644 --- a/gcc/testsuite/obj-c++.dg/property/dynamic-2.mm +++ b/gcc/testsuite/obj-c++.dg/property/dynamic-2.mm @@ -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 diff --git a/gcc/testsuite/obj-c++.dg/property/property-neg-3.mm b/gcc/testsuite/obj-c++.dg/property/property-neg-3.mm index 0b30931a881..cc9b0689c53 100644 --- a/gcc/testsuite/obj-c++.dg/property/property-neg-3.mm +++ b/gcc/testsuite/obj-c++.dg/property/property-neg-3.mm @@ -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 diff --git a/gcc/testsuite/obj-c++.dg/protocol-inheritance-1.mm b/gcc/testsuite/obj-c++.dg/protocol-inheritance-1.mm index 6c23a4663df..5241b29abbd 100644 --- a/gcc/testsuite/obj-c++.dg/protocol-inheritance-1.mm +++ b/gcc/testsuite/obj-c++.dg/protocol-inheritance-1.mm @@ -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 } */ diff --git a/gcc/testsuite/obj-c++.dg/protocol-inheritance-2.mm b/gcc/testsuite/obj-c++.dg/protocol-inheritance-2.mm index d769949451e..74c9174b5de 100644 --- a/gcc/testsuite/obj-c++.dg/protocol-inheritance-2.mm +++ b/gcc/testsuite/obj-c++.dg/protocol-inheritance-2.mm @@ -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 } */ diff --git a/gcc/testsuite/obj-c++.dg/syntax-error-1.mm b/gcc/testsuite/obj-c++.dg/syntax-error-1.mm index 1fe9ca3c4b0..320d56c5ec1 100644 --- a/gcc/testsuite/obj-c++.dg/syntax-error-1.mm +++ b/gcc/testsuite/obj-c++.dg/syntax-error-1.mm @@ -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 } */ diff --git a/gcc/testsuite/obj-c++.dg/try-catch-13.mm b/gcc/testsuite/obj-c++.dg/try-catch-13.mm index aaf451e2ce7..050d8113555 100644 --- a/gcc/testsuite/obj-c++.dg/try-catch-13.mm +++ b/gcc/testsuite/obj-c++.dg/try-catch-13.mm @@ -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) { diff --git a/gcc/testsuite/objc.dg/bitfield-4.m b/gcc/testsuite/objc.dg/bitfield-4.m index 4883497e8bb..0f78e0b1f65 100644 --- a/gcc/testsuite/objc.dg/bitfield-4.m +++ b/gcc/testsuite/objc.dg/bitfield-4.m @@ -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 diff --git a/gcc/testsuite/objc.dg/class-1.m b/gcc/testsuite/objc.dg/class-1.m index 64304f590ec..05049373fa4 100644 --- a/gcc/testsuite/objc.dg/class-1.m +++ b/gcc/testsuite/objc.dg/class-1.m @@ -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 } */ diff --git a/gcc/testsuite/objc.dg/method-11.m b/gcc/testsuite/objc.dg/method-11.m index ba027a95ab3..60198803e66 100644 --- a/gcc/testsuite/objc.dg/method-11.m +++ b/gcc/testsuite/objc.dg/method-11.m @@ -9,25 +9,25 @@ #include @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 } */ } diff --git a/gcc/testsuite/objc.dg/method-6.m b/gcc/testsuite/objc.dg/method-6.m index 1c87670d8cc..35676b18f06 100644 --- a/gcc/testsuite/objc.dg/method-6.m +++ b/gcc/testsuite/objc.dg/method-6.m @@ -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 } */ diff --git a/gcc/testsuite/objc.dg/method-7.m b/gcc/testsuite/objc.dg/method-7.m index 32dad31677d..a5957aedbaa 100644 --- a/gcc/testsuite/objc.dg/method-7.m +++ b/gcc/testsuite/objc.dg/method-7.m @@ -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; } diff --git a/gcc/testsuite/objc.dg/method-9.m b/gcc/testsuite/objc.dg/method-9.m index 3a6cf874f60..ce2d19b2cd1 100644 --- a/gcc/testsuite/objc.dg/method-9.m +++ b/gcc/testsuite/objc.dg/method-9.m @@ -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)data; +- (id)initWithData:(id)data; /* { dg-line MyCoding_initWithData } */ @end @interface NTGridDataObject: TestsuiteObject @@ -32,14 +32,14 @@ } + (NTGridDataObject*)dataObject:(id)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 \\)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 \\)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 diff --git a/gcc/testsuite/objc.dg/missing-proto-3.m b/gcc/testsuite/objc.dg/missing-proto-3.m index cb7507e9d07..05e1a258183 100644 --- a/gcc/testsuite/objc.dg/missing-proto-3.m +++ b/gcc/testsuite/objc.dg/missing-proto-3.m @@ -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 } */ diff --git a/gcc/testsuite/objc.dg/naming-2.m b/gcc/testsuite/objc.dg/naming-2.m index 6d087509ea2..3dd59f9948d 100644 --- a/gcc/testsuite/objc.dg/naming-2.m +++ b/gcc/testsuite/objc.dg/naming-2.m @@ -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 } */ diff --git a/gcc/testsuite/objc.dg/property/at-property-16.m b/gcc/testsuite/objc.dg/property/at-property-16.m index 95f82e41beb..d61373a9539 100644 --- a/gcc/testsuite/objc.dg/property/at-property-16.m +++ b/gcc/testsuite/objc.dg/property/at-property-16.m @@ -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 diff --git a/gcc/testsuite/objc.dg/property/at-property-18.m b/gcc/testsuite/objc.dg/property/at-property-18.m index e6ffb39cbd2..20edb9b4d51 100644 --- a/gcc/testsuite/objc.dg/property/at-property-18.m +++ b/gcc/testsuite/objc.dg/property/at-property-18.m @@ -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 diff --git a/gcc/testsuite/objc.dg/property/at-property-25.m b/gcc/testsuite/objc.dg/property/at-property-25.m index 422a29e552c..f5f4988d478 100644 --- a/gcc/testsuite/objc.dg/property/at-property-25.m +++ b/gcc/testsuite/objc.dg/property/at-property-25.m @@ -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 } */ diff --git a/gcc/testsuite/objc.dg/property/at-property-5.m b/gcc/testsuite/objc.dg/property/at-property-5.m index 0e8aaa2acda..1267df318ed 100644 --- a/gcc/testsuite/objc.dg/property/at-property-5.m +++ b/gcc/testsuite/objc.dg/property/at-property-5.m @@ -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" } */ diff --git a/gcc/testsuite/objc.dg/property/dynamic-2.m b/gcc/testsuite/objc.dg/property/dynamic-2.m index 203ba34a1f3..9866a3942ef 100644 --- a/gcc/testsuite/objc.dg/property/dynamic-2.m +++ b/gcc/testsuite/objc.dg/property/dynamic-2.m @@ -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 diff --git a/gcc/testsuite/objc.dg/property/property-neg-3.m b/gcc/testsuite/objc.dg/property/property-neg-3.m index 0b30931a881..1902018d5b6 100644 --- a/gcc/testsuite/objc.dg/property/property-neg-3.m +++ b/gcc/testsuite/objc.dg/property/property-neg-3.m @@ -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 diff --git a/gcc/testsuite/objc.dg/protocol-inheritance-1.m b/gcc/testsuite/objc.dg/protocol-inheritance-1.m index 6c23a4663df..5241b29abbd 100644 --- a/gcc/testsuite/objc.dg/protocol-inheritance-1.m +++ b/gcc/testsuite/objc.dg/protocol-inheritance-1.m @@ -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 } */ diff --git a/gcc/testsuite/objc.dg/protocol-inheritance-2.m b/gcc/testsuite/objc.dg/protocol-inheritance-2.m index d769949451e..74c9174b5de 100644 --- a/gcc/testsuite/objc.dg/protocol-inheritance-2.m +++ b/gcc/testsuite/objc.dg/protocol-inheritance-2.m @@ -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 } */