1 /* Ensure there are no bizarre difficulties with accessing the 'isa' field of
2 objects. This field is named differently between GNU and NeXT runtimes so
3 accessed via the CLASSPTRFIELD() macro defined in next-mapping.h */
4 /* { dg-do compile } */
6 #include "../objc-obj-c++-shared/Object1.h"
7 #include "../objc-obj-c++-shared/next-mapping.h"
9 @interface Object (Test)
10 - (Class) test1: (id)object;
13 @interface Derived: Object
14 - (Class) test2: (id)object;
17 @implementation Object (Test)
19 Class test1(id object) {
20 Class cls = CLASSPTRFIELD(object);
23 - (Class) test1: (id)object {
24 Class cls = CLASSPTRFIELD(object);
30 @implementation Derived
32 Class test2(id object) {
33 Class cls = CLASSPTRFIELD(object);
36 - (Class) test2: (id)object {
37 Class cls = CLASSPTRFIELD(object);
43 Class test3(id object) {
44 Class cls = CLASSPTRFIELD(object);
47 #include "../objc-obj-c++-shared/Object1-implementation.h"