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
Be careful about comdat boundary in ICF (PR ipa/82352).
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
pr57958.C
blob
d35f9edf2ae0f9c3f9811ea713a7bd1704dfa8eb
1
// { dg-do run { target c++11 } }
2
3
#define assert(E) if(!(E))__builtin_abort();
4
5
int n = 0;
6
7
template <class T>
8
class Foo {
9
public:
10
Foo() {
11
n--;
12
}
13
Foo(const Foo&) {
14
n--;
15
}
16
~Foo() {
17
n++;
18
}
19
};
20
21
struct Data {};
22
23
void a()
24
{
25
Data b;
26
}
27
28
int main(int argc, char *argv[]) {
29
auto fn = [] (const Foo<Data>& x) {
30
return (x);
31
};
32
33
{
34
Foo<Data> a;
35
fn(a);
36
}
37
38
assert(n == 0);
39
}