// Contribued by Gabriel Dos Reis // Origin: iskey@i100.ryd.student.liu.se // { dg-do link } #include using namespace std; template struct s; template ostream& operator<<(ostream &o, const typename s::t &x) { return o; } template struct s { struct t { // { dg-bogus "" "" { xfail *-*-* } } friend ostream& operator<<(ostream&, const typename s::t &); // { dg-bogus "" "" { xfail *-*-* } } }; t x; }; int main() { s::t y; // { dg-bogus "" "" { xfail *-*-* } } cout << y; }