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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr47541.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do run } */
2
 
3
struct Dummy {};
4
struct RefCount : public Dummy {
5
    ~RefCount(); /* Has to be non-pod.  */
6
    int *a;
7
    int *b;
8
};
9
RefCount::~RefCount(){}
10
struct Wrapper : public Dummy { RefCount ref; };
11
void __attribute__((noinline,noclone))
12
Push(Wrapper ptr)
13
{
14
  *ptr.ref.b = 0;
15
}
16
extern "C" void abort (void);
17
int main()
18
{
19
  int a = 1, b = 1;
20
  Wrapper x;
21
  x.ref.a = &a;
22
  x.ref.b = &b;
23
  Push(x);
24
  if (b != 0)
25
    abort ();
26
  return 0;
27
}

powered by: WebSVN 2.1.0

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