repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge -r 127928:132243 from trunk
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
eh
/
init-temp2.C
blob
6a58dda1f97943bb6d7a85f4eb7b79092b4ae186
1
// PR c++/34196
2
// { dg-options "-O -Wuninitialized" }
3
4
template <class _Tp> 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<B> wt(f(A()));
31
}