OSDN Git Service

In gcc/objc/:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / objc.dg / encode-6-next.m
1 /* Test for graceful encoding of const-qualified fields and parameters.  */
2 /* Author: Ziemowit Laski  <zlaski@apple.com>  */
3 /* { dg-do compile } */
4 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
5
6 struct Cxx {
7   const struct Cxx *next;
8 };
9
10 @interface ObjC {
11   const struct Cxx *obj;
12 }
13 - (ObjC *)initWithCxx: (struct Cxx *const)c and: (const struct Cxx *)d;
14 @end
15
16 @implementation ObjC
17 - (ObjC *)initWithCxx: (struct Cxx *const)c and: (const struct Cxx *)d {
18   obj = d;
19   return self;
20 }
21 @end 
22
23 /* { dg-final { scan-assembler "@\[0-9\]+@0:\[0-9\]+\\^{Cxx=\\^{Cxx}}\[0-9\]+r\\^{Cxx=\\^{Cxx}}" } } */