OSDN Git Service

Index: objc/ChangeLog
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / obj-c++.dg / encode-1.mm
1 /* Test for graceful encoding of const-qualified fields and parameters.  */
2 /* Author: Ziemowit Laski  <zlaski@apple.com>  */
3
4 /* { dg-do compile } */
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\]+r\\^{Cxx=\\^r{Cxx}}\[0-9\]+\\^r{Cxx}" } } */