| 1 |
// { dg-do run { target ia64-*-* } } |
| 2 |
// { dg-options "-fabi-version=0" } |
| 3 |
|
| 4 |
extern "C" void abort (); |
| 5 |
|
| 6 |
struct ConstructedObject { |
| 7 |
ConstructedObject() {}; |
| 8 |
~ConstructedObject() {}; |
| 9 |
ConstructedObject(const ConstructedObject &from) {}; |
| 10 |
}; |
| 11 |
|
| 12 |
struct FrameworkObject { |
| 13 |
ConstructedObject action(); |
| 14 |
}; |
| 15 |
|
| 16 |
ConstructedObject FrameworkObject::action() { |
| 17 |
void *r32, *r33; |
| 18 |
|
| 19 |
asm("mov %0 = r32\nmov %1 = r33" : "=r"(r32), "=r"(r33) : ); |
| 20 |
if (this != r33) { |
| 21 |
abort (); |
| 22 |
} |
| 23 |
return ConstructedObject(); |
| 24 |
} |
| 25 |
|
| 26 |
int main() |
| 27 |
{ |
| 28 |
FrameworkObject slawa; |
| 29 |
slawa.action(); |
| 30 |
return 0; |
| 31 |
} |
| 32 |
|