Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/torture/pr53336.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 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 |