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
2017-09-13 Paolo Carlini <paolo.carlini@oracle.com>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
lambda
/
lambda-this5.C
blob
8974641643cb1a644b0fe4be66a233d2e19ffb72
1
// PR c++/53619
2
// { dg-do run { target c++11 } }
3
4
struct C {
5
int x;
6
};
7
struct B {
8
int q;
9
};
10
struct A : public B , C {
11
void foo();
12
};
13
14
void A::foo() {
15
auto k = [this]() {return (void *)(&x);};
16
if (k() != (void*)&x)
17
__builtin_abort();
18
}
19
20
int main(int l, char **) {
21
A a; a.foo();
22
}