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
2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
torture
/
pr53336.C
blob
ab121945d81013a1b7a4ccd82b803e1d2a990f41
1
// { dg-do compile }
2
3
bool foo();
4
5
struct C
6
{
7
C()
8
{
9
if (foo())
10
foo();
11
}
12
};
13
14
struct S
15
{
16
struct dummy
17
{
18
int i_;
19
};
20
typedef int dummy::*bool_type;
21
22
operator bool_type() const
23
{
24
return foo() ? &dummy::i_ : 0;
25
}
26
};
27
28
int x;
29
30
struct adaptor
31
{
32
C c;
33
34
virtual void bar()
35
{
36
if (S())
37
x = 0;
38
}
39
};
40
41
int main()
42
{
43
adaptor a;
44
}
45