// { dg-do assemble } // Origin: Mark Mitchell template struct S { typedef typename T::Y::Z X; // { dg-error "non-template" "non-template" } No Y in A // { dg-message "note" "note" { target *-*-* } 6 } // { dg-error "does not declare" "not declare" { target *-*-* } 6 } X x; // { dg-error "does not name a type" } No Y in A }; struct A { struct Y { typedef A Z; }; }; template struct S;