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
Implement first part of unsigned integers for Fortran.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
eh
/
dtor2.C
blob
9555b3789af71b793ec63437f36dfa9e26c23cf3
1
// PR c++/12751
2
// tree-ssa eh lowering bug ran a destructor twice for one object
3
// { dg-do run }
4
5
static int check;
6
7
struct Y {
8
Y();
9
~Y();
10
};
11
12
void foo() {
13
Y y1;
14
Y y2;
15
switch(0) {
16
case 1: {
17
Y y3;
18
return;
19
}
20
}
21
}
22
23
Y::Y() { ++check; }
24
Y::~Y() { --check; }
25
26
int main()
27
{
28
foo ();
29
return check;
30
}