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
/
pr82878.C
blob
c75e93b56c301f32192758d349912254d6f46aca
1
// { dg-do compile { target c++11 } }
2
// { dg-additional-options "-O" }
3
// pr 82878 erroneously unwrapped a reference parm in the lambda::_FUN
4
// thunk.
5
6
struct A {
7
~A();
8
operator int ();
9
};
10
11
void baz ();
12
13
void
14
bar (A b)
15
{
16
void (*lam) (A) = [](A) { baz (); };
17
18
if (auto c = b)
19
lam (c);
20
}