re PR objc++/23613 (obj-c++.dg/isa-field-1.mm fails with the GNU runtime)

2010-03-31  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>

	PR objc++/23613
	* gcc/testsuite/objc-obj-c++-shared/next-mapping.h (CLASSPTRFIELD):
	New macro.
	* gcc/testsuite/obj-c++.dg/isa-field-1.mm: Use new CLASSPTRFIELD macro.
	Remove dg-xfail-if.

From-SVN: r157872
This commit is contained in:
Iain Sandoe 2010-03-31 15:47:42 +00:00 committed by Janis Johnson
parent 290d8971e6
commit 2981f2063f
3 changed files with 24 additions and 8 deletions

View File

@ -1,3 +1,11 @@
2010-03-31 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
PR objc++/23613
* gcc/testsuite/objc-obj-c++-shared/next-mapping.h (CLASSPTRFIELD):
New macro.
* gcc/testsuite/obj-c++.dg/isa-field-1.mm: Use new CLASSPTRFIELD macro.
Remove dg-xfail-if.
2010-03-31 Martin Jambor <mjambor@suse.cz>
* gcc.dg/guality/inline-params.c: Disable early inlining. Xfail run

View File

@ -1,8 +1,10 @@
/* Ensure there are no bizarre difficulties with accessing the 'isa' field of objects. */
/* Ensure there are no bizarre difficulties with accessing the 'isa' field of
objects. This field is named differently between GNU and NeXT runtimes so
accessed via the CLASSPTRFIELD() macro defined in next-mapping.h */
/* { dg-do compile } */
/* { dg-xfail-if "PR23613" { "*-*-*" } { "*" } { "" } } */
#include "../objc-obj-c++-shared/Object1.h"
#include "../objc-obj-c++-shared/next-mapping.h"
@interface Object (Test)
- (Class) test1: (id)object;
@ -15,11 +17,11 @@
@implementation Object (Test)
Class test1(id object) {
Class cls = object->isa;
Class cls = CLASSPTRFIELD(object);
return cls;
}
- (Class) test1: (id)object {
Class cls = object->isa;
Class cls = CLASSPTRFIELD(object);
return cls;
}
@ -28,18 +30,18 @@ Class test1(id object) {
@implementation Derived
Class test2(id object) {
Class cls = object->isa;
Class cls = CLASSPTRFIELD(object);
return cls;
}
- (Class) test2: (id)object {
Class cls = object->isa;
Class cls = CLASSPTRFIELD(object);
return cls;
}
@end
Class test3(id object) {
Class cls = object->isa;
Class cls = CLASSPTRFIELD(object);
return cls;
}
#include "../objc-obj-c++-shared/Object1-implementation.h"

View File

@ -5,7 +5,11 @@
/* David Ayers <d.ayers@inode.at> */
/* Darwin 64bit/OBJC2 modifications Iain Sandoe */
#ifdef __NEXT_RUNTIME__
#ifndef __NEXT_RUNTIME__
#define CLASSPTRFIELD(x) (x)->class_pointer
#else
/* Includes next-abi.h to set NEXT_OBJC_USE_NEW_INTERFACE etc.*/
#ifndef _OBJC_OBJECT1_H_
#include "Object1.h"
@ -23,6 +27,8 @@
#define class_create_instance(C) class_createInstance(C, 0)
#define class_get_class_name(C) object_getClassName(C)
#define CLASSPTRFIELD(x) (x)->isa
#ifdef NEXT_OBJC_USE_NEW_INTERFACE
# define object_class_name(O) (object_getClassName(O))
# define object_get_class(O) (object_getClass((id)O))