From patchwork Fri Nov 5 10:14:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 70250 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id BA3D5B7105 for ; Fri, 5 Nov 2010 21:14:57 +1100 (EST) Received: (qmail 7652 invoked by alias); 5 Nov 2010 10:14:54 -0000 Received: (qmail 7628 invoked by uid 22791); 5 Nov 2010 10:14:51 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, TW_BJ X-Spam-Check-By: sourceware.org Received: from c2bthomr14.btconnect.com (HELO mail.btconnect.com) (213.123.20.132) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 05 Nov 2010 10:14:38 +0000 Received: from host81-138-1-83.in-addr.btopenworld.com (EHLO thor.office) ([81.138.1.83]) by c2bthomr14.btconnect.com with ESMTP id ANP18883; Fri, 05 Nov 2010 10:14:32 +0000 (GMT) Message-Id: From: IainS To: GCC Patches Mime-Version: 1.0 (Apple Message framework v936) Subject: [PATCH, objc*, test-suite, committed] more next compatibility changes. Date: Fri, 5 Nov 2010 10:14:13 +0000 Cc: Nicola Pero , Mike Stump X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=tid=0001.0A0B0302.4CD3D8F6.005A, actions=tag X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A0B0208.4CD3D90B.031C, ss=1, fgs=0, ip=0.0.0.0, so=2010-07-22 22:03:31, dmn=2009-09-10 00:05:08, mode=single engine X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, another round of ObjC* test-suite-only fix-ups (mostly NeXT compatibility changes). As discussed in [1] I've amended the use of +initialize: to include GNU runtime. I corrected two typos in yesterday's Changelog. For at-property-2 I've commented out the case that ICEs, since we've agreed that it's low priority. The test itself is left in - so that it fails (ergo, we won't forget) but the remainder of the tests in that file are now run. Two of the property tests that relied on were only relevant to the transitory "V1" @property interface and have been removed (so that's less fixing needed later too) cheers, Iain [1] http://gcc.gnu.org/ml/gcc-patches/2010-11/msg00445.html Index: gcc/testsuite/ChangeLog =================================================================== --- gcc/testsuite/ChangeLog (revision 166351) +++ gcc/testsuite/ChangeLog (working copy) @@ -1,3 +1,33 @@ +2010-11-05 Iain Sandoe + + * objc.dg/torture/forward-1.m: Restore for m32 NeXT. + * objc.dg/demangle-1.m: Remove NeXT ifdef around +initialize + declaration and implementation. + * objc.dg/property/dotsyntax-3.m: XFAIL NeXT m64 run. + * obj-c++.dg/property/at-property-13.mm: Likewise. + * obj-c++.dg/property/fsf-property-method-access.mm: Likewise. + * obj-c++.dg/property/property-1.mm: Likewise. + * obj-c++.dg/property/at-property-7.mm: Likewise. + * obj-c++.dg/property/at-property-9.mm: Likewise. + * obj-c++.dg/property/dotsyntax-2.mm: Likewise. + * obj-c++.dg/property/at-property-10.mm: Likewise. + * obj-c++.dg/property/synthesize-2.mm: Likewise. + * obj-c++.dg/property/at-property-12.mm: Likewise. + * obj-c++.dg/property/fsf-property-basic.mm: Likewise. + * obj-c++.dg/property/fsf-property-named-ivar.mm: Likewise. + * obj-c++.dg/property/at-property-6.mm: Likewise. + * obj-c++.dg/property/at-property-8.mm: Likewise. + * obj-c++.dg/property/dotsyntax-1.mm: Likewise. + * obj-c++.dg/property/dotsyntax-3.mm: Likewise. + * obj-c++.dg/property/at-property-11.mm: Likewise. + * obj-c++.dg/template-8.mm: Likewise. + * obj-c++.dg/encode-3.mm: Use abort (), cast char types. + * obj-c++.dg/demangle-2.mm: Add +initialize:, XFAIL NeXT m64. + * obj-c++.dg/property/at-property-2.mm: Comment out a case that ICEs and + put a FIXME for this. + * obj-c++.dg/property/property-2.mm: Remove. + * obj-c++.dg/property/property-3.mm: Remove. + 2010-11-05 Jakub Jelinek PR debug/46307 @@ -76,10 +106,9 @@ * 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. + deprecation warnings. Use Object1 implementation. * 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.m: Remove. * objc/execute/forward-1.x: Remove. 2010-11-04 Jason Merrill Index: gcc/testsuite/objc.dg/property/dotsyntax-3.m =================================================================== --- gcc/testsuite/objc.dg/property/dotsyntax-3.m (revision 166351) +++ gcc/testsuite/objc.dg/property/dotsyntax-3.m (working copy) @@ -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 the object is a Class. */ Index: gcc/testsuite/objc.dg/torture/forward-1.m =================================================================== --- gcc/testsuite/objc.dg/torture/forward-1.m (revision 0) +++ gcc/testsuite/objc.dg/torture/forward-1.m (revision 0) @@ -0,0 +1,83 @@ +/* { dg-do run } */ +/* See if -forward::/-performv:: is able to work. */ +/* { dg-skip-if "PR36610" { *-*-* } { "-fgnu-runtime" } { "" } } */ +/* { dg-skip-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ + +#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); +} Index: gcc/testsuite/objc.dg/demangle-1.m =================================================================== --- gcc/testsuite/objc.dg/demangle-1.m (revision 166351) +++ gcc/testsuite/objc.dg/demangle-1.m (working copy) @@ -12,15 +12,14 @@ { Class isa; } ++ (id) initialize; + (int) testFunction1; + (int) test_function2; + (int) __testFunction3: (int)unused andArgument: (char)unused2; -#ifdef __NEXT_RUNTIME__ -+ (id) initialize ; -#endif @end @implementation DemangleTest ++ (id) initialize { return self; } + (int) testFunction1 { printf ("%s\n", __PRETTY_FUNCTION__); @@ -41,9 +40,6 @@ 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/obj-c++.dg/property/at-property-13.mm =================================================================== --- gcc/testsuite/obj-c++.dg/property/at-property-13.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/property/at-property-13.mm (working copy) @@ -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. */ Index: gcc/testsuite/obj-c++.dg/property/fsf-property-method-access.mm =================================================================== --- gcc/testsuite/obj-c++.dg/property/fsf-property-method-access.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/property/fsf-property-method-access.mm (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" } { "" } } */ #ifdef __cplusplus extern "C" { Index: gcc/testsuite/obj-c++.dg/property/property-1.mm =================================================================== --- gcc/testsuite/obj-c++.dg/property/property-1.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/property/property-1.mm (working copy) @@ -1,5 +1,6 @@ /* This program tests use of property provided setter/getter functions. */ /* { dg-do run } */ +/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ /* { dg-additional-sources "../../objc-obj-c++-shared/Object1.mm" } */ #import "../../objc-obj-c++-shared/Object1.h" Index: gcc/testsuite/obj-c++.dg/property/property-3.mm =================================================================== --- gcc/testsuite/obj-c++.dg/property/property-3.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/property/property-3.mm (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 -#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"); -} - Index: gcc/testsuite/obj-c++.dg/property/at-property-7.mm =================================================================== --- gcc/testsuite/obj-c++.dg/property/at-property-7.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/property/at-property-7.mm (working copy) @@ -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. */ Index: gcc/testsuite/obj-c++.dg/property/dotsyntax-2.mm =================================================================== --- gcc/testsuite/obj-c++.dg/property/dotsyntax-2.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/property/dotsyntax-2.mm (working copy) @@ -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. */ Index: gcc/testsuite/obj-c++.dg/property/at-property-9.mm =================================================================== --- gcc/testsuite/obj-c++.dg/property/at-property-9.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/property/at-property-9.mm (working copy) @@ -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. */ Index: gcc/testsuite/obj-c++.dg/property/synthesize-2.mm =================================================================== --- gcc/testsuite/obj-c++.dg/property/synthesize-2.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/property/synthesize-2.mm (working copy) @@ -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 Index: gcc/testsuite/obj-c++.dg/property/at-property-10.mm =================================================================== --- gcc/testsuite/obj-c++.dg/property/at-property-10.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/property/at-property-10.mm (working copy) @@ -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. */ Index: gcc/testsuite/obj-c++.dg/property/at-property-12.mm =================================================================== --- gcc/testsuite/obj-c++.dg/property/at-property-12.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/property/at-property-12.mm (working copy) @@ -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. */ Index: gcc/testsuite/obj-c++.dg/property/fsf-property-basic.mm =================================================================== --- gcc/testsuite/obj-c++.dg/property/fsf-property-basic.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/property/fsf-property-basic.mm (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" } { "" } } */ #ifdef __cplusplus extern "C" { Index: gcc/testsuite/obj-c++.dg/property/fsf-property-named-ivar.mm =================================================================== --- gcc/testsuite/obj-c++.dg/property/fsf-property-named-ivar.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/property/fsf-property-named-ivar.mm (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" } { "" } } */ #ifdef __cplusplus extern "C" { Index: gcc/testsuite/obj-c++.dg/property/property-2.mm =================================================================== --- gcc/testsuite/obj-c++.dg/property/property-2.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/property/property-2.mm (working copy) @@ -1,62 +0,0 @@ -/* { 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) 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/obj-c++.dg/property/at-property-2.mm =================================================================== --- gcc/testsuite/obj-c++.dg/property/at-property-2.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/property/at-property-2.mm (working copy) @@ -8,6 +8,7 @@ } @property int name __attribute__((deprecated)); @property int table __attribute__((xxx)); /* { dg-warning ".xxx. attribute directive ignored" } */ -@property void function (void); /* { dg-error "can.t make .function. into a method" } */ -@property typedef int j; /* { dg-error "invalid type for property" } */ +/* FIXME: the test below should not ICE. +@property void function (void); { dg-error "can.t make .function. into a method" } */ +@property typedef int j; /* { dg-error "invalid type for property" } */ @end Index: gcc/testsuite/obj-c++.dg/property/at-property-6.mm =================================================================== --- gcc/testsuite/obj-c++.dg/property/at-property-6.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/property/at-property-6.mm (working copy) @@ -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. */ Index: gcc/testsuite/obj-c++.dg/property/at-property-8.mm =================================================================== --- gcc/testsuite/obj-c++.dg/property/at-property-8.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/property/at-property-8.mm (working copy) @@ -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. */ Index: gcc/testsuite/obj-c++.dg/property/dotsyntax-1.mm =================================================================== --- gcc/testsuite/obj-c++.dg/property/dotsyntax-1.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/property/dotsyntax-1.mm (working copy) @@ -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. */ Index: gcc/testsuite/obj-c++.dg/property/dotsyntax-3.mm =================================================================== --- gcc/testsuite/obj-c++.dg/property/dotsyntax-3.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/property/dotsyntax-3.mm (working copy) @@ -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 the object is a Class. */ Index: gcc/testsuite/obj-c++.dg/property/at-property-11.mm =================================================================== --- gcc/testsuite/obj-c++.dg/property/at-property-11.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/property/at-property-11.mm (working copy) @@ -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. */ Index: gcc/testsuite/obj-c++.dg/demangle-2.mm =================================================================== --- gcc/testsuite/obj-c++.dg/demangle-2.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/demangle-2.mm (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 #include @@ -13,6 +14,7 @@ + (int) testFunction1; + (int) test_function2; + (int) __testFunction3: (int)unused andArgument: (char)unused2; ++ (id) initialize; @end @implementation DemangleTest @@ -31,6 +33,7 @@ std::cout << __PRETTY_FUNCTION__ << "\n"; return std::strcmp (__PRETTY_FUNCTION__, "+[DemangleTest __testFunction3:andArgument:]"); } ++ (id) initialize { return self; } @end int main () Index: gcc/testsuite/obj-c++.dg/template-8.mm =================================================================== --- gcc/testsuite/obj-c++.dg/template-8.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/template-8.mm (working copy) @@ -3,18 +3,21 @@ /* Author: Fariborz Jahanian */ /* Adapted by Nicola Pero */ /* { dg-do run } */ +/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ #include #include @interface MyRootClass { Class isa; } ++ (id) initialize; + alloc; - init; - doSomething; @end @implementation MyRootClass ++ (id) initialize { return self; } + alloc { return class_createInstance (self, 0); } - init { return self; } - doSomething { return self; } Index: gcc/testsuite/obj-c++.dg/encode-3.mm =================================================================== --- gcc/testsuite/obj-c++.dg/encode-3.mm (revision 166351) +++ gcc/testsuite/obj-c++.dg/encode-3.mm (working copy) @@ -1,8 +1,8 @@ /* { dg-do run } */ extern "C" { -extern void _exit(int); -extern int strcmp(const char *, const char *); +extern void abort (void); +extern int strcmp (const char *, const char *); } template @@ -36,16 +36,16 @@ int main(void) { const char *encode = @encode(long); if (strcmp (encode, L)) - _exit(-(__LINE__)); + abort (); - if (strcmp (enc, "{Vec=ff" L "q}")) - _exit(-(__LINE__)); + if (strcmp (enc, (const char *)"{Vec=ff" L "q}")) + abort (); - if (strcmp (enc2, "{Vec=dd" L "q}")) - _exit(-(__LINE__)); + if (strcmp (enc2, (const char *)"{Vec=dd" L "q}")) + abort (); - if (strcmp (enc3, "{?=f[10d]i" L "q{Vec=rcrc" L "q}}")) - _exit(-(__LINE__)); + if (strcmp (enc3, (const char *)"{?=f[10d]i" L "q{Vec=rcrc" L "q}}")) + abort (); return 0; }