PR lto/84212 - -Wno-* does not disable warnings from -flto link stage
[official-gcc.git] / gcc / testsuite / g++.dg / pr63766.C
blob1414fbe52b71ab58111f858c605943c5227ce363
1 /* { dg-do compile } */
2 /* { dg-options "-std=c++11 -O2" } */
4 class A
6  public:
7   void
8     getValueType ()
9   {
10   }
11   void getTypeClass ();
13 template <typename ImplClass> class B
15  public:
16   void
17     Visit (A *p1)
18   {
19     p1->getTypeClass ();
20     static_cast<ImplClass *> (0)->VisitAtomicType (0);
21   }
23 class C : B<C>
25   template <typename Fn>
26   void
27     dumpChild (Fn p1)
28     {
29       p1 ();
30     }
32  public:
33   void dumpTypeAsChild (int);
34   void
35     VisitAtomicType (A *p1)
36   {
37     p1->getValueType ();
38     dumpTypeAsChild (0);
39   }
41 void
42 C::dumpTypeAsChild (int)
44   dumpChild ([=]
45              {
46                Visit (0);
47              });