2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr53336.C
blobab121945d81013a1b7a4ccd82b803e1d2a990f41
1 // { dg-do compile }
3 bool foo();
5 struct C
7     C()
8     {
9         if (foo())
10             foo();
11     }
14 struct S
16     struct dummy
17     {
18         int i_;
19     };
20     typedef int dummy::*bool_type;
22     operator bool_type() const
23     {
24         return foo() ? &dummy::i_ : 0;
25     }
28 int x;
30 struct adaptor
32     C c;
34     virtual void bar()
35     {
36         if (S())
37             x = 0;
38     }
41 int main()
43     adaptor a;