// PR c++/61433 // { dg-do compile { target c++11 } } // { dg-options "-O -fcompare-debug -fno-inline -fno-ipa-pure-const -fipa-sra" } template struct A { template struct B { int MEM; }; }; struct D {}; struct C: public A::B {}; template auto k(T t, U u, V v) -> decltype (t.U::template B::MEM) {} int main() { k( C(), A(), D() ); }