OSDN Git Service

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