2018-01-24 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / obj-c++.dg / encode-1-next.mm
blob47673f20cb20cfe37fb152ca2a35cc01483d8500
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>  */
6 /* { dg-do compile } */
7 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
9 struct Cxx {
10   const struct Cxx *next;
13 @interface ObjC {
14   const struct Cxx *obj;
16 - (ObjC *)initWithCxx: (struct Cxx *const)c and: (const struct Cxx *)d;
17 @end
19 @implementation ObjC
20 - (ObjC *)initWithCxx: (struct Cxx *const)c and: (const struct Cxx *)d {
21   obj = d;
22   return self;
24 @end 
26 /* { dg-final { scan-assembler "@\[0-9\]+@0:\[0-9\]+\\^{Cxx=\\^{Cxx}}\[0-9\]+r\\^{Cxx=\\^{Cxx}}" } } */