1/* This file tests that things are encoded using the gcc-3.3 ABI which is only
2   used by the NeXT runtime.  */
3/* Test for graceful encoding of const-qualified fields and parameters.  */
4/* Author: Ziemowit Laski  <zlaski@apple.com>  */
5
6/* { dg-do compile } */
7/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
8
9struct Cxx {
10  const struct Cxx *next;
11};
12
13@interface ObjC {
14  const struct Cxx *obj;
15}
16- (ObjC *)initWithCxx: (struct Cxx *const)c and: (const struct Cxx *)d;
17@end
18
19@implementation ObjC
20- (ObjC *)initWithCxx: (struct Cxx *const)c and: (const struct Cxx *)d {
21  obj = d;
22  return self;
23}
24@end
25
26/* { dg-final { scan-assembler "@\[0-9\]+@0:\[0-9\]+\\^{Cxx=\\^{Cxx}}\[0-9\]+r\\^{Cxx=\\^{Cxx}}" } } */
27