From 5b4db3f50e13fa36c4b97416436b77d7727340ab Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Thu, 4 Nov 2010 18:19:54 +0000 Subject: [PATCH] next-mapping.h: Ensure a GNU-compatible nil is defined. * 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. From-SVN: r166321 --- gcc/testsuite/ChangeLog | 30 +++++++ .../objc-obj-c++-shared/next-mapping.h | 4 + gcc/testsuite/objc.dg/demangle-1.m | 7 ++ gcc/testsuite/objc.dg/encode-7-next-64bit.m | 5 +- gcc/testsuite/objc.dg/encode-7-next.m | 2 + .../objc.dg/property/at-property-10.m | 1 + .../objc.dg/property/at-property-11.m | 1 + .../objc.dg/property/at-property-12.m | 1 + .../objc.dg/property/at-property-13.m | 1 + .../objc.dg/property/at-property-6.m | 1 + .../objc.dg/property/at-property-7.m | 1 + .../objc.dg/property/at-property-8.m | 1 + .../objc.dg/property/at-property-9.m | 1 + gcc/testsuite/objc.dg/property/dotsyntax-1.m | 1 + gcc/testsuite/objc.dg/property/dotsyntax-2.m | 1 + .../objc.dg/property/fsf-property-basic.m | 1 + .../property/fsf-property-method-access.m | 1 + .../property/fsf-property-named-ivar.m | 1 + gcc/testsuite/objc.dg/property/property-1.m | 1 + gcc/testsuite/objc.dg/property/property-2.m | 65 --------------- gcc/testsuite/objc.dg/property/property-3.m | 75 ----------------- gcc/testsuite/objc.dg/property/synthesize-2.m | 1 + .../torture/strings/const-cfstring-1.m | 3 + gcc/testsuite/objc/execute/forward-1.m | 80 ------------------- gcc/testsuite/objc/execute/forward-1.x | 36 --------- 25 files changed, 65 insertions(+), 257 deletions(-) delete mode 100644 gcc/testsuite/objc.dg/property/property-2.m delete mode 100644 gcc/testsuite/objc.dg/property/property-3.m delete mode 100644 gcc/testsuite/objc/execute/forward-1.m delete mode 100644 gcc/testsuite/objc/execute/forward-1.x diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 89a05356e3c..fa4ea1da2b6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,33 @@ +2010-11-04 Iain Sandoe + + * 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. + 2010-11-04 Jason Merrill * g++.dg/cpp0x/constexpr-access.C: New. diff --git a/gcc/testsuite/objc-obj-c++-shared/next-mapping.h b/gcc/testsuite/objc-obj-c++-shared/next-mapping.h index b52b6a78689..e5e2d22a6e5 100644 --- a/gcc/testsuite/objc-obj-c++-shared/next-mapping.h +++ b/gcc/testsuite/objc-obj-c++-shared/next-mapping.h @@ -19,6 +19,10 @@ #include #include +/* 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) diff --git a/gcc/testsuite/objc.dg/demangle-1.m b/gcc/testsuite/objc.dg/demangle-1.m index 0cee76b5582..f790c56ca6a 100644 --- a/gcc/testsuite/objc.dg/demangle-1.m +++ b/gcc/testsuite/objc.dg/demangle-1.m @@ -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 #include @@ -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 () diff --git a/gcc/testsuite/objc.dg/encode-7-next-64bit.m b/gcc/testsuite/objc.dg/encode-7-next-64bit.m index bda3da8d82f..3a5e61dafa5 100644 --- a/gcc/testsuite/objc.dg/encode-7-next-64bit.m +++ b/gcc/testsuite/objc.dg/encode-7-next-64bit.m @@ -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 +#include "../objc-obj-c++-shared/Object1.h" +#include "../objc-obj-c++-shared/next-mapping.h" #include #include #include diff --git a/gcc/testsuite/objc.dg/encode-7-next.m b/gcc/testsuite/objc.dg/encode-7-next.m index 70cd4b8a4e1..2768e115fea 100644 --- a/gcc/testsuite/objc.dg/encode-7-next.m +++ b/gcc/testsuite/objc.dg/encode-7-next.m @@ -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 #include #include diff --git a/gcc/testsuite/objc.dg/property/at-property-10.m b/gcc/testsuite/objc.dg/property/at-property-10.m index 1a7a0430899..945ada5da34 100644 --- a/gcc/testsuite/objc.dg/property/at-property-10.m +++ b/gcc/testsuite/objc.dg/property/at-property-10.m @@ -1,5 +1,6 @@ /* Contributed by Nicola Pero , 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. */ diff --git a/gcc/testsuite/objc.dg/property/at-property-11.m b/gcc/testsuite/objc.dg/property/at-property-11.m index 2526a9cc1de..33baee9d662 100644 --- a/gcc/testsuite/objc.dg/property/at-property-11.m +++ b/gcc/testsuite/objc.dg/property/at-property-11.m @@ -1,5 +1,6 @@ /* Contributed by Nicola Pero , 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. */ diff --git a/gcc/testsuite/objc.dg/property/at-property-12.m b/gcc/testsuite/objc.dg/property/at-property-12.m index e96b198282c..e36f57aaa24 100644 --- a/gcc/testsuite/objc.dg/property/at-property-12.m +++ b/gcc/testsuite/objc.dg/property/at-property-12.m @@ -1,5 +1,6 @@ /* Contributed by Nicola Pero , October 2010. */ /* { dg-do run } */ +/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ /* Test atomic, assign synthesized methods. */ diff --git a/gcc/testsuite/objc.dg/property/at-property-13.m b/gcc/testsuite/objc.dg/property/at-property-13.m index dfdb02f7127..89bf748a2ee 100644 --- a/gcc/testsuite/objc.dg/property/at-property-13.m +++ b/gcc/testsuite/objc.dg/property/at-property-13.m @@ -1,5 +1,6 @@ /* Contributed by Nicola Pero , October 2010. */ /* { dg-do run } */ +/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ /* Test retain and copy synthesized methods. */ diff --git a/gcc/testsuite/objc.dg/property/at-property-6.m b/gcc/testsuite/objc.dg/property/at-property-6.m index 079995c526a..b3584cc4052 100644 --- a/gcc/testsuite/objc.dg/property/at-property-6.m +++ b/gcc/testsuite/objc.dg/property/at-property-6.m @@ -1,5 +1,6 @@ /* Contributed by Nicola Pero , 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. */ diff --git a/gcc/testsuite/objc.dg/property/at-property-7.m b/gcc/testsuite/objc.dg/property/at-property-7.m index 6f182d0730e..6f5cedaac08 100644 --- a/gcc/testsuite/objc.dg/property/at-property-7.m +++ b/gcc/testsuite/objc.dg/property/at-property-7.m @@ -1,5 +1,6 @@ /* Contributed by Nicola Pero , 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. */ diff --git a/gcc/testsuite/objc.dg/property/at-property-8.m b/gcc/testsuite/objc.dg/property/at-property-8.m index 94ed86e7f8b..497dedca73a 100644 --- a/gcc/testsuite/objc.dg/property/at-property-8.m +++ b/gcc/testsuite/objc.dg/property/at-property-8.m @@ -1,5 +1,6 @@ /* Contributed by Nicola Pero , 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. */ diff --git a/gcc/testsuite/objc.dg/property/at-property-9.m b/gcc/testsuite/objc.dg/property/at-property-9.m index 6e2d118882f..0f144fad261 100644 --- a/gcc/testsuite/objc.dg/property/at-property-9.m +++ b/gcc/testsuite/objc.dg/property/at-property-9.m @@ -1,5 +1,6 @@ /* Contributed by Nicola Pero , 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. */ diff --git a/gcc/testsuite/objc.dg/property/dotsyntax-1.m b/gcc/testsuite/objc.dg/property/dotsyntax-1.m index 8bc3b3a5957..8922f5f0340 100644 --- a/gcc/testsuite/objc.dg/property/dotsyntax-1.m +++ b/gcc/testsuite/objc.dg/property/dotsyntax-1.m @@ -1,5 +1,6 @@ /* Contributed by Nicola Pero , 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. */ diff --git a/gcc/testsuite/objc.dg/property/dotsyntax-2.m b/gcc/testsuite/objc.dg/property/dotsyntax-2.m index ba615a31825..03e49aebc52 100644 --- a/gcc/testsuite/objc.dg/property/dotsyntax-2.m +++ b/gcc/testsuite/objc.dg/property/dotsyntax-2.m @@ -1,5 +1,6 @@ /* Contributed by Nicola Pero , 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. */ diff --git a/gcc/testsuite/objc.dg/property/fsf-property-basic.m b/gcc/testsuite/objc.dg/property/fsf-property-basic.m index 20fd9788477..ddc0589e02a 100644 --- a/gcc/testsuite/objc.dg/property/fsf-property-basic.m +++ b/gcc/testsuite/objc.dg/property/fsf-property-basic.m @@ -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); diff --git a/gcc/testsuite/objc.dg/property/fsf-property-method-access.m b/gcc/testsuite/objc.dg/property/fsf-property-method-access.m index 866f52208a1..01eea5bf75d 100644 --- a/gcc/testsuite/objc.dg/property/fsf-property-method-access.m +++ b/gcc/testsuite/objc.dg/property/fsf-property-method-access.m @@ -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); diff --git a/gcc/testsuite/objc.dg/property/fsf-property-named-ivar.m b/gcc/testsuite/objc.dg/property/fsf-property-named-ivar.m index 3e0b52976b0..5458568508d 100644 --- a/gcc/testsuite/objc.dg/property/fsf-property-named-ivar.m +++ b/gcc/testsuite/objc.dg/property/fsf-property-named-ivar.m @@ -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); diff --git a/gcc/testsuite/objc.dg/property/property-1.m b/gcc/testsuite/objc.dg/property/property-1.m index fbc181eb75b..147f007b946 100644 --- a/gcc/testsuite/objc.dg/property/property-1.m +++ b/gcc/testsuite/objc.dg/property/property-1.m @@ -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" diff --git a/gcc/testsuite/objc.dg/property/property-2.m b/gcc/testsuite/objc.dg/property/property-2.m deleted file mode 100644 index c14d759d3e8..00000000000 --- a/gcc/testsuite/objc.dg/property/property-2.m +++ /dev/null @@ -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 -#include - -@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"); -} - diff --git a/gcc/testsuite/objc.dg/property/property-3.m b/gcc/testsuite/objc.dg/property/property-3.m deleted file mode 100644 index 5a83263e8dc..00000000000 --- a/gcc/testsuite/objc.dg/property/property-3.m +++ /dev/null @@ -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 -#include - -@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"); -} - diff --git a/gcc/testsuite/objc.dg/property/synthesize-2.m b/gcc/testsuite/objc.dg/property/synthesize-2.m index 4bc3e3c7729..92170678f3c 100644 --- a/gcc/testsuite/objc.dg/property/synthesize-2.m +++ b/gcc/testsuite/objc.dg/property/synthesize-2.m @@ -1,5 +1,6 @@ /* Contributed by Nicola Pero , October 2010. */ /* { dg-do run } */ +/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ #include #include diff --git a/gcc/testsuite/objc.dg/torture/strings/const-cfstring-1.m b/gcc/testsuite/objc.dg/torture/strings/const-cfstring-1.m index a11b5266f40..7e989156419 100644 --- a/gcc/testsuite/objc.dg/torture/strings/const-cfstring-1.m +++ b/gcc/testsuite/objc.dg/torture/strings/const-cfstring-1.m @@ -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 #import diff --git a/gcc/testsuite/objc/execute/forward-1.m b/gcc/testsuite/objc/execute/forward-1.m deleted file mode 100644 index 258a9164999..00000000000 --- a/gcc/testsuite/objc/execute/forward-1.m +++ /dev/null @@ -1,80 +0,0 @@ -/* See if -forward::/-performv:: is able to work. */ - -#include -#include - -#import "../../objc-obj-c++-shared/Object1.h" -#import "../../objc-obj-c++-shared/next-mapping.h" -#include - -#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); -} diff --git a/gcc/testsuite/objc/execute/forward-1.x b/gcc/testsuite/objc/execute/forward-1.x deleted file mode 100644 index ac4cf7f2799..00000000000 --- a/gcc/testsuite/objc/execute/forward-1.x +++ /dev/null @@ -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