Debian Codegraph @

gcc/testsuite/g++.dg/torture/pr77947.C

raw
1 // { dg-do compile }
2 // { dg-additional-options "-g" }
3
4 class A
5 {
6 public:
7 virtual bool m_fn1 () const = 0;
8 };
9 class B
10 {
11 const A *m_fn2 () const;
12 };
13 inline const A *
14 B::m_fn2 () const
15 {
16 class C : A
17 {
18 bool
19 m_fn1 () const
20 {
21 return true;
22 }
23 C () {}
24 };
25
26 return 0;
27 }
28 void
29 fn1 (A &p1)
30 {
31 p1.m_fn1 ();
32 }