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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [dtor11.C] - Blame information for rev 749

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

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do run  }
2
// Origin: Mark Mitchell 
3
 
4
extern "C" void abort ();
5
 
6
int j;
7
 
8
struct S {
9
  S () { ++j; }
10
  S (const S&) { ++j; }
11
  ~S () {
12
    if (--j < 0)
13
      abort ();
14
   }
15
};
16
 
17
struct T {
18
  void g (S) {
19
  }
20
};
21
 
22
struct U {
23
  int i;
24
  S s;
25
};
26
 
27
U u;
28
 
29
U f () { return u; }
30
 
31
int main ()
32
{
33
  T t;
34
  t.g (f ().s);
35
}

powered by: WebSVN 2.1.0

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