// { dg-do compile } // { dg-additional-options "-g" } template struct A { typedef int _Type[_Nm]; }; template struct B { typename A<_Nm>::_Type _M_elems; void operator[](int) { int a = *_M_elems; } }; class C { struct D { using type = int *; }; public: using pointer = D::type; }; class F { public: using pointer = C::pointer; F(pointer); }; struct G { int data; }; template struct H { using dimensions_t = B; dimensions_t dimensions; G mem; }; template H alloc_view(int, DimT, AlignT, Allocator) { H b; b.dimensions[0]; return b; } namespace memory { template using DynMdView = H<6>; } class I { I(); memory::DynMdView m_view; F m_memory; }; int c, d, e; I::I() : m_view(alloc_view<6>(c, d, e, [] {})), m_memory(&m_view.mem.data) {}