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 } */ 5 6#include "../objc-obj-c++-shared/Object1.h" 7#include "../objc-obj-c++-shared/next-mapping.h" 8 9@interface Object (Test) 10- (Class) test1: (id)object; 11@end 12 13@interface Derived: Object 14- (Class) test2: (id)object; 15@end 16 17@implementation Object (Test) 18 19Class test1(id object) { 20 Class cls = CLASSPTRFIELD(object); 21 return cls; 22} 23- (Class) test1: (id)object { 24 Class cls = CLASSPTRFIELD(object); 25 return cls; 26} 27 28@end 29 30@implementation Derived 31 32Class test2(id object) { 33 Class cls = CLASSPTRFIELD(object); 34 return cls; 35} 36- (Class) test2: (id)object { 37 Class cls = CLASSPTRFIELD(object); 38 return cls; 39} 40 41@end 42 43Class test3(id object) { 44 Class cls = CLASSPTRFIELD(object); 45 return cls; 46} 47#include "../objc-obj-c++-shared/Object1-implementation.h" 48