From patchwork Thu Sep 30 09:43:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 66143 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 5D90BB70B8 for ; Thu, 30 Sep 2010 19:43:46 +1000 (EST) Received: (qmail 9605 invoked by alias); 30 Sep 2010 09:43:44 -0000 Received: (qmail 9585 invoked by uid 22791); 30 Sep 2010 09:43:42 -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 c2beaomr09.btconnect.com (HELO mail.btconnect.com) (213.123.26.187) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 30 Sep 2010 09:43:33 +0000 Received: from host81-138-1-83.in-addr.btopenworld.com (EHLO thor.office) ([81.138.1.83]) by c2beaomr09.btconnect.com with ESMTP id ADK80432; Thu, 30 Sep 2010 10:43:28 +0100 (BST) Message-Id: <04FAAF8F-1ABD-4561-A1E7-78BE4EAAB3FF@sandoe-acoustics.co.uk> From: IainS To: GCC Patches Mime-Version: 1.0 (Apple Message framework v936) Subject: [Patch, objc* testsuite, committed] adjust test cases for NeXT. Date: Thu, 30 Sep 2010 10:43:26 +0100 Cc: Mike Stump , Nicola Pero X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=tid=0001.0A0B0302.4CA45BBF.00CC, actions=tag X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A0B020A.4CA45BC2.02E9, 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 This mops up a few test-suite adjustments as we progress through merging ObjC* changes. Applied under Mike's existing rules for ObjC testsuite changes. r164747 cheers. Iain PR objc/45842 * objc.dg/threedotthree-abi-1.m: Only apply at m32. * objc.dg/const-str-3.m: Correct header for memcpy. * objc.dg/const-str-7.m: Likewise. * objc.dg/method-20b.m: Provide an implementation of Object. Adjust XFAIL for m64 NeXT runtime. * objc.dg/const-str-12b.m: Use mapped data types Darwin >= 9. * objc.dg/encode-3.m: Correct line ordering, provide header for sprintf. * objc.dg/encode-7-next.m: Only run for 32bit. * objc.dg/encode-7-next-64bit.m: Only run for 64bit. * objc.dg/type-size-2.m: Provide an implementation of Object. Ajust headers. * obj-c++.dg/const-str-7.mm: Correct header for memcpy. * obj-c++.dg/const-str-12.mm: Use mapped data types Darwin >= 9. * obj-c++.dg/method-23.mm: Provide an implementation of Object. Adjust XFAIL for m64 NeXT runtime. * obj-c++.dg/method-22.mm: Likewise. * obj-c++.dg/threedotthree-abi-1.mm: Only apply at m32. #define METHOD Method @@ -70,5 +73,3 @@ int main(void) { CHECK_IF(totsize == offs4 + sizeof(int *)); return 0; } - -#include "../objc-obj-c++-shared/Object1-implementation.h" Index: gcc/testsuite/objc.dg/threedotthree-abi-1.m =================================================================== --- gcc/testsuite/objc.dg/threedotthree-abi-1.m (revision 164746) +++ gcc/testsuite/objc.dg/threedotthree-abi-1.m (working copy) @@ -1,14 +1,15 @@ /* This file tests that things are encoded using the gcc-3.3 ABI which is only used by the NeXT runtime. */ /* { dg-do run { target *-*-darwin* } } */ +/* { dg-require-effective-target ilp32 } */ /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + +#include "../objc-obj-c++-shared/Protocol1.h" #include #include -#include "../objc-obj-c++-shared/Protocol1.h" extern void abort(); - @protocol CommonProtocol -(oneway void)methodCall_On:(in bycopy id)someValue_On; Index: gcc/testsuite/objc.dg/const-str-3.m =================================================================== --- gcc/testsuite/objc.dg/const-str-3.m (revision 164746) +++ gcc/testsuite/objc.dg/const-str-3.m (working copy) @@ -8,7 +8,7 @@ #import "../objc-obj-c++-shared/next-mapping.h" #include #include -#include +#include @interface Foo: Object { char *cString; Index: gcc/testsuite/objc.dg/const-str-7.m =================================================================== --- gcc/testsuite/objc.dg/const-str-7.m (revision 164746) +++ gcc/testsuite/objc.dg/const-str-7.m (working copy) @@ -6,7 +6,7 @@ #include "../objc-obj-c++-shared/Object1.h" #include #include -#include +#include @interface Foo: Object { char *cString; Index: gcc/testsuite/objc.dg/method-20b.m =================================================================== --- gcc/testsuite/objc.dg/method-20b.m (revision 164746) +++ gcc/testsuite/objc.dg/method-20b.m (working copy) @@ -2,6 +2,8 @@ they should. */ /* { dg-do run } */ /* { dg-options "-O2" } */ +/* { dg-additional-sources "../objc-obj-c++-shared/Object1.m" } */ +/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ #include "../objc-obj-c++-shared/Object1.h" #include Index: gcc/testsuite/objc.dg/const-str-12b.m =================================================================== --- gcc/testsuite/objc.dg/const-str-12b.m (revision 164746) +++ gcc/testsuite/objc.dg/const-str-12b.m (working copy) @@ -5,6 +5,7 @@ /* { dg-do compile } */ #include "../objc-obj-c++-shared/Object1.h" +#import "../objc-obj-c++-shared/next-mapping.h" @interface Foo: Object { char *cString; @@ -17,7 +18,11 @@ + (Foo *) getString: (int) which; @end +#ifdef NEXT_OBJC_USE_NEW_INTERFACE +struct fudge_objc_class _FooClassReference; +#else struct objc_class _FooClassReference; +#endif @implementation Bar + (Foo *) getString: (int) which { Index: gcc/testsuite/objc.dg/encode-3.m =================================================================== --- gcc/testsuite/objc.dg/encode-3.m (revision 164746) +++ gcc/testsuite/objc.dg/encode-3.m (working copy) @@ -1,10 +1,11 @@ /* Method encoding tests for stand-alone @protocol declarations. */ /* Contributed by Ziemowit Laski . */ /* { dg-do run } */ +/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ +#include "../objc-obj-c++-shared/Protocol1.h" +#include #include -#include "../objc-obj-c++-shared/Protocol1.h" -/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ #ifdef __cplusplus #define ProtoBool bool Index: gcc/testsuite/objc.dg/encode-7-next.m =================================================================== --- gcc/testsuite/objc.dg/encode-7-next.m (revision 164746) +++ gcc/testsuite/objc.dg/encode-7-next.m (working copy) @@ -2,7 +2,7 @@ /* Author: Ziemowit Laski */ /* { dg-do run { target *-*-darwin* } } */ -/* { dg-skip-if "" { powerpc*-*-darwin* } { "-m64" } { "" } } */ +/* { dg-require-effective-target ilp32 } */ /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ #include "../objc-obj-c++-shared/Object1.h" Index: gcc/testsuite/objc.dg/encode-7-next-64bit.m =================================================================== --- gcc/testsuite/objc.dg/encode-7-next-64bit.m (revision 164746) +++ gcc/testsuite/objc.dg/encode-7-next-64bit.m (working copy) @@ -1,8 +1,9 @@ /* Additional testing for the NeXT runtime. Encoding in -m64 mode */ /* { dg-do run { target *-*-darwin* } } */ -/* { dg-options "-m64" } */ +/* { dg-require-effective-target lp64 } */ /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ +/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ #include #include Index: gcc/testsuite/objc.dg/type-size-2.m =================================================================== --- gcc/testsuite/objc.dg/type-size-2.m (revision 164746) +++ gcc/testsuite/objc.dg/type-size-2.m (working copy) @@ -4,9 +4,12 @@ /* Contributed by Ziemowit Laski . */ /* { dg-do run } */ /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ +/* { dg-additional-sources "../objc-obj-c++-shared/Object1.m" } */ + #include "../objc-obj-c++-shared/Object1.h" #include "../objc-obj-c++-shared/next-mapping.h" -//#include +#include +#include #ifdef __NEXT_RUNTIME__ #include