diff options
author | Iain Sandoe <iains@gcc.gnu.org> | 2010-07-02 09:49:53 +0000 |
---|---|---|
committer | Iain Sandoe <iains@gcc.gnu.org> | 2010-07-02 09:49:53 +0000 |
commit | 84c2219af1942b4660a9a0447b15cd55e49fc492 (patch) | |
tree | 9763ea05a4e8db1d56a14103b625ce0320a0cf98 | |
parent | 450997efe0aa70d03d9ef757af4bccf62c4dd321 (diff) | |
download | gcc-84c2219af1942b4660a9a0447b15cd55e49fc492.zip gcc-84c2219af1942b4660a9a0447b15cd55e49fc492.tar.gz gcc-84c2219af1942b4660a9a0447b15cd55e49fc492.tar.bz2 |
restore cxx-ivar-3 test functionality
* obj-c++.dg/cxx-ivars-3.mm: Make the test require OSX <= 10.4.
Use the ABI-0 accessors and fail it for m64.
From-SVN: r161692
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm | 24 |
2 files changed, 16 insertions, 13 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 651d8b6..b4dc10b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-07-02 Iain Sandoe <iains@gcc.gnu.org> + + * obj-c++.dg/cxx-ivars-3.mm: Make the test require OSX <= 10.4. + Use the ABI-0 accessors and fail it for m64. + 2010-07-02 Jan Hubicka <jh@suse.cz> * g++.dg/tree-ssa/pr44706.C: New testcase. diff --git a/gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm b/gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm index a3c4b0c4..e94e6ec 100644 --- a/gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm +++ b/gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm @@ -1,13 +1,12 @@ // Check if ObjC classes with non-POD C++ ivars are specially marked in the metadata. // { dg-do run { target *-*-darwin* } } -// { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } -// { dg-options "-fobjc-call-cxx-cdtors" } -// { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } - -#include "../objc-obj-c++-shared/Object1.h" -#include "../objc-obj-c++-shared/next-mapping.h" +// { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } +// { dg-options "-fobjc-call-cxx-cdtors -mmacosx-version-min=10.4" } +// This test has no equivalent or meaning for m64/ABI V2 +// { dg-xfail-run-if "No Test Avail" { *-*-darwin* && lp64 } { "-fnext-runtime" } { "" } } +#include <objc/objc-runtime.h> #include <stdlib.h> #define CHECK_IF(expr) if(!(expr)) abort() @@ -39,18 +38,17 @@ struct cxx_struct { int main (void) { +#ifndef __LP64__ Class cls; - cls = objc_get_class("Foo"); -#if NEXT_OBJC_USE_NEW_INTERFACE - CHECK_IF(class_isMetaClass(cls) & CLS_HAS_CXX_STRUCTORS); - cls = objc_getClass("Bar"); - CHECK_IF(!(class_isMetaClass(cls) & CLS_HAS_CXX_STRUCTORS)); -#else + cls = objc_getClass("Foo"); CHECK_IF(cls->info & CLS_HAS_CXX_STRUCTORS); cls = objc_getClass("Bar"); CHECK_IF(!(cls->info & CLS_HAS_CXX_STRUCTORS)); + +#else + /* No test needed or available. */ + abort (); #endif return 0; } -#include "../objc-obj-c++-shared/Object1-implementation.h" |