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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/41449
2
// { dg-do run }
3
 
4
struct A
5
{
6
  A() {}
7
  A(const A&) { throw 1; }
8
};
9
 
10
int bs;
11
struct B
12
{
13
  B() { ++bs; }
14
  B(const B&) { ++bs; }
15
  ~B() { --bs; }
16
};
17
 
18
struct C
19
{
20
  B b1;
21
  A a;
22
  B b2;
23
};
24
 
25
int main()
26
{
27
  {
28
    B b1, b2;
29
    A a;
30
 
31
    try {
32
      C c = { b1, a, b2 };
33
    } catch (...) {}
34
  }
35
  if (bs != 0)
36
    __builtin_abort ();
37
}

powered by: WebSVN 2.1.0

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