PR lto/84212 - -Wno-* does not disable warnings from -flto link stage
[official-gcc.git] / gcc / testsuite / g++.dg / pr70965.C
blob4b45789845f058ae5596155bc2d6252009690189
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -std=c++11" } */
4 struct A {};
5 struct B {};
6 struct C { using p = int *; template <typename> using ra = A; };
7 struct J : C { template <typename> struct K { typedef C::ra<int> o; }; };
8 template <typename> struct D
10   struct H : J::K<int>::o { H (J::p, A) : J::K<int>::o () {} };
11   H d;
12   D (const char *, const A &x = A ()) : d (0, x) {}
14 extern template class D<char>;
15 enum L { M };
16 struct F { virtual char *foo (); };
17 template <class> struct I : B { static int foo (int) { return 0; } };
18 struct G { typedef I<int> t; };
19 void foo (int) { G::t::foo (0); }
20 void bar (const D<char> &, const D<int> &, int, L);
21 void baz () try { foo (0); } catch (F &e) { bar (e.foo (), "", 0, M); }