URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 309 |
Rev 384 |
/* Test for graceful encoding of const-qualified fields and parameters. */
|
/* Test for graceful encoding of const-qualified fields and parameters. */
|
/* Author: Ziemowit Laski <zlaski@apple.com> */
|
/* Author: Ziemowit Laski <zlaski@apple.com> */
|
/* { dg-do compile } */
|
/* { dg-do compile } */
|
|
|
struct Cxx {
|
struct Cxx {
|
const struct Cxx *next;
|
const struct Cxx *next;
|
};
|
};
|
|
|
@interface ObjC {
|
@interface ObjC {
|
const struct Cxx *obj;
|
const struct Cxx *obj;
|
}
|
}
|
- (ObjC *)initWithCxx: (struct Cxx *const)c and: (const struct Cxx *)d;
|
- (ObjC *)initWithCxx: (struct Cxx *const)c and: (const struct Cxx *)d;
|
@end
|
@end
|
|
|
@implementation ObjC
|
@implementation ObjC
|
- (ObjC *)initWithCxx: (struct Cxx *const)c and: (const struct Cxx *)d {
|
- (ObjC *)initWithCxx: (struct Cxx *const)c and: (const struct Cxx *)d {
|
obj = d;
|
obj = d;
|
return self;
|
return self;
|
}
|
}
|
@end
|
@end
|
|
|
/* { dg-final { scan-assembler "@\[0-9\]+@0:\[0-9\]+r\\^{Cxx=\\^r{Cxx}}\[0-9\]+\\^r{Cxx}" } } */
|
/* { dg-final { scan-assembler "@\[0-9\]+@0:\[0-9\]+r\\^{Cxx=\\^r{Cxx}}\[0-9\]+\\^r{Cxx}" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.