Patchwork [ObjC,test-suite,committed] "next-ify" recent ObjC test-suite additions.

login
register
mail settings
Submitter IainS
Date Nov. 4, 2010, 6:28 p.m.
Message ID <EA03624C-4217-4F5E-AB2A-555F2683D04B@sandoe-acoustics.co.uk>
Download mbox | patch
Permalink /patch/70155/
State New
Headers show

Comments

IainS - Nov. 4, 2010, 6:28 p.m.
Hello, this applies a few tweaks to the test cases recently applied  
for @property.
It also tidies up the forward-1.
property-2 & 3 are no longer relevant to the implementation - so those  
are removed.

applied as  r166321 (r166322 for an update to the Changelog).
thanks
Iain
2010-11-04  Iain Sandoe  <iains@gcc.gnu.org>

	* objc.dg/property/property-2.m: Deleted.
	* objc.dg/property/property-3.m: Deleted.
	
2010-11-04  Iain Sandoe  <iains@gcc.gnu.org>

	* objc-obj-c++-shared/next-mapping.h: Ensure a GNU-compatible nil is
	defined.
	* objc.dg/property/fsf-property-basic.m: XFAIL m64 NeXT run.
	* objc.dg/property/fsf-property-named-ivar.m: Likewise.
	* objc.dg/property/property-1.m: Likewise.
	* objc.dg/property/at-property-6.m: Likewise.
	* objc.dg/property/at-property-7.m: Likewise.
	* objc.dg/property/dotsyntax-1.m: Likewise.
	* objc.dg/property/at-property-8.m: Likewise.
	* objc.dg/property/dotsyntax-2.m: Likewise.
	* objc.dg/property/at-property-9.m: Likewise.
	* objc.dg/property/synthesize-2.m: Likewise.
	* objc.dg/property/at-property-10.m: Likewise.
	* objc.dg/property/at-property-11.m: Likewise.
	* objc.dg/property/at-property-12.m: Likewise.
	* objc.dg/property/at-property-13.m: Likewise.
	* objc.dg/property/fsf-property-method-access.m: Likewise.
	* objc.dg/torture/strings/const-cfstring-1.m: Cater for bogus Darwin10
	linker warning.
	* objc.dg/encode-7-next.m: Use next-mapping.h, ignore deprecation 
	warnings.
	* objc.dg/encode-7-next-64bit.m: Use next-mapping.h, ignore 
	deprecation warnings.  Use Object1 implemenation.
	* objc.dg/demangle-1.m: Provide +initialize.  XFAIL m64 NeXT run.
	* objc/execute/forward-1.m: Move to objc.dg/torture and reduce scope
	to m32 NeXT.
	* objc/execute/forward-1.x: Remove.
Nicola Pero - Nov. 4, 2010, 6:45 p.m.
Looks great. :-)

I have one comment ...

+#ifdef __NEXT_RUNTIME__
++ (id) initialize ;
+#endif

+#ifdef __NEXT_RUNTIME__
++ (id) initialize { return self; }
+#endif

(by the way, there is a space after 'initialize', you should remove it)

Shall we remove the #ifdef __NEXT_RUNTIME__ and always add a +initialize in all tests 
for both runtimes ?  ie, in all tests we can simply add

+ (id) initialize;

+ (id) initialize { return self; }

as the first method in all classes.  Since the +initialize is not part of the test, I 
find it less distracting to remove the #ifdefs and give it as little visual prominence
as possible, since it's almost never relevant to what is being tested.

Ie, I'm happy to agree that we'll add +initialize in all tests for the GNU runtime as well,
and we can drop the #ifdefs. :-)

Thanks

-----Original Message-----
From: "IainS" <developer@sandoe-acoustics.co.uk>
Sent: Thursday, 4 November, 2010 19:28
To: "GCC Patches" <gcc-patches@gcc.gnu.org>
Cc: "Mike Stump" <mrs@gcc.gnu.org>, "Nicola Pero" <nicola.pero@meta-innovation.com>
Subject: [Patch, ObjC, test-suite, committed] "next-ify" recent ObjC test-suite additions.

Hello, this applies a few tweaks to the test cases recently applied  
for @property.
It also tidies up the forward-1.
property-2 & 3 are no longer relevant to the implementation - so those  
are removed.

applied as  r166321 (r166322 for an update to the Changelog).
thanks
Iain
IainS - Nov. 4, 2010, 6:50 p.m.
On 4 Nov 2010, at 18:45, Nicola Pero wrote:


> Shall we remove the #ifdef __NEXT_RUNTIME__ and always add a  
> +initialize in all tests
> for both runtimes ?  ie, in all tests we can simply add
>
> + (id) initialize;
>
> + (id) initialize { return self; }
>
> as the first method in all classes.  Since the +initialize is not  
> part of the test, I
> find it less distracting to remove the #ifdefs and give it as little  
> visual prominence
> as possible, since it's almost never relevant to what is being tested.
>
> Ie, I'm happy to agree that we'll add +initialize in all tests for  
> the GNU runtime as well,
> and we can drop the #ifdefs. :-)

agreed, the fewer ifdefs, the better.

I've got a similar job to do on ObjC++ ... hopefully this evening.

cheers
Iain

Patch

Index: gcc/testsuite/objc-obj-c++-shared/next-mapping.h
===================================================================
--- gcc/testsuite/objc-obj-c++-shared/next-mapping.h	(revision 166320)
+++ gcc/testsuite/objc-obj-c++-shared/next-mapping.h	(working copy)
@@ -19,6 +19,10 @@ 
 #include <stdlib.h>
 #include <string.h>
 
+/* Force a definition of nil that is compatible with GNU runtime.  */
+#undef  nil
+#define nil ((id)0)
+
 #define objc_get_class(C) objc_getClass(C)
 #define objc_get_meta_class(C) objc_getMetaClass(C)
 #define class_get_class_method(C, S) class_getClassMethod(C, S)
Index: gcc/testsuite/objc.dg/property/fsf-property-basic.m
===================================================================
--- gcc/testsuite/objc.dg/property/fsf-property-basic.m	(revision 166320)
+++ gcc/testsuite/objc.dg/property/fsf-property-basic.m	(working copy)
@@ -1,5 +1,6 @@ 
 /* Basic test, auto-generated getter/setter based on property name.  */
 /* { dg-do run } */
+/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 
 extern int printf (char *fmt,...) ;
 extern void abort (void);
Index: gcc/testsuite/objc.dg/property/fsf-property-named-ivar.m
===================================================================
--- gcc/testsuite/objc.dg/property/fsf-property-named-ivar.m	(revision 166320)
+++ gcc/testsuite/objc.dg/property/fsf-property-named-ivar.m	(working copy)
@@ -1,5 +1,6 @@ 
 /* Basic test, auto-generated getter/setter based on named ivar  */
 /* { dg-do run } */
+/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 
 extern int printf (char *fmt,...) ;
 extern void abort (void);
Index: gcc/testsuite/objc.dg/property/property-1.m
===================================================================
--- gcc/testsuite/objc.dg/property/property-1.m	(revision 166320)
+++ gcc/testsuite/objc.dg/property/property-1.m	(working copy)
@@ -2,6 +2,7 @@ 
 /* { dg-options "-std=c99" } */
 /* { dg-do run } */
 /* { dg-additional-sources "../../objc-obj-c++-shared/Object1.m" } */
+/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 
 #import "../../objc-obj-c++-shared/Object1.h"
 
Index: gcc/testsuite/objc.dg/property/property-2.m
===================================================================
--- gcc/testsuite/objc.dg/property/property-2.m	(revision 166320)
+++ gcc/testsuite/objc.dg/property/property-2.m	(working copy)
@@ -1,65 +0,0 @@ 
-/* This program tests use of properties . */
-/* { dg-do run { target *-*-darwin* } } */
-/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
-/* We can't do this yet on m64, since we have not got the NSConstantString implementation
-   built-in to the compiler, and therefore we get missing implementation warnings.  */
-/* { dg-require-effective-target ilp32 } */
-/* Force ABI = 0 in the NeXT headers, also suppress deprecation warnings.  */
-/* { dg-options "-framework Foundation -fobjc-exceptions -mmacosx-version-min=10.4 -Wno-deprecated-declarations" } */
-
-/* FIXME: There is no reason to use NSString in this file.  */
-
-#include <objc/objc-api.h>
-#include <Foundation/Foundation.h>
-
-@interface Person : NSObject
-@property NSString *firstName, *lastName;
-@property(readonly) NSString *fullName;
-@end
-
-@interface Group : NSObject
-@property Person *techLead, *runtimeGuru, *propertiesMaven;
-@end
-
-@implementation Group
-@property Person *techLead, *runtimeGuru, *propertiesMaven;
-- init {
-  techLead = [[Person alloc] init];
-  runtimeGuru = [[Person alloc] init];
-  propertiesMaven = [[Person alloc] init];
-  return self;
-}
-@end
-
-@implementation Person
-@property NSString *firstName, *lastName;
-@property(readonly) NSString *fullName;
-- (NSString*)fullName { // computed getter
-    return [NSString stringWithFormat:@"%@ %@", firstName, lastName];
-}
-@end
-
-NSString *playWithProperties()
-{
-  Group *g = [[Group alloc] init] ;
-
-  g.techLead.firstName = @"Blaine";
-  g.techLead.lastName = @"Garst";
-  g.runtimeGuru.firstName = @"Greg";
-  g.runtimeGuru.lastName = @"Parker";
-  g.propertiesMaven.firstName = @"Patrick";
-  g.propertiesMaven.lastName = @"Beard";
-
-  return [NSString stringWithFormat:@"techlead %@ runtimeGuru %@ propertiesMaven %@",
-                        g.techLead.fullName, g.runtimeGuru.fullName, g.propertiesMaven.fullName];
-}
-
-main()
-{
-    char buf [256];
-    NSAutoreleasePool* pool  = [[NSAutoreleasePool alloc] init];
-    sprintf(buf, "%s", [playWithProperties() cString]);
-    [pool release];
-    return strcmp (buf, "techlead Blaine Garst runtimeGuru Greg Parker propertiesMaven Patrick Beard");
-}
-
Index: gcc/testsuite/objc.dg/property/property-3.m
===================================================================
--- gcc/testsuite/objc.dg/property/property-3.m	(revision 166320)
+++ gcc/testsuite/objc.dg/property/property-3.m	(working copy)
@@ -1,75 +0,0 @@ 
-/* This program tests use of properties . */
-/* { dg-do run { target *-*-darwin* } } */
-/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
-/* We can't do this yet on m64, since we have not got the NSConstantString implementation
-   built-in to the compiler, and therefore we get missing implementation warnings.  */
-/* { dg-require-effective-target ilp32 } */
-/* Force ABI = 0 in the NeXT headers, also suppress deprecation warnings.  */
-/* { dg-options "-framework Foundation -fobjc-exceptions -mmacosx-version-min=10.4 -Wno-deprecated-declarations" } */
-
-#include <objc/objc-api.h>
-#include <Foundation/Foundation.h>
-
-@interface Person : NSObject
-{
-}
-@property NSString *firstName, *lastName;
-@property(readonly) NSString *fullName;
-
-@end
-
-@interface Group : NSObject
-{
-}
-
-@property Person *techLead, *runtimeGuru, *propertiesMaven;
-
-@end
-
-@implementation Group
-
-@property Person *techLead, *runtimeGuru, *propertiesMaven;
-- init {
-  techLead = [[Person alloc] init];
-  runtimeGuru = [[Person alloc] init];
-  propertiesMaven = [[Person alloc] init];
-  return self;
-}
-
-@end
-
-@implementation Person
-
-@property NSString *firstName, *lastName;
-@property(readonly, getter = fullName) NSString *fullName;
-
-- (NSString*)fullName { // computed getter
-    return [NSString stringWithFormat:@"%@ %@", firstName, lastName];
-}
-
-@end
-
-NSString *playWithProperties()
-{
-  Group *g = [[Group alloc] init] ;
-
-  g.techLead.firstName = @"Blaine";
-  g.techLead.lastName = @"Garst";
-  g.runtimeGuru.firstName = @"Greg";
-  g.runtimeGuru.lastName = @"Parker";
-  g.propertiesMaven.firstName = @"Patrick";
-  g.propertiesMaven.lastName = @"Beard";
-
-  return [NSString stringWithFormat:@"techlead %@ runtimeGuru %@ propertiesMaven %@",
-                        g.techLead.fullName, g.runtimeGuru.fullName, g.propertiesMaven.fullName];
-}
-
-main()
-{
-    char buf [256];
-    NSAutoreleasePool* pool  = [[NSAutoreleasePool alloc] init];
-    sprintf(buf, "%s", [playWithProperties() cString]);
-    [pool release];
-    return strcmp (buf, "techlead Blaine Garst runtimeGuru Greg Parker propertiesMaven Patrick Beard");
-}
-
Index: gcc/testsuite/objc.dg/property/at-property-6.m
===================================================================
--- gcc/testsuite/objc.dg/property/at-property-6.m	(revision 166320)
+++ gcc/testsuite/objc.dg/property/at-property-6.m	(working copy)
@@ -1,5 +1,6 @@ 
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010.  */
 /* { dg-do run } */
+/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 
 /* Test the property syntax with non-synthesized setter/getter
    and with standard names.  */
Index: gcc/testsuite/objc.dg/property/at-property-7.m
===================================================================
--- gcc/testsuite/objc.dg/property/at-property-7.m	(revision 166320)
+++ gcc/testsuite/objc.dg/property/at-property-7.m	(working copy)
@@ -1,5 +1,6 @@ 
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010.  */
 /* { dg-do run } */
+/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 
 /* Test the property syntax with non-synthesized setter/getter
    and with a non-standard name for the getter.  */
Index: gcc/testsuite/objc.dg/property/at-property-8.m
===================================================================
--- gcc/testsuite/objc.dg/property/at-property-8.m	(revision 166320)
+++ gcc/testsuite/objc.dg/property/at-property-8.m	(working copy)
@@ -1,5 +1,6 @@ 
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010.  */
 /* { dg-do run } */
+/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 
 /* Test the property syntax with non-synthesized setter/getter
    and with a non-standard name for the setter.  */
Index: gcc/testsuite/objc.dg/property/dotsyntax-1.m
===================================================================
--- gcc/testsuite/objc.dg/property/dotsyntax-1.m	(revision 166320)
+++ gcc/testsuite/objc.dg/property/dotsyntax-1.m	(working copy)
@@ -1,5 +1,6 @@ 
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
 /* { dg-do run } */
+/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 
 /* Test the 'dot syntax' without a declarated property.  */
 
Index: gcc/testsuite/objc.dg/property/at-property-9.m
===================================================================
--- gcc/testsuite/objc.dg/property/at-property-9.m	(revision 166320)
+++ gcc/testsuite/objc.dg/property/at-property-9.m	(working copy)
@@ -1,5 +1,6 @@ 
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010.  */
 /* { dg-do run } */
+/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 
 /* Test the property syntax with synthesized setter/getter
    and with a non-standard name for the getter and setter.  */
Index: gcc/testsuite/objc.dg/property/dotsyntax-2.m
===================================================================
--- gcc/testsuite/objc.dg/property/dotsyntax-2.m	(revision 166320)
+++ gcc/testsuite/objc.dg/property/dotsyntax-2.m	(working copy)
@@ -1,5 +1,6 @@ 
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
 /* { dg-do run } */
+/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 
 /* Test the 'dot syntax' without a declarated property.  This tests the case where
    only the setter (or only the getter) exists.  */
Index: gcc/testsuite/objc.dg/property/at-property-10.m
===================================================================
--- gcc/testsuite/objc.dg/property/at-property-10.m	(revision 166320)
+++ gcc/testsuite/objc.dg/property/at-property-10.m	(working copy)
@@ -1,5 +1,6 @@ 
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010.  */
 /* { dg-do run } */
+/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 
 /* Test the property syntax in a number of expressions.  */
 
Index: gcc/testsuite/objc.dg/property/synthesize-2.m
===================================================================
--- gcc/testsuite/objc.dg/property/synthesize-2.m	(revision 166320)
+++ gcc/testsuite/objc.dg/property/synthesize-2.m	(working copy)
@@ -1,5 +1,6 @@ 
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010.  */
 /* { dg-do run } */
+/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 
 #include <objc/objc.h>
 #include <objc/runtime.h>
Index: gcc/testsuite/objc.dg/property/at-property-11.m
===================================================================
--- gcc/testsuite/objc.dg/property/at-property-11.m	(revision 166320)
+++ gcc/testsuite/objc.dg/property/at-property-11.m	(working copy)
@@ -1,5 +1,6 @@ 
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010.  */
 /* { dg-do run } */
+/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 
 /* Test that properties are found even if implemented in superclasses.  */
 
Index: gcc/testsuite/objc.dg/property/at-property-12.m
===================================================================
--- gcc/testsuite/objc.dg/property/at-property-12.m	(revision 166320)
+++ gcc/testsuite/objc.dg/property/at-property-12.m	(working copy)
@@ -1,5 +1,6 @@ 
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010.  */
 /* { dg-do run } */
+/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 
 /* Test atomic, assign synthesized methods.  */
 
Index: gcc/testsuite/objc.dg/property/at-property-13.m
===================================================================
--- gcc/testsuite/objc.dg/property/at-property-13.m	(revision 166320)
+++ gcc/testsuite/objc.dg/property/at-property-13.m	(working copy)
@@ -1,5 +1,6 @@ 
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010.  */
 /* { dg-do run } */
+/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 
 /* Test retain and copy synthesized methods.  */
 
Index: gcc/testsuite/objc.dg/property/fsf-property-method-access.m
===================================================================
--- gcc/testsuite/objc.dg/property/fsf-property-method-access.m	(revision 166320)
+++ gcc/testsuite/objc.dg/property/fsf-property-method-access.m	(working copy)
@@ -1,5 +1,6 @@ 
 /* test access in methods, auto-generated getter/setter based on property name.  */
 /* { dg-do run } */
+/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 
 extern int printf (char *fmt,...) ;
 extern void abort (void);
Index: gcc/testsuite/objc.dg/torture/strings/const-cfstring-1.m
===================================================================
--- gcc/testsuite/objc.dg/torture/strings/const-cfstring-1.m	(revision 166320)
+++ gcc/testsuite/objc.dg/torture/strings/const-cfstring-1.m	(working copy)
@@ -9,6 +9,9 @@ 
 /* { dg-skip-if "NeXT only" { *-*-* } { "-fgnu-runtime" } { "" } } */
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 /* { dg-options "-mconstant-cfstrings -framework Cocoa" } */
+/* Darwin10's linker emits a warning that the constant strings are incompatible with writable ones.
+   Well, we don't implement writable ones at this juncture.  */
+/* { dg-options "-mconstant-cfstrings -framework Cocoa -Wl,-w" { target *-*-darwin[123]* } } */
 
 #import <Foundation/NSString.h>
 #import <CoreFoundation/CFString.h>
Index: gcc/testsuite/objc.dg/encode-7-next.m
===================================================================
--- gcc/testsuite/objc.dg/encode-7-next.m	(revision 166320)
+++ gcc/testsuite/objc.dg/encode-7-next.m	(working copy)
@@ -3,9 +3,11 @@ 
 
 /* { dg-do run { target *-*-darwin* } } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-options "-Wno-deprecated-declarations" } */
 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
 
 #include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/next-mapping.h"
 #include <stdbool.h>
 #include <string.h>
 #include <stdlib.h>
Index: gcc/testsuite/objc.dg/encode-7-next-64bit.m
===================================================================
--- gcc/testsuite/objc.dg/encode-7-next-64bit.m	(revision 166320)
+++ gcc/testsuite/objc.dg/encode-7-next-64bit.m	(working copy)
@@ -2,10 +2,13 @@ 
 
 /* { dg-do run { target *-*-darwin* } } */
 /* { dg-require-effective-target lp64 } */
+/* { dg-options "-Wno-deprecated-declarations" } */
 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-sources "../objc-obj-c++-shared/Object1.m" } */
 
-#include <objc/Object.h>
+#include "../objc-obj-c++-shared/Object1.h"
+#include "../objc-obj-c++-shared/next-mapping.h"
 #include <stdbool.h>
 #include <string.h>
 #include <stdlib.h>
Index: gcc/testsuite/objc.dg/demangle-1.m
===================================================================
--- gcc/testsuite/objc.dg/demangle-1.m	(revision 166320)
+++ gcc/testsuite/objc.dg/demangle-1.m	(working copy)
@@ -1,5 +1,6 @@ 
 /* Test demangling an Objective-C method.  */
 /* { dg-do run } */
+/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 
 #include <string.h>
 #include <stdlib.h>
@@ -14,6 +15,9 @@ 
 + (int) testFunction1;
 + (int) test_function2;
 + (int) __testFunction3: (int)unused  andArgument: (char)unused2;
+#ifdef __NEXT_RUNTIME__
++ (id) initialize ;
+#endif
 @end
 
 @implementation DemangleTest
@@ -37,6 +41,9 @@ 
   printf ("%s\n", __PRETTY_FUNCTION__);
   return strcmp (__PRETTY_FUNCTION__, "+[DemangleTest __testFunction3:andArgument:]");
 }
+#ifdef __NEXT_RUNTIME__
++ (id) initialize { return self; }
+#endif
 @end
 
 int main ()
Index: gcc/testsuite/objc/execute/forward-1.m
===================================================================
--- gcc/testsuite/objc/execute/forward-1.m	(revision 166320)
+++ gcc/testsuite/objc/execute/forward-1.m	(working copy)
@@ -1,80 +0,0 @@ 
-/* See if -forward::/-performv:: is able to work. */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#import "../../objc-obj-c++-shared/Object1.h"
-#import "../../objc-obj-c++-shared/next-mapping.h"
-#include <objc/objc-api.h>
-
-#define VALUETOUSE 1234567890
-
-id forwarder, receiver;
-
-@interface Forwarder: Object
-{
-    id receiver;
-}
-
--initWithReceiver:theReceiver;
-
-@end
-
-@interface Receiver:Object
-{
-    int foo;
-}
--display;
--initWithFoo:(int)theFoo;
-@end
-@implementation Receiver
-
--initWithFoo: (int)theFoo
-{
-    foo = theFoo;
-    return self;
-}
-
--display
-{
-    /* Check to see if we are really the reciever. */
-    if (self != receiver)
-        abort ();
-    /* And the value of foo is set correctly. */
-    if (foo != VALUETOUSE)
-      abort ();
-    return self;
-}
-
-@end
-
-@implementation Forwarder
--initWithReceiver: theReceiver
-{
-    [super init];
-    receiver = theReceiver;
-    return self;
-}
-#ifdef __NEXT_RUNTIME__
-- forward: (SEL)theSel: (marg_list)theArgFrame
-#else
--(retval_t) forward: (SEL)theSel: (arglist_t)theArgFrame
-#endif
-{
-  /* If we have a reciever try to perform on that object */
-    if (receiver)
-        return [receiver performv: theSel: theArgFrame];
-    return [self doesNotRecognize:theSel];
-}
-@end
-int main()
-{
-    /* Init the reciever. */
-    receiver = [[Receiver alloc] initWithFoo: VALUETOUSE];
-    /* Init the fowarder. */
-    forwarder = [[Forwarder alloc] initWithReceiver: receiver];
-    /* Call display on the forwarder which in turns calls display on
-       the reciever. */
-    [forwarder display];
-    exit(0);
-}
Index: gcc/testsuite/objc/execute/forward-1.x
===================================================================
--- gcc/testsuite/objc/execute/forward-1.x	(revision 166320)
+++ gcc/testsuite/objc/execute/forward-1.x	(working copy)
@@ -1,36 +0,0 @@ 
-load_lib target-supports.exp
-
-# XFAIL: PR libobjc/36610, for targets which pass arguments via registers
-
-if { ([istarget x86_64-*-linux*] && [check_effective_target_lp64] )
-     || [istarget powerpc*-*-linux*]
-     || [istarget powerpc*-*-aix*]
-     || [istarget s390*-*-*-linux*]
-     || [istarget sh4-*-linux*]
-     || [istarget hppa*-*-linux*]
-     || [istarget hppa*-*-hpux*]
-     || [istarget ia64-*-linux*] } {
-    set torture_execute_xfail "*-*-*"
-}
-
-# For darwin and alpha-linux it fails with -fgnu-runtime,
-# passes with -fnext-runtime.
-
-if { [istarget alpha*-*-linux*]
-     || [istarget alpha*-dec-osf*]
-     || ([istarget i?86-*-solaris2*] && [check_effective_target_lp64] )
-     || [istarget mips-sgi-irix*]
-     || [istarget sparc*-sun-solaris2*]
-     || ([istarget *-*-darwin*] && [check_effective_target_lp64] ) } {
-    set torture_eval_before_execute {
-	global compiler_conditional_xfail_data
-	set compiler_conditional_xfail_data {
-	    "Target fails with -fgnu-runtime" \
-		"*-*-*" \
-		{ "-fgnu-runtime" } \
-		{ "" }
-	}
-    }
-}
-
-return 0