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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/411
2
 
3
// Test that a fully-constructed base is destroyed before transferring
4
// control to the handler of a function-try-block.
5
 
6
// { dg-do run }
7
 
8
int ad;
9
int r;
10
 
11
struct A {
12
  ~A() { ++ad; }
13
};
14
 
15
struct B: public A {
16
  ~B();
17
};
18
 
19
B::~B ()
20
try
21
  {
22
    throw 1;
23
  }
24
catch (...)
25
  {
26
    if (!ad)
27
      r = 1;
28
    return;
29
  }
30
 
31
int main ()
32
{
33
  { B b; }
34
  return r;
35
}

powered by: WebSVN 2.1.0

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