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
PR testsuite/86649
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
expr
/
cond6.C
blob
8f7f084ce5425d6c1781ce9e43c7148d9ac50222
1
// { dg-do run }
2
3
extern "C" void abort ();
4
bool ok = false;
5
6
struct B {
7
B() {}
8
B(const B& b) { ok = true; }
9
};
10
11
struct D : public B {
12
D() {}
13
D(const D& d) : B() {}
14
};
15
16
D d;
17
B b;
18
19
D f() {
20
return d;
21
}
22
23
int main () {
24
b = (true ? f() : b);
25
return !ok;
26
}