blob: cf878eb6b2035199d1d3fed5d19d1d9baa5f3cc7 [file] [log] [blame]
/* APPLE LOCAL file 4174833 */
/* Check that the STABS information for ObjC objects is flattened;
gdb does not (yet) know how to traverse ObjC class hierarchies. */
/* Contributed by Ziemowit Laski <zlaski@apple.com> */
/* { dg-do compile { target *-*-darwin* } } */
/* { dg-options "-gstabs+ -gfull" } */
#include <objc/Object.h>
@interface Base: Object {
int a;
id b;
}
- meth;
@end
@interface Derived: Base {
Object *c;
Base *d;
}
- meth;
@end
@implementation Base
- meth { a = 0; return self; }
@end
@implementation Derived
- meth { d = self; return self; }
@end
/* { dg-final { scan-assembler "Base:T\\(\[0-9\]+,\[0-9\]+\\)=s\[0-9\]+isa:/1\\(\[0-9\]+,\[0-9\]+\\),0,\[0-9\]+" } } */
/* { dg-final { scan-assembler "Derived:T\\(\[0-9\]+,\[0-9\]+\\)=s\[0-9\]+isa:/1\\(\[0-9\]+,\[0-9\]+\\),0,\[0-9\]+;a:/1\\(\[0-9\]+,\[0-9\]+\\)" } } */