diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/abi/structret1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/abi/structret1.C | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/abi/structret1.C b/gcc/testsuite/g++.dg/abi/structret1.C new file mode 100644 index 0000000..e9d4fd0 --- /dev/null +++ b/gcc/testsuite/g++.dg/abi/structret1.C @@ -0,0 +1,31 @@ +// { dg-do run { target ia64-*-* } } +// { dg-options "-fabi-version=0" } + +extern "C" void abort (); + +struct ConstructedObject { + ConstructedObject() {}; + ~ConstructedObject() {}; + ConstructedObject(const ConstructedObject &from) {}; +}; + +struct FrameworkObject { + ConstructedObject action(); +}; + +ConstructedObject FrameworkObject::action() { + void *r32, *r33; + + asm("mov %0 = r32\nmov %1 = r33" : "=r"(r32), "=r"(r33) : ); + if (this != r33) { + abort (); + } +} + +int main() +{ + FrameworkObject slawa; + slawa.action(); + return 0; +} + |