1 /* Ensure there are no bizarre difficulties with accessing the 'isa' field of objects. */
2 /* { dg-do compile } */
3 /* { dg-xfail-if "PR23613" { "*-*-*" } { "*" } { "" } } */
5 #include <objc/Object.h>
7 @interface Object (Test)
8 - (Class) test1: (id)object;
11 @interface Derived: Object
12 - (Class) test2: (id)object;
15 @implementation Object (Test)
17 Class test1(id object) {
18 Class cls = object->isa;
21 - (Class) test1: (id)object {
22 Class cls = object->isa;
28 @implementation Derived
30 Class test2(id object) {
31 Class cls = object->isa;
34 - (Class) test2: (id)object {
35 Class cls = object->isa;
41 Class test3(id object) {
42 Class cls = object->isa;