From bd72e3e2262af79202ce8b43c873edd372636a14 Mon Sep 17 00:00:00 2001 From: iains Date: Thu, 30 Sep 2010 09:40:11 +0000 Subject: [PATCH] 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164747 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 22 ++++++++++++++++++++++ gcc/testsuite/objc.dg/const-str-12b.m | 5 +++++ gcc/testsuite/objc.dg/const-str-3.m | 2 +- gcc/testsuite/objc.dg/const-str-7.m | 2 +- gcc/testsuite/objc.dg/encode-3.m | 5 +++-- gcc/testsuite/objc.dg/encode-7-next-64bit.m | 3 ++- gcc/testsuite/objc.dg/encode-7-next.m | 2 +- gcc/testsuite/objc.dg/method-20b.m | 2 ++ gcc/testsuite/objc.dg/threedotthree-abi-1.m | 5 +++-- gcc/testsuite/objc.dg/type-size-2.m | 7 ++++--- 10 files changed, 44 insertions(+), 11 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0360ef6..8bf5f92 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,25 @@ +2010-09-30 Iain Sandoe + + 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. + 2010-09-30 Nicola Pero Merge from 'apple/trunk' branch on FSF servers. diff --git a/gcc/testsuite/objc.dg/const-str-12b.m b/gcc/testsuite/objc.dg/const-str-12b.m index d6bb1be..b92b50b 100644 --- a/gcc/testsuite/objc.dg/const-str-12b.m +++ b/gcc/testsuite/objc.dg/const-str-12b.m @@ -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 { diff --git a/gcc/testsuite/objc.dg/const-str-3.m b/gcc/testsuite/objc.dg/const-str-3.m index 0d719e8..26e7280 100644 --- a/gcc/testsuite/objc.dg/const-str-3.m +++ b/gcc/testsuite/objc.dg/const-str-3.m @@ -8,7 +8,7 @@ #import "../objc-obj-c++-shared/next-mapping.h" #include #include -#include +#include @interface Foo: Object { char *cString; diff --git a/gcc/testsuite/objc.dg/const-str-7.m b/gcc/testsuite/objc.dg/const-str-7.m index 223789a..24c5dd3 100644 --- a/gcc/testsuite/objc.dg/const-str-7.m +++ b/gcc/testsuite/objc.dg/const-str-7.m @@ -6,7 +6,7 @@ #include "../objc-obj-c++-shared/Object1.h" #include #include -#include +#include @interface Foo: Object { char *cString; diff --git a/gcc/testsuite/objc.dg/encode-3.m b/gcc/testsuite/objc.dg/encode-3.m index 4322453..46a6eb8 100644 --- a/gcc/testsuite/objc.dg/encode-3.m +++ b/gcc/testsuite/objc.dg/encode-3.m @@ -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 #include "../objc-obj-c++-shared/Protocol1.h" -/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ +#include +#include #ifdef __cplusplus #define ProtoBool bool diff --git a/gcc/testsuite/objc.dg/encode-7-next-64bit.m b/gcc/testsuite/objc.dg/encode-7-next-64bit.m index 2a064d8..bda3da8 100644 --- a/gcc/testsuite/objc.dg/encode-7-next-64bit.m +++ b/gcc/testsuite/objc.dg/encode-7-next-64bit.m @@ -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 diff --git a/gcc/testsuite/objc.dg/encode-7-next.m b/gcc/testsuite/objc.dg/encode-7-next.m index 60db236..70cd4b8 100644 --- a/gcc/testsuite/objc.dg/encode-7-next.m +++ b/gcc/testsuite/objc.dg/encode-7-next.m @@ -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" diff --git a/gcc/testsuite/objc.dg/method-20b.m b/gcc/testsuite/objc.dg/method-20b.m index 9b8625a..733d872 100644 --- a/gcc/testsuite/objc.dg/method-20b.m +++ b/gcc/testsuite/objc.dg/method-20b.m @@ -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 diff --git a/gcc/testsuite/objc.dg/threedotthree-abi-1.m b/gcc/testsuite/objc.dg/threedotthree-abi-1.m index 8e4f2be..5eb0001 100644 --- a/gcc/testsuite/objc.dg/threedotthree-abi-1.m +++ b/gcc/testsuite/objc.dg/threedotthree-abi-1.m @@ -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; diff --git a/gcc/testsuite/objc.dg/type-size-2.m b/gcc/testsuite/objc.dg/type-size-2.m index 499f083..656d85a 100644 --- a/gcc/testsuite/objc.dg/type-size-2.m +++ b/gcc/testsuite/objc.dg/type-size-2.m @@ -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 #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" -- 2.7.4