2007-03-01 Paul Brook <paul@codesourcery.com>
[official-gcc.git] / gcc / testsuite / objc.dg / encode-6.m
blob263b02ad0f3c805ad2b03a1784e309ed966e43fa
1 /* Test for graceful encoding of const-qualified fields and parameters.  */
2 /* Author: Ziemowit Laski  <zlaski@apple.com>  */
3 /* { dg-do compile } */
5 struct Cxx {
6   const struct Cxx *next;
7 };
9 @interface ObjC {
10   const struct Cxx *obj;
12 - (ObjC *)initWithCxx: (struct Cxx *const)c and: (const struct Cxx *)d;
13 @end
15 @implementation ObjC
16 - (ObjC *)initWithCxx: (struct Cxx *const)c and: (const struct Cxx *)d {
17   obj = d;
18   return self;
20 @end 
22 /* { dg-final { scan-assembler "@\[0-9\]+@0:\[0-9\]+r\\^{Cxx=\\^r{Cxx}}\[0-9\]+\\^r{Cxx}" } } */