blob: f5ea518f51ea7229a6865a9bdd130ed040e87f4c [file] [log] [blame]
/* Test for graceful encoding of const-qualified fields and parameters. */
/* Author: Ziemowit Laski <zlaski@apple.com> */
/* { dg-do compile } */
struct Cxx {
const struct Cxx *next;
};
__attribute__((objc_root_class)) @interface ObjC {
const struct Cxx *obj;
}
- (ObjC *)initWithCxx: (struct Cxx *const)c and: (const struct Cxx *)d;
@end
@implementation ObjC
- (ObjC *)initWithCxx: (struct Cxx *const)c and: (const struct Cxx *)d {
obj = d;
return self;
}
@end
/* APPLE LOCAL 4136935 */
/* { dg-final { scan-assembler "@\[0-9\]+@0:\[0-9\]+\\^{Cxx=\\^{Cxx}}\[0-9\]+r\\^{Cxx=\\^{Cxx}}" } } */