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/] [dtor8.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
// { dg-options "-O1" }
3
// Origin: Mark Mitchell 
4
 
5
int result;
6
 
7
struct S
8
{
9
  S ();
10
  S (const S&);
11
  ~S ();
12
 
13
  int i;
14
  double d[18];
15
};
16
 
17
S* s;
18
 
19
S::S ()
20
{
21
  s = this;
22
}
23
 
24
S::~S ()
25
{
26
  if (s != this)
27
    result = 1;
28
}
29
 
30
inline S f ()
31
{
32
  return S ();
33
}
34
 
35
int main ()
36
{
37
  f ();
38
  return result;
39
}

powered by: WebSVN 2.1.0

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