1 /* Ensure there are no bizarre difficulties with accessing the 'isa' field of objects. */
2 /* { dg-do compile } */
4 #include "../objc-obj-c++-shared/TestsuiteObject.h"
5 #include "../objc-obj-c++-shared/runtime.h"
7 @interface TestsuiteObject (Test)
8 - (Class) test1: (id)object;
11 @interface Derived: TestsuiteObject
12 - (Class) test2: (id)object;
15 @implementation TestsuiteObject (Test)
17 Class test1(id object) {
18 #ifdef __NEXT_RUNTIME__
19 Class cls = object->isa;
21 Class cls = object->class_pointer;
25 - (Class) test1: (id)object {
26 #ifdef __NEXT_RUNTIME__
27 Class cls = object->isa;
29 Class cls = object->class_pointer;
36 @implementation Derived
38 Class test2(id object) {
39 #ifdef __NEXT_RUNTIME__
40 Class cls = object->isa;
42 Class cls = object->class_pointer;
46 - (Class) test2: (id)object {
47 #ifdef __NEXT_RUNTIME__
48 Class cls = object->isa;
50 Class cls = object->class_pointer;
57 Class test3(id object) {
58 #ifdef __NEXT_RUNTIME__
59 Class cls = object->isa;
61 Class cls = object->class_pointer;