/* { dg-do compile } */ /* { dg-options "-O2 -std=c++11" } */ struct A {}; struct B {}; struct C { using p = int *; template using ra = A; }; struct J : C { template struct K { typedef C::ra o; }; }; template struct D { struct H : J::K::o { H (J::p, A) : J::K::o () {} }; H d; D (const char *, const A &x = A ()) : d (0, x) {} }; extern template class D; enum L { M }; struct F { virtual char *foo (); }; template struct I : B { static int foo (int) { return 0; } }; struct G { typedef I t; }; void foo (int) { G::t::foo (0); } void bar (const D &, const D &, int, L); void baz () try { foo (0); } catch (F &e) { bar (e.foo (), "", 0, M); }