Debian Codegraph @

gcc/testsuite/obj-c++.dg/encode-1-next.mm

raw
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 <[email protected]> */
5
6 /* { dg-do compile } */
7 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
8 // { dg-additional-options "-Wno-objc-root-class" }
9
10 struct Cxx {
11 const struct Cxx *next;
12 };
13
14 @interface ObjC {
15 const struct Cxx *obj;
16 }
17 - (ObjC *)initWithCxx: (struct Cxx *const)c and: (const struct Cxx *)d;
18 @end
19
20 @implementation ObjC
21 - (ObjC *)initWithCxx: (struct Cxx *const)c and: (const struct Cxx *)d {
22 obj = d;
23 return self;
24 }
25 @end
26
27 /* { dg-final { scan-assembler "@\[0-9\]+@0:\[0-9\]+\\^{Cxx=\\^{Cxx}}\[0-9\]+r\\^{Cxx=\\^{Cxx}}" } } */