]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Replace absolute linenrs in objc.dg,obj-c++.dg
authorTom de Vries <tom@codesourcery.com>
Fri, 28 Apr 2017 21:24:00 +0000 (21:24 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Fri, 28 Apr 2017 21:24:00 +0000 (21:24 +0000)
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

36 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/obj-c++.dg/bitfield-1.mm
gcc/testsuite/obj-c++.dg/bitfield-4.mm
gcc/testsuite/obj-c++.dg/bitfield-5.mm
gcc/testsuite/obj-c++.dg/exceptions-3.mm
gcc/testsuite/obj-c++.dg/exceptions-5.mm
gcc/testsuite/obj-c++.dg/method-1.mm
gcc/testsuite/obj-c++.dg/method-12.mm
gcc/testsuite/obj-c++.dg/method-13.mm
gcc/testsuite/obj-c++.dg/method-15.mm
gcc/testsuite/obj-c++.dg/method-16.mm
gcc/testsuite/obj-c++.dg/property/at-property-18.mm
gcc/testsuite/obj-c++.dg/property/at-property-25.mm
gcc/testsuite/obj-c++.dg/property/at-property-5.mm
gcc/testsuite/obj-c++.dg/property/dynamic-2.mm
gcc/testsuite/obj-c++.dg/property/property-neg-3.mm
gcc/testsuite/obj-c++.dg/protocol-inheritance-1.mm
gcc/testsuite/obj-c++.dg/protocol-inheritance-2.mm
gcc/testsuite/obj-c++.dg/syntax-error-1.mm
gcc/testsuite/obj-c++.dg/try-catch-13.mm
gcc/testsuite/objc.dg/bitfield-4.m
gcc/testsuite/objc.dg/class-1.m
gcc/testsuite/objc.dg/method-11.m
gcc/testsuite/objc.dg/method-6.m
gcc/testsuite/objc.dg/method-7.m
gcc/testsuite/objc.dg/method-9.m
gcc/testsuite/objc.dg/missing-proto-3.m
gcc/testsuite/objc.dg/naming-2.m
gcc/testsuite/objc.dg/property/at-property-16.m
gcc/testsuite/objc.dg/property/at-property-18.m
gcc/testsuite/objc.dg/property/at-property-25.m
gcc/testsuite/objc.dg/property/at-property-5.m
gcc/testsuite/objc.dg/property/dynamic-2.m
gcc/testsuite/objc.dg/property/property-neg-3.m
gcc/testsuite/objc.dg/protocol-inheritance-1.m
gcc/testsuite/objc.dg/protocol-inheritance-2.m

index 92db79cded76b231da1d48f1bfb90b92dce1d163..589da6df3d1259cbb6ee5ac99ddef77adbda6f83 100644 (file)
@@ -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.
index 92aaae4cfdadf30dbae590395b57e5306bc0d857..a63761904b535c3ea4e8e9843816030f7a9e23f2 100644 (file)
@@ -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 } */
index 9ffa398989c0e9bab416cb88fc5114b4f3c26105..1fd6d3a16688013edbdff69d6bf2421326427dd3 100644 (file)
@@ -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 } */
index b6716df8d97da6d936fb7656732a3364f002eeec..3b0065d7f61847262d170b53087ca86c26d726eb 100644 (file)
 @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
index a9da9d684334e2a7e5883e1339c94187c543da0b..c29752d13999ea7b3f76308a51f030b35f98178f 100644 (file)
@@ -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" } */
     {
index c1a2e4cfbae922ea535fe8b8af5544897e118589..9e733a79055835ee58549ddaffc72df2218cdfb2 100644 (file)
@@ -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" } */
index fdab6b7a9c36b0b11eab599a72a5d5427a69fe16..7317ae2aa87c9359f24e7a58e7b23f74a950fd8e 100644 (file)
 @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;
 }
index 1c78b12224d95856dd8c5d9f0c3f0d69793ec9bb..2282dec5b151509692c3b2c24c4ed21d1323a63c 100644 (file)
@@ -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 } */
index c2ae447b8e978ca1bb4ea731d7a98142e681e7a8..b0a1f59111740ddf2ef579ddfb726f991e768a03 100644 (file)
@@ -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;
 }
index a5543d64a3e586ee8b72357821609d3637020e8c..da851c931a43d2daf974c17bbc1f7c159c7ac139 100644 (file)
@@ -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>
 }
 + (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
index d23bf77fd02db9b992111f045cead8a133ed14d7..4b691d81d1a3b6e9586fe0928e702fe0e3b9f58a 100644 (file)
 #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 } */
 }
index d318210986debabda500eb10567bcf598e2df5d0..efd6f21cd6ec96a1a8eae229ffee3645d0cb9392 100644 (file)
 {
   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
index 422a29e552c85a513b36aae273f8dd69ddf822ff..f5f4988d478f6771200c79e70c5b054dc181f3cc 100644 (file)
@@ -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 } */
index c8eec2f9224da8a50cf1755bed57a10654fa7d95..d4b33d9cf4768b24d9733c568dceaa3ca3b5d799 100644 (file)
 @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" } */
index 49004eff4951fef9fc8e1e3fd4750969ea5d5a61..6a12c7fdb7f12b999089819c0cec6a3cb51904b7 100644 (file)
@@ -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
index 0b30931a8813c6bfbb54120bc3648ab11269305f..cc9b0689c53680c12caaa9450a0b18e75e08116e 100644 (file)
@@ -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
index 6c23a4663df8e8c4db3d6f39293f01a844a4cb89..5241b29abbd404045d7704de083f0e8ccad3a598 100644 (file)
@@ -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 } */
index d769949451e0612cc34f802d8bd2bafd24dac360..74c9174b5de71d6210ee17a252a89472a15ff973 100644 (file)
 
 @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 } */
index 1fe9ca3c4b0b159308dd0a3f55375f11c075550d..320d56c5ec13a5cd050bf56abc296a8299784dd9 100644 (file)
@@ -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 } */
index aaf451e2ce7c42461ccfbccfb86dd695e465ca5e..050d81135556f92d8b8a7846452d2d4a799ef503 100644 (file)
@@ -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) {
index 4883497e8bb8b72446cc7b2ad7b559b372801cc5..0f78e0b1f650db00e07bb36d5e61c57ec540ecd0 100644 (file)
@@ -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
index 64304f590ec47bff8606e83394d4065a4e511905..05049373fa4fcac3c0c15db78ae85f545dce82cc 100644 (file)
@@ -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 } */
index ba027a95ab36732b06b288f2055b27437225f452..60198803e661d1b5aab5f19f7fde9eb5150cc11e 100644 (file)
@@ -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 } */
 }
index 1c87670d8cce68134c23bc9f95dff4f5e3c65683..35676b18f0675d3e7b50f9087a4e68c8c817adfd 100644 (file)
 #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 } */
index 32dad31677d06b9d2d8025523ca023b90934a629..a5957aedbaa3b0bc2af02aaae88d70b3a8d9c255 100644 (file)
@@ -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;
 }
index 3a6cf874f600cacb5ec0606e1f95c49d327cdee7..ce2d19b2cd170ef66e8c87f75ed711be1ee80748 100644 (file)
@@ -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>
 }
 + (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
index cb7507e9d07ea1300c580883d16ac56ae53dd851..05e1a258183c9a8df6e3ce0d354917d4a726c9fd 100644 (file)
@@ -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 } */
 
index 6d087509ea2e8eaeb31eb37b26d9919c3abc2de9..3dd59f9948d639a94589bed2a437a6ffafa8c03d 100644 (file)
@@ -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 } */
index 95f82e41beb7651ebd7251443644689a0ec65a96..d61373a95392d62f5f0d1958f5de9c67e77a27a2 100644 (file)
 {
   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
 
 @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
 
index e6ffb39cbd20135afa23f05d91b0ae04120f2e06..20edb9b4d51739d444f6d2a9a3b749cb4e94ce37 100644 (file)
 {
   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
index 422a29e552c85a513b36aae273f8dd69ddf822ff..f5f4988d478f6771200c79e70c5b054dc181f3cc 100644 (file)
@@ -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 } */
index 0e8aaa2acda2afc187ce3beef642719845b90966..1267df318ede19a663024e4f562a31fb3ac0b645 100644 (file)
 @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" } */
index 203ba34a1f3171406668226ddc1626ea85572622..9866a3942ef18765e46bfe1cedfcf4fcc183ad80 100644 (file)
@@ -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
index 0b30931a8813c6bfbb54120bc3648ab11269305f..1902018d5b67550d43ffec5834aab56ab9b70c15 100644 (file)
@@ -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
index 6c23a4663df8e8c4db3d6f39293f01a844a4cb89..5241b29abbd404045d7704de083f0e8ccad3a598 100644 (file)
@@ -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 } */
index d769949451e0612cc34f802d8bd2bafd24dac360..74c9174b5de71d6210ee17a252a89472a15ff973 100644 (file)
 
 @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 } */