Patchwork Fix for 3 existing ObjC++ testcases

login
register
mail settings
Submitter Nicola Pero
Date Nov. 28, 2010, 2:16 p.m.
Message ID <1290953773.094223532@192.168.2.229>
Download mbox | patch
Permalink /patch/73331/
State New
Headers show

Comments

Nicola Pero - Nov. 28, 2010, 2:16 p.m.
This patch fixes 3 existing ObjC++ where I had left some FIXMEs.  The compiler 
was (and is) fine and produces the correct error messages; the problems are only 
with the testsuite.

In at-property-1.mm, the testcase was simply looking for the wrong messages - I fixed it. :-)

In at-property-16.mm and at-property-20.mm, I found out that using a certain combination
of dg-message on some lines and dg-warning on some other lines works and I could uncomment
all the code and run the whole testcase.  It is still unclear why that combination works and
not others, as the warnings to be matched are identical.  Anyway at least we can compile 
the whole testcase, which is better than before. ;-)

Ok to commit ?

Thanks
Mike Stump - Nov. 28, 2010, 11:09 p.m.
On Nov 28, 2010, at 6:16 AM, "Nicola Pero" <nicola.pero@meta-innovation.com> wrote:
> This patch fixes 3 existing ObjC++ where I had left some FIXMEs.

> Ok to commit ?

Ok.
>

Patch

Index: ChangeLog
===================================================================
--- ChangeLog   (revision 167216)
+++ ChangeLog   (working copy)
@@ -1,3 +1,9 @@ 
+2010-11-28  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       * obj-c++.dg/property/at-property-1.mm: Fixed testcase.
+       * obj-c++.dg/property/at-property-16.mm: Fixed testcase.
+       * obj-c++.dg/property/at-property-20.mm: Fixed testcase.
+
 2010-11-27  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/46638
Index: obj-c++.dg/property/at-property-20.mm
===================================================================
--- obj-c++.dg/property/at-property-20.mm       (revision 167216)
+++ obj-c++.dg/property/at-property-20.mm       (working copy)
@@ -42,10 +42,10 @@ 
 @property float c;                            /* { dg-warning "originally specified here" } */
 @property (assign) MyRootClass *d;            /* { dg-warning "originally specified here" } */
 @property (assign) MySubClass1 *e;            /* { dg-warning "originally specified here" } */
-/* FIXME: The compiler seems to generate messages correctly, but the testsuite still fails the test.  */
-/*@property (assign, readonly) MySubClass1 *f; */ /*  dg-warning "originally specified here"  */
+/* FIXME: Mysteriously two of the next three need to be 'dg-message' instead of 'dg-warning' for the testcase to work.  */
+@property (assign, readonly) MySubClass1 *f;  /* { dg-message "originally specified here" } */
 @property (assign) MySubClass3 *g;            /* { dg-warning "originally specified here" } */
-/*@property (assign, readonly) MySubClass3 *h; */ /*  dg-warning "originally specified here"  */
+@property (assign, readonly) MySubClass3 *h;  /* { dg-message "originally specified here"  } */
 @end
 
 /* The following are all OK because they are identical.  */
@@ -69,9 +69,9 @@ 
 @property int c;                              /* { dg-warning "type of property .c. conflicts with previous declaration" } */
 @property (assign) id d;                      /* { dg-warning "type of property .d. conflicts with previous declaration" } */
 @property (assign) MyRootClass *e;            /* { dg-warning "type of property .e. conflicts with previous declaration" } */
-/*@property (assign, readonly) MyRootClass *f; */ /*  dg-warning "type of property .f. conflicts with previous declaration"  */
+@property (assign, readonly) MyRootClass *f;  /* { dg-warning "type of property .f. conflicts with previous declaration" } */
 @property (assign) MySubClass2 *g;            /* { dg-warning "type of property .g. conflicts with previous declaration" } */
-/*@property (assign, readonly) MySubClass2 *h; */ /*  dg-warning "type of property .h. conflicts with previous declaration"  */
+@property (assign, readonly) MySubClass2 *h;  /* { dg-warning "type of property .h. conflicts with previous declaration" } */
 @end
 
 /* The following are OK.  */
Index: obj-c++.dg/property/at-property-1.mm
===================================================================
--- obj-c++.dg/property/at-property-1.mm        (revision 167216)
+++ obj-c++.dg/property/at-property-1.mm        (working copy)
@@ -15,9 +15,6 @@ 
 @property (readonly,) int f;    /* { dg-error "expected identifier" } */
 @property (xxx) int g;          /* { dg-error "unknown property attribute" } */
 @property (readonly,xxx) int h; /* { dg-error "unknown property attribute" } */
-/* FIXME - there is a problem with the testuite in running the following test.  The compiler
-   generates the messages, but the testsuite still complains.  */
-/*@property ( int i;*/          /* dg-error "unknown property attribute" */
-                                /* dg-error "expected ... "       "" { target *-*-* } 18 */
-                                /* dg-error "expected identfier " "" { target *-*-* } 18 */
+@property ( int i;              /* { dg-error "expected identifier" } */
+                                /* { dg-error "expected ... "       "" { target *-*-* } 18 } */
 @end
Index: obj-c++.dg/property/at-property-16.mm
===================================================================
--- obj-c++.dg/property/at-property-16.mm       (revision 167216)
+++ obj-c++.dg/property/at-property-16.mm       (working copy)
@@ -14,10 +14,10 @@ 
 @property (retain) id b;                  /* { dg-warning "originally specified here" } */
 @property int c;                          /* { dg-warning "originally specified here" } */
 @property (nonatomic) int d;              /* { dg-warning "originally specified here" } */
-/* FIXME: The compiler generates these errors, but the testsuite still fails the tests.  */
-@property int e;                          /* dg-warning "originally specified here" */
-@property int f;                          /* dg-warning "originally specified here" */
-@property int g;                          /* dg-warning "originally specified here" */
+/* FIXME: Mysteriously the next 3 need to be 'dg-message' instead of 'dg-warning' for the testcase to work.  */
+@property int e;                          /* { dg-message "originally specified here" } */
+@property int f;                          /* { dg-message "originally specified here" } */
+@property int g;                          /* { dg-message "originally specified here" } */
 @property (readonly) int h;               /* Ok */
 @property (readonly,getter=getMe) int i;  /* { dg-warning "originally specified here" } */
 @end
@@ -39,10 +39,9 @@ 
 @property (assign) id b;         /* { dg-warning "assign semantics attributes of property .b. conflict with previous declaration" } */
 @property (nonatomic) int c;     /* { dg-warning ".nonatomic. attribute of property .c. conflicts with previous declaration" } */
 @property int d;                 /* { dg-warning ".nonatomic. attribute of property .d. conflicts with previous declaration" } */
-/* FIXME: The compiler generates these errors, but the testsuite still fails the tests.  */
-/*@property (setter=setX:) int e;*/  /*  dg-warning ".setter. attribute of property .e. conflicts with previous declaration"  */
-/*@property (getter=x) int f;*/      /*  dg-warning ".getter. attribute of property .f. conflicts with previous declaration"  */
-/*@property (readonly) int g;*/      /*  dg-warning ".readonly. attribute of property .g. conflicts with previous declaration"  */
+@property (setter=setX:) int e;  /* { dg-warning ".setter. attribute of property .e. conflicts with previous declaration" } */
+@property (getter=x) int f;      /* { dg-warning ".getter. attribute of property .f. conflicts with previous declaration" } */
+@property (readonly) int g;      /* { dg-warning ".readonly. attribute of property .g. conflicts with previous declaration" } */
 @property (readwrite) int h;     /* Ok */
 @property (readonly) int i;      /* { dg-warning ".getter. attribute of property .i. conflicts with previous declaration" } */
 @end