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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/34196
2
// { dg-options "-O -Wuninitialized" }
3
 
4
template  class AutoPtr
5
{
6
  _Tp* _M_ptr;
7
 
8
public:
9
  explicit AutoPtr(_Tp* __p = 0)  : _M_ptr(__p) {}
10
 
11
  ~AutoPtr() { delete _M_ptr; }
12
};
13
 
14
struct A
15
{
16
  A() { }
17
  ~A() { throw 1.0; }
18
};
19
 
20
struct B
21
{
22
  virtual ~B();
23
};
24
 
25
B* f (const A &s) { throw 1; }
26
 
27
int
28
main()
29
{
30
  AutoPtr wt(f(A()));
31
}

powered by: WebSVN 2.1.0

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