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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [init/] [ref12.C] - Blame information for rev 844

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

Line No. Rev Author Line
1 149 jeremybenn
// PR c++/17435
2
// { dg-do run }
3
 
4
extern "C" void abort ();
5
 
6
bool ok;
7
 
8
struct A
9
{
10
  void func() const
11
  {
12
    ok = 1;
13
  }
14
 
15
  ~A()
16
  {
17
    if (!ok)
18
      abort ();
19
  }
20
};
21
 
22
struct B : public A
23
{
24
};
25
 
26
int main()
27
{
28
  A const& r1 = B();
29
  r1.func();
30
}

powered by: WebSVN 2.1.0

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