blob: 9e9e4925c5ea1823e3602b52045f4a7bb489b237 [file] [log] [blame]
/* Test for graceful encoding of const-qualified fields and parameters. */
/* Author: Ziemowit Laski <zlaski@apple.com> */
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */
/* { dg-additional-options "-Wno-objc-root-class" } */
struct Cxx {
const struct Cxx *next;
};
@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
/* { dg-final { scan-assembler "@\[0-9\]+@0:\[0-9\]+r\\^{Cxx=\\^r{Cxx}}\[0-9\]+\\^r{Cxx}" } } */