repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
initlist116.C
blob
90dd8d70d63afad1024f3b6d0130266f7474a731
1
// PR c++/66139
2
// { dg-do run { target c++11 } }
3
4
int constructed = 0;
5
6
class lock_guard_ext{
7
public:
8
lock_guard_ext() { ++constructed; }
9
~lock_guard_ext() { --constructed; }
10
};
11
12
struct Access {
13
lock_guard_ext lock;
14
int value;
15
};
16
17
int t() {
18
throw 0;
19
}
20
21
Access foo1() {
22
return { {}, t() };
23
}
24
25
int main () {
26
try { foo1(); } catch (int) {}
27
if (constructed != 0)
28
__builtin_abort();
29
}