OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
* typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.other
/
goto4.C
1
// { dg-do run }
2
// Test that we clean up temporaries bound to references properly when
3
// jumping out of their scope.
4
5
int ret = 1;
6
7
struct A
8
{
9
~A() { ret = 0; }
10
};
11
12
void f()
13
{
14
if (0)
15
{
16
out:
17
return;
18
}
19
const A& a = A();
20
goto out;
21
}
22
23
int main()
24
{
25
f();
26
return ret;
27
}