OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [abi/] [structret1.C] - Blame information for rev 825

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { 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
}
24
 
25
int main()
26
{
27
  FrameworkObject slawa;
28
  slawa.action();
29
  return 0;
30
}
31
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.