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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [dtor6.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do run  }
2
// Origin: Mark Mitchell 
3
 
4
extern "C" void abort ();
5
 
6
int count;
7
 
8
struct S
9
{
10
  S ();
11
  S (const S&);
12
  ~S ();
13
 
14
  int i;
15
};
16
 
17
S::S ()
18
{
19
  i = count++;
20
}
21
 
22
S::S (const S&)
23
{
24
  i = count++;
25
}
26
 
27
S::~S ()
28
{
29
  if (--count != i)
30
    abort ();
31
}
32
 
33
void f (S, S)
34
{
35
}
36
 
37
int main ()
38
{
39
  {
40
    S s;
41
    f (s, s);
42
  }
43
  return count != 0;
44
}
45
 

powered by: WebSVN 2.1.0

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